ssisyphustao / object-detection-knowledge-distillation Goto Github PK
View Code? Open in Web Editor NEWAn Object Detection Knowledge Distillation framework powered by pytorch, now having SSD and yolov5.
License: GNU General Public License v3.0
An Object Detection Knowledge Distillation framework powered by pytorch, now having SSD and yolov5.
License: GNU General Public License v3.0
can I use different dataset instead of VOC,please ?
Thanks for the awesome implementation.
I had a look at the losses and for the yolov5 implementation:
I wanted to ask if I am correct in pointing these out and if yes did you deliberately skipped these things?
Thanks
Hello,
Can you please explain how these values were computed?
MEANS = (127, 127, 127)
I tried to compute them by myself on the VOC2007+2012 dataset, and I obtained these values:
(115.78, 110.57, 102.41)
thank you
the hint loss is too small to work and this loss is close to zero after few epochs quickly
Dear @SsisyphusTao , thanks for starting this distillation approach with yolo v5.
I'm trying to run this on my computer, but I'm got this error: ModuleNotFoundError: No module named 'dcn_op_v2'.
I search on your others repositories, and I found the "Plugins for Pytorch & TensorRT". I've tried to install that, but I got another error: RuntimeError: Error compiling objects for extension.
Do you know how can I fix that?
Best regards,
https://github.com/SsisyphusTao/SSD-Knowledge-Distillation/blob/0597fbee635afcf0b8710ba3a9e40ab9f010aea5/nets/multibox_loss.py#L17-L23
F.mse_loss has reduction='mean' by default, but we should use reduction='sum' as for loss_l
https://github.com/SsisyphusTao/SSD-Knowledge-Distillation/blob/0597fbee635afcf0b8710ba3a9e40ab9f010aea5/nets/multibox_loss.py#L120
I think the next code corresponds to the formula from the article.
def bounded_regression_loss(Rs, Rt, gt, m, v=0.5):
loss = torch.sum(F.mse_loss(Rs, gt, reduction='none'), 1)
return torch.sum(loss * (loss + m > torch.sum(F.mse_loss(Rt, gt, reduction='none'), 1))) * v
Is there any reason why the mbv2 model take so much time to evaluate compared to the vgg model??
size mismatch for loc.0.weight: copying a param with shape torch.Size([16, 512, 3, 3]) from checkpoint, the shape in current model is torch.Size([16, 1024, 3, 3]).
size mismatch for loc.1.weight: copying a param with shape torch.Size([24, 1024, 3, 3]) from checkpoint, the shape in current model is torch.Size([24, 512, 3, 3]).
size mismatch for loc.2.weight: copying a param with shape torch.Size([24, 512, 3, 3]) from checkpoint, the shape in current model is torch.Size([24, 256, 3, 3]).
size mismatch for loc.4.weight: copying a param with shape torch.Size([16, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([24, 256, 3, 3]).
size mismatch for loc.4.bias: copying a param with shape torch.Size([16]) from checkpoint, the shape in current model is torch.Size([24]).
size mismatch for loc.5.weight: copying a param with shape torch.Size([16, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([24, 256, 3, 3]).
size mismatch for loc.5.bias: copying a param with shape torch.Size([16]) from checkpoint, the shape in current model is torch.Size([24]).
size mismatch for conf.0.weight: copying a param with shape torch.Size([84, 512, 3, 3]) from checkpoint, the shape in current model is torch.Size([84, 1024, 3, 3]).
size mismatch for conf.1.weight: copying a param with shape torch.Size([126, 1024, 3, 3]) from checkpoint, the shape in current model is torch.Size([126, 512, 3, 3]).
size mismatch for conf.2.weight: copying a param with shape torch.Size([126, 512, 3, 3]) from checkpoint, the shape in current model is torch.Size([126, 256, 3, 3]).
size mismatch for conf.4.weight: copying a param with shape torch.Size([84, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([126, 256, 3, 3]).
size mismatch for conf.4.bias: copying a param with shape torch.Size([84]) from checkpoint, the shape in current model is torch.Size([126]).
size mismatch for conf.5.weight: copying a param with shape torch.Size([84, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([126, 256, 3, 3]).
size mismatch for conf.5.bias: copying a param with shape torch.Size([84]) from checkpoint, the shape in current model is torch.Size([126]).
Hello,
Firstly, thank you very much for this great repository.
I am really interested to run your code on a video, where the teacher transfers his knowledge to the student. However, since I am running on a video, there are no ground truth data available like in VOC/COCO datasets. What would change in the loss if I only use information from the outputs of the student and the teacher? and how do you think this would affect the training?
Thank you very much for your help
你好,我在retinanet上复现这个方法的时候,出现显存不足的问题,想请问下对于节约显存代码上有什么技巧么
Hi,
I always got the run time error after I ran python eval.py mbv2 --trained_model=checkpoints/student_mbv2_500_3934.pth. Does anyone know how to solve this error? Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.