crossing_detector.model.pth cannot be opened

38 views
Skip to first unread message

Jonathan Aguinaga

unread,
Jul 26, 2024, 9:56:05 PM7/26/24
to idtracker.ai users group
Hello IdTracker.ai community,

I am new to IDtracker.ai so I apologize if this is an easy fix. Ive scrolled through previous threads and havent seen anything about it. 

I am attempting to process 8 videos that were recorded on the same day. Trials were 30 minutes long recorded at 60 frames per second (~108,000 frames). Per the documentation, I can set the video_paths parameter equal to the file paths of each one of these videos in a concatenated manner (see .TOML and log for example). 

After I load the .TOML file into the Idtracker.ai GUI, I begin to mask the arena to exclude items or objects outside the region of interest. I define a few more polygons to finalize the ROI for tracking the focal fish. I then adjust my sliders to get the blob sizes just right.

One caveat is that my animals are manually released. So every so often, you will see me or my assitant in frame releasing the subjects. In these moments, there are more blobs than animals (6). Segmentation happens fairly quickly (~55 minutes) while working on 8 cores in parallel. 

As it begins to create the convulted neural network and initiate training, it states that it is overfitting and then saves the crossing_detector_model.pth. Then, there is that critical runtime error that says it cannot be opened. I do verify that the crossing_detector folder does not have the model.pth file in there. 

Any idea what I am doing wrong? Thank you very much.

best fishes,
Jon



idtrackerai.log
2024-06-25 15-06-58.toml

idtrackerai

unread,
Aug 15, 2024, 5:55:12 AM8/15/24
to idtracker.ai users group
Hi Jon,

Sorry for the late reply. Your workflow seems fine to me. I would encourage you to set tracking intervals so that you skip the frames where you release the subjects to avoid non-animal blobs.

Regarding the error, it seems Pytorch can't write the model file in disk, and it doesn't provide any meaningful message. Could you try to give the session a short name? Maybe there are characters in the default session name that make the path not valid. Also, could you check the files that appear in the session folder? Are there any?

Thanks for your feedback,
Jordi

Jonathan Aguinaga

unread,
Aug 23, 2024, 3:21:38 PM8/23/24
to idtracker.ai users group
Hi Jordi,

Thank you! I have taken your advice and have excluded the frames where me and my assistant release the subjects. 

There are files located in the session folder (accumulation, id_images, preprocessing, and trajectories). A new test I ran had a short session name, and everything worked appropriately. Though the tracking did not complete because 45/760,000 frames had more blobs than animals. 

best,
Jon

idtrackerai

unread,
Aug 29, 2024, 10:59:29 AM8/29/24
to idtracker.ai users group
Good to hear that!

Something was wrong in the session name, then.

Jordi
Reply all
Reply to author
Forward
0 new messages