Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

detection: numpy.AxisError #1

Open
Alpenblick opened this issue Jan 21, 2021 · 1 comment
Open

detection: numpy.AxisError #1

Alpenblick opened this issue Jan 21, 2021 · 1 comment

Comments

@Alpenblick
Copy link

Alpenblick commented Jan 21, 2021

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

@aakanksharathore
Copy link
Contributor

Hello Sebastian,

Thanks for reporting this issue. Can you share some more details so that I can help you with this error? What parameters are you using for the training method, for example, what step size did you use for detection. It is possible that you provided a large step size but there are not that many frames in your video. Do you still get an output video after this error?
If not, can you provide screenshots of the steps?

Best regards,
Akanksha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants