umyelab / LabGym

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

Generate Behavior Examples with interactive advance behavior kind #51

Closed NichtRichtig closed 10 months ago

NichtRichtig commented 1 year ago

Hi,

thank you for providing your software!

I got a issue when generating behavior examples with Interactive advance. I encountered the following problem: 2023-07-19 18:57:04.685398

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: 1080 X 1920 The resized video framesize: 270 X 480 Prepration completed! Generating behavior examples... 2023-07-19 18:57:05.109425 Traceback (most recent call last): File "C:\Users\pablo\AppData\Local\Programs\Python\Python39\Lib\site-packages\LabGym\gui_categorizers.py", line 586, in generate_data AAD.generate_data_interact_advance(background_free=self.background_free,skip_redundant=self.skip_redundant) File "C:\Users\pablo\AppData\Local\Programs\Python\Python39\Lib\site-packages\LabGym\analyzebehaviorsdetector.py", line 2023, in generate_data_interact_advance pattern_image=pattern_image=generate_patternimage_interact(self.background,self.animal_contours[animal_name][n],self.animal_other_contours[animal_name][n],inners=self.animal_inners[animal_name][n],other_inners=self.animal_other_inners[animal_name][n],std=self.std) File "C:\Users\pablo\AppData\Local\Programs\Python\Python39\Lib\site-packages\LabGym\tools.py", line 796, in generate_patternimage_interact if other_outline[0] is not None: IndexError: list index out of range

Therefore no behavior examples are generated at all. I used the following settings:

Behavior Kind: interactive Advance Video Resolution resized to : 270:480 Detection with custom Detector including one class (Mice) Number of animals: 5 Duration of behavior Example: 30 Frames Generate a pair of example every 15 frames

Do you know how to fix this issue or if I did anything wrong with my chosen settings?

Thank you in advance!

yujiahu415 commented 1 year ago

Hi,

This was caused by a bug. I have just fixed it and updated LabGym. Please update LabGym by 'python3 -m pip install --upgrade LabGym' and see if you still encounter the issue. Thanks!