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
    Replies
    1. YOLObile is a research project focused on developing a real-time object detection system specifically optimized for mobile devices. It builds upon the foundation of the YOLO (You Only Look Once) framework, which is renowned for its speed and accuracy in object detection.

      Image Processing Projects For Final Year


      Core Challenges and Solutions
      The primary challenge in deploying object detection models on mobile devices is balancing accuracy with speed and computational efficiency. YOLObile addresses this by:

      Compression: Employing a novel block-punched pruning scheme to significantly reduce the model size without compromising accuracy.
      Compilation Optimization: Leveraging compiler-assisted optimizations to enhance the model's performance on mobile hardware.
      Deep Learning Projects for Final Year Students

      GPU-CPU Collaboration: Exploiting the strengths of both GPU and CPU for efficient computation.

      Big Data Projects For Final Year Students

      Delete
  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 deploy your ML model as Fast API?

Another post starts with you beautiful people! Thank you all for showing so much interests in my last posts about object detection and recognition using YOLOv4. I was very happy to see many aspiring data scientists have learnt from my past three posts about using YOLOv4. Today I am going to share you all a new skill to learn. Most of you have seen my post about  deploying and consuming ML models as Flask API   where we have learnt to deploy and consume a keras model with Flask API  . In this post you are going to learn a new framework-  FastAPI to deploy your model as Rest API. After completing this post you will have a new industry standard skill. What is FastAPI? FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.6+ based on standard Python type hints. It is easy to learn, fast to code and ready for production . Yes, you heard it right! Flask is not meant to be used in production but with FastAPI you can use you...

Learn the fastest way to build data apps

Another post starts with you beautiful people! I hope you have enjoyed and learned something new from my previous three posts about machine learning model deployment. In one post we have learned  How to deploy a model as FastAPI?  I n the second post, we have learned  How to deploy a deep learning model as RestAPI ? and in the third post, we have also learned  How to scale your deep learning model API?   If you are following my blog posts, you have seen how easily you have transit yourselves from aspiring to a mature data scientist. In this new post, I am going to share a new framework-  Streamlit which will help you to easily create a beautiful app with Python only. I will show here how had I used the Streamlit framework to create an app for my YOLOv3 custom model. What is Streamlit? Streamlit’s open-source app framework is the easiest way for data scientists and machine learning engineers to create beautiful, performant apps in only a few hours!...

How can I make a simple ChatBot?

Another post starts with you beautiful people! It has been a long time of posting a new post. But my friends in this period I was not sitting  where I got a chance to work with chatbot and classification related machine learning problem. So in this post I am going to share all about chatbot- from where I have learned? What I have learned? And how can you build your first bot? Quite interesting right! Chatbot is a program that can conduct an intelligent conversation based on user's input. Since chatbot is a new thing to me also, I first searched- is there any Python library available to start with this? And like always Python has helped me this time also. There is a Python library available with name as  ChatterBot   which is nothing but a machine learning conversational dialog engine. And yes that is all I want to start my learning because I always prefer inbuilt Python library to start my learning journey and once I learn this then only I move ahead for another...