umyelab / LabGym

Quantify user-defined behaviors.
GNU General Public License v3.0
64 stars 5 forks source link

issue about generate behavior examples: no pattern image #190

Closed yochiawu closed 1 month ago

yochiawu commented 1 month ago

Hi,

Thanks for your software!

When I generated the behavior examples, the program runs with the following information. But after it said the generation was completed, what I got is only one folder with all of the animation without pattern image. I am wondering is there anything wrong with that. Could you help me with this? Thanks a lot!

Preparation started... 2024-07-18 15:16:20.892583 The total categories of animals / objects in this Detector: ['mice'] The animals / objects of interest in this Detector: ['mice'] The inferencing framesize of this Detector: 480 Video fps: 30 The original video framesize: 720 X 1280 Preparation completed! Generating behavior examples... 2024-07-18 15:16:20.930974 Behavior example generation completed!

The setting is as following

a4ac51180ceafaca0bb0607199f1246a
yujiahu415 commented 1 month ago

Hi, This is weird because there are two mice in the video so there should be at lease two folders '0' and '1' for storing the behavior examples. Your settings seemed all good. And the console didn't output any error message. Can you run this video in the 'Analyze Behaviors' functional unit? You don't need to select any Categorizer, just track the mice and it will output an annotated video. And you can take a look at the annotated video to see how the detection and tracking works. And also, can you provide me more information, like what's your operating system, what's the python3 version, and what's the LabGym version. Thanks!

yochiawu commented 1 month ago

Sorry, I didn't express clearly. Yes, there are two folders '0' and '1' storing two behavior examples animation. However, I didn't find any pattern image. I am running the 'Analyze Behaviors' now. I am using Windows system, python3.10.7,LabGym2.4.5,detectron2 0.6,CUDA12.3

Thanks!

yujiahu415 commented 1 month ago

Great! Let me know how it goes. So you are using CUDA12.3? What is the PyTorch version you are using?

yochiawu commented 1 month ago

The output of 'Analyze Behaviors' looks great. It can recognize two different mice in the frame. Yes, my CUDA version is 12.3. But in the Pytorch website, I only find pytorch fits 12.1. The pytorch version is 2.3.1. And when I tested if the pytorch worked correctly, it said that the CUDA version is 12.1(but it can still use the GPU).

yujiahu415 commented 1 month ago

Thank you for the info! This is very helpful! I didn't know Detectron2 can work with torch2.3.1 on CUDA 12.3. Back to your issue, I have been working on a new version including bug fix and it will be ready by this weekend. I'll let you know when it's ready and you can try to see if you still have this issue. Thanks again!

yochiawu commented 1 month ago

Great! Thanks for your time and work!

yujiahu415 commented 1 month ago

Just had some thoughts on a possible cause of this issue: is there any special characters in the path to your videos (like in video name)? OpenCV can't write images to a path that contains non-English-letter strings.

yochiawu commented 1 month ago

Thanks a lot!! That's true! There is a special character in the video name. The pattern image appeared after I corrected it. Thanks again!