Hi,
I am trying to train a DINO Retail Object Detection using the fan_tiny backbone. I have successfully fine tuned fan_base and fan_small on our retail object dataset using the available trainable models from the NGC page .
Now, I want to see if I can reach similar/close accuracy using fan_tiny and get higher inference speed.
First, I could not find any retail object trainable model fan_tiny in NGC. Is there one I can use or is there none avaialble?
Since I could not find any trainable fan_tiny, I’ve started to run some knowledge distillation using our fine tuned fan_small as the teacher and Pre-trained DINO ImageNet weights fan_hybrid_tiny as the student.
At the moment, it is not converging at all.
Before I share my specs etc…, I just would like to know if that distillation is possible and if I am using the right student tiny model.
That’s the one I’ve used and I mentioned above. But it is not converging at all after 25 epochs and mAP on valid is staying close to 0.
Please have a look at the specs file and log outputs and let me know if you see anything wrong. There are a bunch of errors showing up. But the distillation is starting. There are just couple of epochs in the log but I went until 25 and it was the same.
yes but there is no fan_tiny pretrained model available. So the only solution to get a fan_tiny is either to train from scratch (but I don’t have enough data) or perform distillation. Am I correct?
I suggest you can run DINO training with your dataset and this fan_tiny pretained model. To check the result from DINO network. Not train from Retail Object Detection network.
model doesn’t have a pretrained_model_path, just a pretrained_backbone_path.
I’ve double checked in nvidia_tao_pytorch/cv/dino/config/model.py and anyway I am getting the error:
Error merging 'train_distill.yaml' with schema
Key 'pretrained_model_path' not in 'DINOModelConfig'
full_key: model.pretrained_model_path
reference_type=DINOModelConfig
object_type=DINOModelConfig
so I am not sure what you are suggesting when you said:
But change something as below.
?
Distillation is running at the moment with the following config but loss is pretty high and mAP really low.
Thanks, I managed to perform distillation from DINO fan_small to DINO fan_tiny…
mAP went from 0.80 to 0.56. Not sure if it’s because the tiny backbone is really less accurate or if the distillation process is not performant enough.
As mentioned above, you can run DINO training instead of using DINO-distillation training. Please run DINO training by using the fan_tiny pretrained model and your own dataset.
Actually I did it already and the results are not as great.
By doing DINO training I can’t benefit from the model pre-trained on Nvidia retail objects dataset.Nvidia dataset is much larger than mine.
Do you know if there is any plan to release a DINO retail object detection fan_tiny model?
Thanks
Unfortunately there is not model for fan_tiny.
For DINO training, please try to use another trainable https://catalog.ngc.nvidia.com/orgs/nvidia/teams/tao/models/pretrained_dino_coco/files?version=dino_gc_vit_tiny_trainable_v1.0 to do experiment. The backbone is gc_vit_tiny instead of fan_tiny.