Skip to main content

YOLObile- a new state of the art Real-Time Object Detection model for Mobile Devices

 


Another post starts with you beautiful people!

Thanks for giving so many views on my previous post 👍.

I am glad to see my previous posts are helping people to use state of the art object detection and recognition deep learning model in their projects. If you are new to my blog, I recommend seeing once my previous posts, and you will not be disappointed if your goal is to learn applied computer vision free of cost. Continuing my journey of sharing knowledge in this post I am going to share with you a new state of the art framework for object detection on mobile devices- YOLObile 📱

There has been a trade-off between speed and the accuracy of object detections. For example, the state of the art, YOLOv4 model gives us a very accurate detection but its speed is slow if we want to use it on a mobile device. On the other hand, its lighter version YOLOv4-tiny works very fast on a mobile device but its accuracy reduces. For a detailed comparison of FPS vs mAP you can refer to the above diagram. Nowadays computer vision techniques are improving day by day due to hardware advancement and so using AI in mobile devices is a hot choice for every mobile app.

However, the current state-of-the-art object detection works are either accuracy-oriented using a large model but leading to high latency or speed-oriented using a lightweight model but sacrificing accuracy. To solve this problem respected authors [Yuxuan Cai, Hongjia Li, Geng Yuan, Wei Niu, Yanyu Li, Xulong Tang, Bin Ren, Yanzhi Wang] of this paper have introduced the YOLObile framework, a real-time object detection on mobile devices via compression-compilation co-design. 💥

As per the authors- A novel block-punched pruning scheme is proposed for any kernel size. To improve computational efficiency on mobile devices, a GPU-CPU collaborative scheme is adopted along with advanced compiler-assisted optimizations. Experimental results indicate that our pruning scheme achieves a 14x compression rate of YOLOv4 with 49.0 mAP. Under our YOLObile framework, we achieve 17 FPS inference speed using GPU on Samsung Galaxy S20. By incorporating our proposed GPU-CPU collaborative scheme, the inference speed is increased to 19.1 FPS and outperforms the original YOLOv4 by 5x speedup.

That's quite a solid approach right 💪. If I summarize their approach then I would say that their approach is basically unstructured weights pruning, with a bit of structure on top, where they group the weights in blocks of 4 channels and 8 filters (x32). This structure allows them to improve parallelism. One important point to know here is that unstructured sparsity is very difficult to parallelize compare to structured sparsity also it is hardware-specific.On the other hand, up to 93% of reduction in weight size without a real loss in accuracy is really tempting with this framework. 💝

I know after reading this all of you want to see the result of this new approach on any benchmark dataset💥 and the good news is that authors have recently released the weights (in PyTorch format) which you can download from this link 

From the download link, you will get two weights files of 245 MB size: best8x-514.pt and best14x-49.pt. These two weights are the output of the 8x and 14x pruning models. According to the authors- these models are trained on a server with eight NVIDIA RTX 2080Ti GPUs. The training methods are implemented using PyTorch API. The details of both weights are as below:-

I tested the MAP on coco 2017 dataset (80 classes) with image-size of 320, batch-size of 8, best8x-514 weights in my Windows 10 laptop having 6GB of NVIDIA GTX 1060 and results are as below-

For evaluating this framework, the authors used an off-the-shelf Samsung Galaxy S20 smart-phone, which has a Qualcomm Snapdragon 865 Octa-core CPU  and  a  Qualcomm  Adreno  650  GPU.  Each test ran on  50  different input frames  (images),  with the average speed results reported. The YOLObile is derived based onYOLOv4, with 320×320 input size, and train on the MS COCO dataset. They denote mAP as the Average Precision under IoU 0.5 threshold and AP@[.5:.95] as the Aver-age Precision under IoU from 0.5 to 0.95-

The above evaluation result is quite amazing right💥. A real-time object detection framework on mobile devices via compression-compilation co-design will definitely going to be a game-changer. I have uploaded the inference code in my github repository You can follow the same to test the new framework in your own system. Since this framework is quite new there are no open-source code is available for the training on a custom dataset but as soon as I found any one of the Darknet or TensorFlow implementation, I will share with you all. Till then Go chase your dreams, have an awesome day, make every second count, and see you later in my next post😇

 







 





Comments

  1. How can i update this to run with CUDA10.2 or 11.1?

    ReplyDelete
    Replies
    1. Are you facing any error while running the code with CUDA 10.2 or 11.1? If yes, please share the error log. I have tested with CUDA 10.0 and it's working.

      Delete
  2. Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your blog.
    Data Science
    Selenium
    ETL Testing
    AWS

    ReplyDelete
  3. LEARN DATA SCIENCE USING PYTHON

    This article is a great article that I have seen in my python programming career so far.
    hire python developers in US

    ReplyDelete
  4. data warehouse, I have read all the comments and suggestions posted by the visitors for this article are very fine,We will wait for your next article so only.Thanks!

    ReplyDelete
  5. Thanks for sharing the best information and suggestions, I love your content, and they are very nice and very useful to us. If you are looking for the best applied data science with python, then visit igmguru.com. I appreciate the work you have put into this.

    ReplyDelete
  6. Excellent Blog! I would Thanks for sharing this wonderful content. Its very useful to us.I gained many unknown information, the way you have clearly explained is really fantastic.keep posting such useful information.

    Data science is a quickly developing field. So, to get your data science certifications in R, Python, and SQL or learn Hadoop or Apache Spark, practice everything learn, every day.

    Why Get Certified as a Data Scientist?

    ReplyDelete

  7. Very informative blog! I am glad that I came across your article. I'm learning a lot from here. Keep us updated by sharing more such blogs.
    AWS Course in Chennai
    AWS Online Course
    AWS Course in Coimbatore

    ReplyDelete
  8. Thanks for sharing this article with us, it's very useful and clearly well-explained content.
    AWS Certification Course in Malaysia

    ReplyDelete
  9. Thanks for Share the Details of Amazon Web Services, AWS Training, AWS Courses, AWS Certifications Process and Understand the Clear Concept.

    AWS Training in Bangalore
    Best AWS Training Institutes in Bangalore
    Cloud Computing courses in Bangalore
    AWS course in Bangalore

    ReplyDelete
  10. Thanks you and excellent and good to see the best software training courses for freshers and experience candidates to upgade the next level in an Software Industries Technologies,
    Machine Learning Training in Bangalore
    Machine Learning Course in Bangalore
    Machine Learning Training Bangalore
    Machine Learning Course Bangalore

    ReplyDelete
  11. Thanks you and excellent and good to see the best software training courses for freshers and experience candidates to upgade the next level in an Software Industries Technologies,

    Python course in Bangalore
    Python Training in Bangalore
    Python Online Training in Bangalore
    python training institute in Bangalore

    ReplyDelete
  12. Really such an amazing blog with true words this was easily understand by beginners at all so keep going always regards by Technokryon

    best data science companies

    ReplyDelete
  13. This blog is very useful it includes very knowledgeable information. Thank you for sharing this blog with us. If anyone want to experience certificate in Bangalore can call at 9599119376 or can visit https://experiencecertificates.com/experience-certificate-provider-in-Hyderabad.html

    ReplyDelete
  14. I have read all the comments and suggestions posted by the visitors for this article are very fine, we will wait for your next article so only. Thanks!

    Complete MIS Training Course by Certified Institute in Delhi, NCR
    Core- Advanced Java Training Course in Delhi, NCR

    ReplyDelete
  15. Thanks for sharing the best information and suggestions, I love your content, and they are very nice and very useful to us.

    Complete 3D Max Training Institute in Delhi, NCR
    Get the Best Solidworks Training Institute in Delhi, NCR

    ReplyDelete
  16. "Nice Blog! such a informative things you are sharing ,I really liked your content. If you wanna know about ""Skillslash | Training with live industry experience that gets you hired
    "" go to Data Science Course"

    ReplyDelete
  17. Thank you for sharing such a useful article. It will be useful to those who are looking for knowledge. Continue to share your knowledge with others through posts like these, and keep posting on
    Data Engineering Services 
    Advanced Data Analytics Solutions

    ReplyDelete
  18. Great Post! Thanks for sharing. Keep sharing such information.

    Data Science Training in Noida

    ReplyDelete
  19. I Like to add one more important thing here, The Deep Learning Market is expected to be around US$ 25.50 Billion by 2025 at a CAGR of 42% in the given forecast period.

    ReplyDelete
  20. Very Helpful blog it is, you also make it amazing and an easy-to-read blog for the readers by adding proper information. It really helped me a lot in the field of Top 30 Data Analyst Interview Questions

    ReplyDelete
  21. thanks for sharing a valid information and a blog post .

    study In Germany

    ReplyDelete

  22. Hi dear,

    Thank you for this wonderful post. It is very informative and useful. I would like to share something here too.Loop of Words is an innovative digital marketing agency dedicated to enhancing your brand’s image and customer base. The latest tools, powerful strategies, and data-driven results are our power pillars to deliver the best results.



    digital marketing consulting services

    ReplyDelete
  23. THANKS FOR SHARING VALID INFORMATION AND A BLOG POST.


    STUDY IN GERMANY

    ReplyDelete
  24. thanks for sharing valid information and blog post.

    Study In Germany

    ReplyDelete
  25. thanks for sharing a valid information and a blog post ..



    Bachelor In Germany

    ReplyDelete
  26. thanks for sharing valid information and a blog post..

    Bachelor In germany

    ReplyDelete
  27. it’s very helpful useful thanks for your valuable information follow us
    Learn Data Science Online Course

    ReplyDelete
  28. I wholeheartedly congratulate the writer of this post for explaining the difficult concepts of data science in a simple and easy-to-understand manner. My only regret is that I didn’t read this post earlier. I have made many career decisions in my life after reading this, and have no regrets whatsoever to date.data science course training in faridabad

    ReplyDelete
  29. This comment has been removed by the author.

    ReplyDelete
  30. If you're looking for high-quality data science training in Gurgaon, look no further than APTRON. Our comprehensive program is designed to equip you with the knowledge and skills you need to succeed in this rapidly growing field. Here's what you can expect from our program:

    ReplyDelete
  31. Awesome blog with an pretty good content thanks for sharing this Custom ERP System

    ReplyDelete
  32. Are you looking for the best Data Science Training in Delhi? Look no further than APTRON Delhi! With its comprehensive and industry-focused curriculum, APTRON Delhi stands out as a leading institute for Data Science training. Whether you're a beginner or an experienced professional, APTRON Delhi offers the perfect platform to enhance your skills and thrive in the field of data science.

    ReplyDelete
  33. This comment has been removed by the author.

    ReplyDelete
  34. This comment has been removed by the author.

    ReplyDelete
  35. Are you considering a career in SAP and looking for the best SAP HANA Course in Delhi? Look no further! At ERP Training Delhi, we offer comprehensive and industry-focused SAP HANA training that will equip you with the skills and knowledge to excel in the ever-evolving world of enterprise resource planning (ERP).

    ReplyDelete
  36. The step-by-step tutorials and code snippets provided in this blog post make it easier for readers to implement data science techniques. Data Science Certification In Chennai

    ReplyDelete
  37. Computer vision Computer vision allows machines to interpret and understand visual inputs, giving them the power of sight. In this blog post we will explore how this artificial intelligence capability works and real-world applications across industries. Additionally, by showcasing the inner workings and wide-ranging uses of computer vision, this blog provides a comprehensive yet concise overview of this transformative technology.

    ReplyDelete
  38. APTRON's Python Institute in Gurgaon offers a tailored learning journey that equips you with the tools and knowledge needed to thrive in the ever-evolving field of technology. Offering a comprehensive platform to master the intricacies of Python programming.

    ReplyDelete

Post a Comment

Popular posts from this blog

How to install and compile YOLO v4 with GPU enable settings in Windows 10?

Another post starts with you beautiful people! Last year I had shared a post about  installing and compiling Darknet YOLOv3   in your Windows machine and also how to detect an object using  YOLOv3 with Keras . This year on April' 2020 the fourth generation of YOLO has arrived and since then I was curious to use this as soon as possible. Due to my project (built on YOLOv3 :)) work I could not find a chance to check this latest release. Today I got some relief and successfully able to install and compile YOLOv4 in my machine. In this post I am going to share a single shot way to do the same in your Windows 10 machine. If your machine does not have GPU then you can follow my  previous post  by just replacing YOLOv3 related files with YOLOv4 files. For GPU having Windows machine, follow my steps to avoid any issue while building the Darknet repository. My machine has following configurations: Windows 10 64 bit Intel Core i7 16 GB RAM NVIDIA GeForce GTX 1660 Ti Version 445.87

How to convert your YOLOv4 weights to TensorFlow 2.2.0?

Another post starts with you beautiful people! Thank you all for your overwhelming response in my last two posts about the YOLOv4. It is quite clear that my beloved aspiring data scientists are very much curious to learn state of the art computer vision technique but they were not able to achieve that due to the lack of proper guidance. Now they have learnt exact steps to use a state of the art object detection and recognition technique from my last two posts. If you are new to my blog and want to use YOLOv4 in your project then please follow below two links- How to install and compile Darknet code with GPU? How to train your custom data with YOLOv4? In my  last post we have trained our custom dataset to identify eight types of Indian classical dance forms. After the model training we have got the YOLOv4 specific weights file as 'yolo-obj_final.weights'. This YOLOv4 specific weight file cannot be used directly to either with OpenCV or with TensorFlow currently becau

How to use opencv-python with Darknet's YOLOv4?

Another post starts with you beautiful people 😊 Thank you all for messaging me your doubts about Darknet's YOLOv4. I am very happy to see in a very short amount of time my lovely aspiring data scientists have learned a state of the art object detection and recognition technique. If you are new to my blog and to computer vision then please check my following blog posts one by one- Setup Darknet's YOLOv4 Train custom dataset with YOLOv4 Create production-ready API of YOLOv4 model Create a web app for your YOLOv4 model Since now we have learned to use YOLOv4 built on Darknet's framework. In this post, I am going to share with you how can you use your trained YOLOv4 model with another awesome computer vision and machine learning software library-  OpenCV  and of course with Python 🐍. Yes, the Python wrapper of OpenCV library has just released it's latest version with support of YOLOv4 which you can install in your system using below command- pip install opencv-python --up