index 8 is out of bounds for axis 0 with size 8,Tracking from the terminal

63 views
Skip to first unread message

dong ning

unread,
Nov 8, 2019, 12:56:52 AM11/8/19
to idtracker.ai users group
idtrackerai terminal_mode --_video "absolute_video_folder/video.avi" --_session session0 --_resreduct 0.3 --_intensity [0,135] --_area [5,50] --_range [0,508] --_nblobs 8 --_roi "[[(10,10),(200,10),(10,200)]]" --exec track_video

A%)0LBY6_3L@3(R1YXN%0KT.png


How can I adjust the parameters?


dong ning

unread,
Nov 8, 2019, 12:59:27 AM11/8/19
to idtracker.ai users group
The video is example of 8 adult zebrafish (Danio rerio)
Message has been deleted

Francisco Romero

unread,
Nov 9, 2019, 6:43:22 AM11/9/19
to idtracker.ai users group
Hi Dong Ning,

Could you please tell me which version of idtracker.ai you have installed? With this parameters, the error I get is: "There is not part in the video where the 8 animals are visible. Try a different segmentation or check the number of animals in the video.". Which makes sense since the ROI that you have selected is too small and the animals never enter that ROI.

I would suggest that you use the GUI version to set the parameters. The terminal version is more dedicated to automatize the tracking after a good set of parameters is known for a given set of videos.

Hope this helps.

dong ning

unread,
Nov 11, 2019, 7:55:43 PM11/11/19
to idtracker.ai users group
Thank you for your help. The version is latest one, I will try again based on your opinion.
Message has been deleted

Ian Brettell

unread,
Feb 3, 2020, 11:11:28 AM2/3/20
to idtracker.ai users group
Hi Francisco,

I get this error too on idtrackerai v3.0.18-alpha with just:
idtrackerai terminal_mode --_video "/idtrackerai_video_example.avi" --exec track_video

I've attached a screenshot of the output including the error.

Best,

Ian
Screenshot 2020-02-03 at 16.10.08.png

Paco Romero

unread,
Feb 3, 2020, 12:57:09 PM2/3/20
to Ian Brettell, idtracker.ai users group
Dear Ian, 

Thanks for reporting this error. It turns out that the default value for the parameter _range was set to [0, 10]. The correct one for the example video is [0, 508]. 

This error was affecting another part of the code. When the tracking interval (the parameter _range) is 10 frames, there is only one global fragment. But in this video, the number of fragments is 9 (instead of 8) because there is a crossing fragment. So, the identities had to be assigned a bit more carefully. 

I've corrected both errors in the idtrackerai module and in the idtrackerai-app module. You should be able to get it working by upgrading both modules:

pip install idtrackerai[gui] --upgrade 
pip install idtrackerai-app --upgrade

Note that now the tracking will train the crossing detector and the identification network. So, it is best for the performance if tensorflow-gpu is installed. You can do so withe the command.

conda install tensorflow-gpu=1.13

Finally, I would advise using the *.json files to track from the terminal. This forces the user to open the GUI and check that the parameters are good for a given video. 

I hope this helps, 

Best, 
P.


Francisco Romero-Ferrero
PhD student at Collective Behaviour Lab, Champalimaud Research
Av. de Brasilia, Doca de Pedrouços
1400-038 Lisboa, Portugal


--
You received this message because you are subscribed to the Google Groups "idtracker.ai users group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idtrackerai_us...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/idtrackerai_users/7be3585e-03bf-4218-8aad-38115138168a%40googlegroups.com.

Margaret

unread,
Mar 8, 2021, 9:41:18 PM3/8/21
to idtracker.ai users group
Hello,

I am receiving a similar error, screenshot from the code attached.
I am tracing only 1 animal (mouse). The error is index 0 is out of bounds for axis 0 with size 0.

I am not using identities since there is no need for checking crossing etc. with only one blob.
But is my error still due to some parameter out of range?

Thank you for your help,
Margaret
Screenshot 2021-03-08 example error.jpg
Reply all
Reply to author
Forward
0 new messages