ultralytics / ultralytics

NEW - YOLOv8 🚀 in PyTorch > ONNX > OpenVINO > CoreML > TFLite
https://docs.ultralytics.com
GNU Affero General Public License v3.0
28.08k stars 5.58k forks source link

Can we use teacher and student models for training? #14580

Closed lhj5426 closed 1 month ago

lhj5426 commented 1 month ago

Search before asking

Question

Hello, after consulting with you last time, I have trained a nearly perfect model during this period. https://github.com/ultralytics/ultralytics/issues/14314

I have a question now. Previously, I used the S-precision model. Now, I want to use the higher precision X model for training. Can I use my already trained S model as a teacher model to train the X model? If so, how should I proceed? Starting from scratch to train the X model might take much more time, right? image

Is the X model significantly more precise than the S model? I have been training a comic recognition model, and I have now trained one that accurately recognizes the text positions in colored comics. I want to use the X model to retrain a model that can recognize text positions in both colored and black-and-white comics. Since I already have a highly accurate S model for recognizing colored comics, can I use this S model to teach the X model?

Additional

No response

lhj5426 commented 1 month ago

Can you provide an example code for reference? Thank you for your help.

Burhan-Q commented 1 month ago

While it might be feasible to accomplish this, there are no built in mechanisms for teacher-student model training. This would take effort for you or any individual to implement, and my recommendation is that you begin training the larger model while working on such an implementation, as if you're unable to make it work, you'd at least have a trained model in that time.