Coder Social home page Coder Social logo

MobileNetv2 enchancement about pytorch-ssd HOT 5 OPEN

qfgaohao avatar qfgaohao commented on July 23, 2024
MobileNetv2 enchancement

from pytorch-ssd.

Comments (5)

qfgaohao avatar qfgaohao commented on July 23, 2024

Thanks @jinfagang . I had a brief look at your implementation. They are very impressive! I am happy to integrate. Have you got some benchmark results of your MobileNetv2 or SSD models? So we can quickly get started.

Btw, there is a hacky mobilenetV2 SSD Lite impl https://github.com/qfgaohao/pytorch-ssd/blob/squeezenet-ssd-lite/vision/ssd/mobilenet_v2_ssd_lite.py . The problem I am facing is that ONNX doesn't support Relu6 used in Mobilenetv2. I replaced it with Relu. Currently I am training MobileNetv2 Imagenet Models.

I assume the ONNX Relu6 problem will resolve over time.

from pytorch-ssd.

lucasjinreal avatar lucasjinreal commented on July 23, 2024

@qfgaohao That is the question, I just borrowed some codes from others, change it into pytorch 0.41 fully supported, but after I test it, just not got any results (seems the whole process of SSD was broken).
But the backends that MobilenetV2 works fine.

theoretically, mobilenetv2 should be faster than mobilenetv1 backend, at least should be more accurate.

Now that you already training MobileNetV2 on imagenet, I can help you training on other datasets.

I think ReLu6 should not be the problem, if ONNX not support it now, we can just skip it at now time, hopefully ONNX will support it in the near future

from pytorch-ssd.

qfgaohao avatar qfgaohao commented on July 23, 2024

Hi @jinfagang you are right, we can safely skip Relu6. I will merge the code next week. I will let you how it goes.

from pytorch-ssd.

lucasjinreal avatar lucasjinreal commented on July 23, 2024

@qfgaohao Sounds great! Waiting for you response!

from pytorch-ssd.

qfgaohao avatar qfgaohao commented on July 23, 2024

@jinfagang Sorry for the delay. I was occupied by an urgent project. Plz see the trained MobleNetV2 SSD-Lite model with mp 0.686. https://storage.googleapis.com/models-hao/mb2-ssd-lite-mp-0_686.pth .

I have merged the code into the master branch. Here is code is reproduce the model.

wget -P models https://storage.googleapis.com/models-hao/mb2-imagenet-71_8.pth
python train_ssd.py --dataset_type voc  --datasets ~/data/VOC0712/VOC2007 ~/data/VOC0712/VOC2012 --validation_dataset ~/data/VOC0712/test/VOC2007/ --net mb2-ssd-lite --base_net models/mb2-imagenet-71_8.pth  --scheduler cosine --lr 0.01 --t_max 200 --validation_epochs 5 --num_epochs 20

I haven't got a MobileNetV2 with Relu base net having a reasonable accuracy. So the above model is based on the original MobileNetV2. The pre-trained base net is from https://github.com/tonylins/pytorch-mobilenet-v2

from pytorch-ssd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.