umyelab / LabGym

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

Some questions about the training step #19

Closed gold90123 closed 1 year ago

gold90123 commented 1 year ago

I'm currently training the categorizers using the latest version 1.8 The program has know reach the 'augment training examples' stage, and it said that this process may take hours or days, especially my computer isn't very good, I use a laptop with R7-4800H + GTX 1650ti. Most importantly, I,m in a rush to create a model that can detect whether a pig is fighting or non-fighting.(No need to be very accurately) Therefore, I'm curious about the amount of data required for this task, and how long it would take to train the model with that amount of data. THANKS !!

yujiahu415 commented 1 year ago

100 pairs of behavior examples per behavior category should give you a model with decent accuracy. Some tricks to make the training faster: 1, make the Categorizer as simple as possible (first try to choose complex level 1 or 2 for Animation Analyzer and Pattern Recognizer; choose 8 or 16 for their input size). It might only take less than an hour to train such simple Categorizers. You may increase the complexity and input size if the accuracy of the model is not good, until satisfactorily. 2, choose less augmentation methods, you may skip ‘random shearing’ and ‘random rescaling’ as these two are less common. You may also skip ‘random deletion’ if the pig can always be detected during the analysis.

gold90123 commented 1 year ago

Thank you for sharing the helpful information on the training and augmentation methods, I'll try to implement these methods right away. Yesterday, the augmentation step took me an hour and a half, while the actual training step only took a few minutes. Thus, I'm really excited to try the new methods. I appreciate your hard work and prompt response. 👍🏼

yujiahu415 commented 1 year ago

My pleasure to help! Let me know if you have any other questions.

yujiahu415 commented 1 year ago

Just so you know, LabGym 1.9 is out! A new mask-RCNN based Detector function has been implemented and changing background / illumination in videos is no longer a problem for LabGym.