When first attempting to train model, Training output shows:
Creating job... OK (ID: 1016858)
Job started
Splitting data into training and validation sets...
Traceback (most recent call last):
File "/home/train.py", line 333, in <module>
main_function()
File "/home/train.py", line 187, in main_function
mode, RANDOM_SEED, dir_path, 0.2)
File "./resources/libraries/ei_tensorflow/training.py", line 22, in split_and_shuffle_data
Y = ei_tensorflow.utils.load_y_structured(dir_path, 'y_train.npy', len(X))
File "./resources/libraries/ei_tensorflow/utils.py", line 7, in load_y_structured
Y_structured_file = json.loads(file.read())
File "/usr/lib/python3.6/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x93 in position 0: invalid start byte
Application exited with code 1 (Error)
Job failed (see above)
Project details:
box detection
250 pics in 320x320px
1 type of label
Could you try to change the Processing Block (under the Create Impulse view in the studio) from Raw Data to Image please. Let me know if it solves your issue.
I changed that, then I generated features again (I didn’t realize before, but the features were originally wrong) and “Training output” now shows:
Creating job... OK (ID: 1018537)
Copying features from processing blocks...
Copying features from DSP block...
Copying features from DSP block OK
Copying features from processing blocks OK
Job started
Splitting data into training and validation sets...
Splitting data into training and validation sets OK
Traceback (most recent call last):
File "/home/train.py", line 333, in <module>
main_function()
File "/home/train.py", line 195, in main_function
SPECIFIC_INPUT_SHAPE)
File "./resources/libraries/ei_tensorflow/training.py", line 185, in get_datasets
train_dataset = get_dataset_standard(X_train, Y_train)
File "./resources/libraries/ei_tensorflow/training.py", line 118, in get_dataset_standard
output_shapes=(tf.TensorShape(X_values[0].shape), tf.TensorShape(Y_values[0].shape)))
AttributeError: 'dict' object has no attribute 'shape'
Application exited with code 1 (Error)
Job failed (see above)
I am not 100% sure but if in the Image page you select RGB instead of greyscale, I think it will generate RGB features (even if your image is greyscale). It is a bit of loss in the performance but the MobileNetV2 SSD FPN-Lite 320x320 model that we are using needs to use RGB parameters.
Just to clarify because I’m not entirely familiar with the terminology, models that consist of finding bounding boxes of a single object are not supported?
they are supported by Edge Impulse, but as you can see on the Object Detection page near On-device performance, this model takes about 3.6MB of RAM.
This is why you cannot run the Object Detection models on Cortex-M devices.
However, it does work on Raspberry Pis or on Jetson Nanos