- Best AI Text Generators for High Quality Content Writing
- Tensorflow Error on Macbook M1 Pro - NotFoundError: Graph execution error
- How does GPT-like transformers utilize only the decoder to do sequence generation?
- How to set all tensors to cuda device?
- How should I use torch.compile properly?
- How do I check if PyTorch is using the GPU?
- WARNING:tensorflow:Using a while_loop for converting cause there is no registered converter for this op
- How to use OneCycleLR?
- Error in Python script "Expected 2D array, got 1D array instead:"?
- How to save model in .pb format and then load it for inference in Tensorflow?
- Top 6 AI Logo Generator Up Until Now- Smarter Than Midjourney
- Best 9 AI Story Generator Tools
- The Top 6 AI Voice Generator Tools
- Best AI Low Code/No Code Tools for Rapid Application Development
- YOLOV8 how does it handle different image sizes
- Best AI Tools For Email Writing & Assistants
- 8 Data Science Competition Platforms Beyond Kaggle
- Data Analysis Books that You Can Buy
- Robotics Books that You Can Buy
- Data Visualization Books that You can Buy
How to train new classes on pretrained yolov4 model in darknet
The conventional way to train new classes on the pretrained YOLO4 model in Darknet is by implementing each classifier with its corresponding weights. Thus, the conventional way sets the Weight attribute on the IO connector for this new class.
One need to configure different yolov4 models according to different input_targets of new classes, do not erase old configurations of old models, keep original configuration of new class models for share parameters.
How to train new classes on pretrained yolov4 model in darknet
Solution 1:
You can't insert new classes in a trained model. When you trained using only the fire and smoke dataset, your config were not configured for 2 classes, but for 5 instead. Probably it's why you didn't get anything in your second test.
The model does not forget, but uses that weight as a head start for your new model. Just train again with a dataset containing all categories labelled.
Solution 2:
From the procedure that YOLO follows in training, any further training will enhance and modify the currently layers, so if you added new classes and retrained, you will enhance the exiting one and create new classes from scratch, which means not all classes will be the same during detection. I think the safest way is to train all from scratch.
Thank you for reading the article.