Skip to content

detection: numpy.AxisError #1

@Alpenblick

Description

@Alpenblick

I am trying to train you mothe to detect daphnia in a beaker. After training the following error happens in my terminal. What could be the reason?

For trial I just used a super simple video with only two daphnia in front of a grey background.

Epoch 24/25 71/71 [==============================] - 0s 4ms/step - loss: 0.5962 - accuracy: 0.7606 - val_loss: 0.5960 - val_accuracy: 0.7292 Epoch 25/25 71/71 [==============================] - 0s 4ms/step - loss: 0.5657 - accuracy: 0.7606 - val_loss: 0.6101 - val_accuracy: 0.7292 [UPDATING.....]1th frame detected and stored Exception in Tkinter callback Traceback (most recent call last): File "/Users/alpenblick/opt/miniconda3/envs/mothe/lib/python3.6/tkinter/__init__.py", line 1705, in __call__ return self.func(*args) File "mothe_gui.py", line 179, in click_run inst.detection(path, path1) File "/Users/alpenblick/opt/miniconda3/envs/mothe/lib/python3.6/site-packages/mothe/pipe.py", line 335, in detection Pclass = np.argmax(np.round(pred),axis=1) File "<__array_function__ internals>", line 6, in argmax File "/Users/alpenblick/opt/miniconda3/envs/mothe/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 1153, in argmax return _wrapfunc(a, 'argmax', axis=axis, out=out) File "/Users/alpenblick/opt/miniconda3/envs/mothe/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 61, in _wrapfunc return bound(*args, **kwds) numpy.AxisError: axis 1 is out of bounds for array of dimension 1

I only used around 30pictures for "yes" and 90 for "no". Could this be the error. I was just trying it out before I try to get the 10k pictures. :)

EDIT: It runs with bb_model_N12.h5py and Blackbuck4.MOV with no problem, so I guess my model is just not good enough and needs more data to train on? The detection seems not to good though... Lots of grass is detected as a BB

Thanks in advance and with best regards,
Sebastian

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions