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-
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-
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 because in the latest release of YOLO a new activation function-Mish is introduced. With current version of OpenCV and TF using YOLOv4 directly is not possible. In this blog post I am going to share you my jupyter notebook code for converting YOLOv4 weights to TF2.2.0.
TensorFlow(TF) is an easy to use framework in production. If we have a TF model we can deploy it in a web application, mobile application or embedded devices. Since I am a Keras guy, I prefer to use Keras API with TensorFlow backend in my projects :) . I have taken the help from the older post of Jason Brownlee PhD and modified the code with YOLOv4 related changes. You can fork or download the notebook from my github repository You can gone through the notebook and if you want to update or add any thing to it, send me a PR in github :)
In the first cell of the notebook I have imported required libraries and also checking the TF and Keras version-
So we have the latest keras and TF version currently available in colab notebook. In next cell, I have defined the newly added activation function Mish as below-
And in third cell, this activation function is added to the convolution layer blocks-
In further cells, I have defined the YOLOv4 architecture as per keras & TF and then other helper functions like drawing bounding boxes, removing unwanted bounding boxes and showing the detecting in an image. Let me show you the screenshots where I have converted a pretrained YOLOv4 weights to a TF model file-
After running above cells you will have a .h5 format file which is infact a TensorFlow model file. Now we will verify that our converted model file is working same as YOLOv4 weights or not. To do so let's import this TensorFlow model file-
With this code our .h5 file is successfully loaded as keras model. Let's define a list of objects on which original YOLOv4 weights was trained and also a function to read those object labels-
Next step is to define a function to load and preprocess an image for keras-
Let's apply this preprocessing function to an image in this way-
Next, we will use the predict() function to make the prediction on our image-
As a last step we will draw the bounding boxes and predicted object on that bounding boxes in our picture. All required processing for this step is already done in the notebook.Once we run the following cell-
Along with predicted object with accuracy, it will give you following like image-
The above image and result confirms that our conversion code is working as expected. That's it for today guys! Go ahead- Fork or download the complete notebook from my github repo, try it yourself, explore it with your custom YOLOv4 weights file and see how can you make this notebook more useful. In my next blog post I will share my new learning 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.
So we have the latest keras and TF version currently available in colab notebook. In next cell, I have defined the newly added activation function Mish as below-
And in third cell, this activation function is added to the convolution layer blocks-
In further cells, I have defined the YOLOv4 architecture as per keras & TF and then other helper functions like drawing bounding boxes, removing unwanted bounding boxes and showing the detecting in an image. Let me show you the screenshots where I have converted a pretrained YOLOv4 weights to a TF model file-
After running above cells you will have a .h5 format file which is infact a TensorFlow model file. Now we will verify that our converted model file is working same as YOLOv4 weights or not. To do so let's import this TensorFlow model file-
With this code our .h5 file is successfully loaded as keras model. Let's define a list of objects on which original YOLOv4 weights was trained and also a function to read those object labels-
Next step is to define a function to load and preprocess an image for keras-
Let's apply this preprocessing function to an image in this way-
Next, we will use the predict() function to make the prediction on our image-
As a last step we will draw the bounding boxes and predicted object on that bounding boxes in our picture. All required processing for this step is already done in the notebook.Once we run the following cell-
Along with predicted object with accuracy, it will give you following like image-
The above image and result confirms that our conversion code is working as expected. That's it for today guys! Go ahead- Fork or download the complete notebook from my github repo, try it yourself, explore it with your custom YOLOv4 weights file and see how can you make this notebook more useful. In my next blog post I will share my new learning 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.
Nice post. Check this Certified Machine Learning Professional
ReplyDeleteI have bookmarked your site since this site contains significant data in it. You rock for keeping incredible stuff. I am a lot of appreciative of this site.
ReplyDeletemasters in data science
This content of information has helped me a lot. It is very well explained and easy to understand.
ReplyDeleteThanks For Sharing this Interesting Blog. it is really helpful blog. carry on. keep blogging. otherwise anyone wants to learn CREO training Course so, Contact here- +91-9311002620 or visit website- https://www.htsindia.com/Courses/cad-cam-cae/creo-for-industrial-designers-training-course
ReplyDeleteearn money online 2020,
ReplyDeletedark web earn money from dark web,darknet financial vendors reviews,deep web website reviews,dark web skrill transfer,dark web links,tor onion links,how to buy credit cards,dark web paypal transfer,paypal transfer dark web,deep web darkweb market,deepweb,dark web,dark web market,darkweb paypal,darkweb credit card,dark web cards,darkweb western union,dark web money transfer,buying cards from dark web,deep web credit card,deepweb sites.
A
ReplyDeletedarknet market is a commercial website on the web that operates via darknets such as Tor or ... Many vendors list their wares on multiple markets, ensuring they retain their reputation even should a single ... Cyber crime and hacking services for financial institutions and banks have also been offered over the dark web.
Amazing blog.Thanks for sharing such excellent information with us. keep sharing...
ReplyDeletedata analytics courses delhi
A really good post man, very thankful and hopeful that you will write many more posts like this one.
ReplyDeleteAt this cell of the code I face the following problem please if anyone can solve this problem ASAP let me know.
ReplyDelete# Verifiy the saved model using keras
# Load the model
from keras.models import load_model, Model
#yolo_model = load_model("yolov4.h5")
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
in ()
3 import keras
4 from keras.models import load_model, Model
----> 5 yolo_model = load_model("yolov4.h5")
17 frames
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/utils/generic_utils.py in class_and_config_for_serialized_keras_object(config, module_objects, custom_objects, printable_module_name)
294 cls = get_registered_object(class_name, custom_objects, module_objects)
295 if cls is None:
--> 296 raise ValueError('Unknown ' + printable_module_name + ': ' + class_name)
297
298 cls_config = config['config']
ValueError: Unknown activation function: Mish
'Mish' activation function is added in YOLOv4 version and it seems somehow keras/TF is using older OpenCV internally . So you need to build and compile the latest OpenCV in your system.
DeleteAt this cell of the code I face the following problem please if anyone can solve this problem ASAP let me know.
ReplyDelete# Verifiy the saved model using keras
# Load the model
from keras.models import load_model, Model
yolo_model = load_model("yolov4.h5")
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
in ()
3 import keras
4 from keras.models import load_model, Model
----> 5 yolo_model = load_model("yolov4.h5")
17 frames
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/utils/generic_utils.py in class_and_config_for_serialized_keras_object(config, module_objects, custom_objects, printable_module_name)
294 cls = get_registered_object(class_name, custom_objects, module_objects)
295 if cls is None:
--> 296 raise ValueError('Unknown ' + printable_module_name + ': ' + class_name)
297
298 cls_config = config['config']
ValueError: Unknown activation function: Mish
'Mish' activation function is added in YOLOv4 version and it seems somehow keras/TF is using older OpenCV internally . So you need to build and compile the latest OpenCV in your system or update the keras/TF to the latest.
DeleteCan you please explain how ?
DeleteVery nice blog. I really enjoyed it. I appreciated your effort in this blog. This is useful for more people who are looking for data science. Big thumbs up for sharing this blog.
ReplyDeleteData Science Course in Hyderabad
This article is a creative one and the concept is good to enhance our knowledge. Waiting for more updates
ReplyDeleteCourses on Artificial Intelligence
Thanks this article gives more information on data science fundamentals
ReplyDeleteVisit us: Data Science Course in bhubaneshwar
Visit us: Data Science Course in bhubaneshwar
Visit us: Data Science Course in dehradun
Visit us: Data Science Course in durgapur
Visit us: Data Science Course in dombivli
Thanks this article give more information on data science fundamentals. Visit us: Data Science Course in bhubaneshwar
ReplyDeleteVisit us: Data Science Course in bhubaneshwar
Visit us: Data Science Course in dehradun
Visit us: Data Science Course in dombivli
Visit us: Data Science Course in durgapur
I really enjoy the blog article.Much thanks again.
ReplyDeleteMuleSoft training
python training
Angular js training
selenium trainings
sql server dba training
ReplyDeleteTORONTO An Iranian
Would-be medical exec from Iran barred from Canada over alleged ties to Tehran's nuclear program. Ramin Fallah was labeled a security threat because he ...
You've visited this page many times. Last visit: 5/12/21
Thanks For Sharing this Interesting Blog. it is really helpful blog.
ReplyDeleteFor Online MBA check below.
Innomatics Research Labs is collaborated with JAIN (Deemed-to-be University) and offering the Online MBA in Business Intelligence,Business Analytics Program. This two-year program from JAIN (deemed-to-be) University offers foundation courses, core courses, Specialization courses, and a comprehensive master thesis intermediary, apart from an option to pursue a cross-functional and open elective.
Online MBA in Business Analytics
Online MBA in Business Intelligence
Thanks for sharing the blog. It is quite knowledgeable.For best data science course visit 360digitmg
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThanks for sharing the article it was very helpful
ReplyDeleteFor data science certification courses please get in touch with 360DigiTMG team
Data Science Course in Ireland
This comment has been removed by the author.
ReplyDeleteData Science Institute in Gurgaon
ReplyDeleteis known to provide its students with some of the best available content in the form of a Data Science Course in Gurgaon .
nice post.
ReplyDeleteP0wer bi onlinetraining from india
P0wer bi onlinetraining
Thanks for sharing the awesome article about Python. I hope you will keep it up.
ReplyDelete"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""
ReplyDeletego to Data Science Course"
"Thank you very much for your information.
ReplyDeleteFrom,
"
artificial intelligence course aurangabad
It is very useful for me. Thanks...
ReplyDeleteAzure Databricks Online Training
Azure Databricks Online Training
ReplyDeleteEthical Hacking Training Course in Gurgaon
Data Science Course in Delhi
ReplyDelete
ReplyDeleteData Science Training in Noida
Data Science Course in Noida
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThanks For sharing. Especia Associates provide outsourcing Accounting Services. Finance and Accounting outsourcing service for measuring the Return on Investment(ROI) on every step you have taken, to make sure of your increased profits. A decision in haste might be working well short term but often have long term staggering consequences. Accounting and Bookkeeping services team to provide you the daily input of company records from a time-to-time basis. Enriching you with the ongoing market and whereabouts of the places to strike or back down as necessary. if you need Accounting Services call at 9310165114 or visit us Outsourcing Accounting
ReplyDeletewow! very nice article. who want to learn online courses. visit:Online Courses with Certificates
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeletedata science course
ReplyDeleteData Science Training Institute in Noida
ReplyDelete
ReplyDeleteData Science Training in Noida
ReplyDeleteVery Informative and creative contents. This concept is a good way to enhance the knowledge. thanks for sharing.
Continue to share your knowledge through articles like these, and keep posting more blogs. Web Scraping Services in USA
ReplyDeleteData Science Course in Noida
Thank you for sharing an amazing & wonderful blog. This content is very useful, informative and valuable in order to enhance knowledge. Keep sharing this type of content with us & keep updating us with new blogs. Apart from this, if anyone who wants to join the Python Base training institute in Delhi, can contact 9311002620 or visit our website-
ReplyDeletehttps://www.htsindia.com/Courses/python/python-training-institute-in-delhi
Thank you so much for this article. I have one doubt that while loading the keras (.h5) model it's showing error for "ValueError: Unknown activation function: Mish." Kindly help and can connect on Linkedin : https://www.linkedin.com/in/praket-sanganeria-4ba508190/
ReplyDeleteThank you sharing information, How to install and compile Darknet code.
ReplyDeleteI am doing BCA with AI & Data Science.
I found one successful example of this truth through this blog. I am going to use such information now.
ReplyDeleteBest Online Coding Classes Near me
A good communication skill is really important everyone should know. When it comes to good communication skills, a person should be good at speaking english. But many people face issues in speaking English fluently, for which they take online spoken english classes to improve their English speaking skills.
ReplyDeletehttps://onlinetuitionclassesadda.blogspot.com/2023/01/benefits-of-spoken-english-classes.html
Benefits of Spoken English classes
it’s very helpful useful thanks for your valuable information follow us
ReplyDeleteData Science Online Training in Hyderabad
such a nice information thanks for sharing and keep post like this kind posts. Also, check this Data Science course in Bangalore with placements to start a career in Data Science.
ReplyDeleteI have a weird history with mercari. But its past me now. I've written all about it on my blog with PayPal and Mercari.
ReplyDeleteLooking for reliable accounting software solutions in Surat to elevate your financial management game? Look no further! Discover a range of cutting-edge accounting software options designed to meet the unique needs of businesses in Surat.
ReplyDeleteBalıkesir
ReplyDeleteBursa
Mersin
Konya
Van
0JB1L
Advanced topics in Data Analytics at APTRON offer an exciting opportunity for individuals looking to deepen their understanding of this dynamic field. In today's data-driven world, the demand for skilled data analysts is skyrocketing, and APTRON is at the forefront of providing cutting-edge education in this domain.
ReplyDeletegörüntülüshow
ReplyDeleteücretli show
XU0KU
https://titandijital.com.tr/
ReplyDeletemersin parça eşya taşıma
osmaniye parça eşya taşıma
kırklareli parça eşya taşıma
tokat parça eşya taşıma
OADO6G
https://titandijital.com.tr/
ReplyDeleteafyon parça eşya taşıma
düzce parça eşya taşıma
erzincan parça eşya taşıma
elazığ parça eşya taşıma
6URPX
antep evden eve nakliyat
ReplyDeletebolu evden eve nakliyat
afyon evden eve nakliyat
tekirdağ evden eve nakliyat
artvin evden eve nakliyat
X54FT
hakkari evden eve nakliyat
ReplyDeleteankara evden eve nakliyat
muğla evden eve nakliyat
elazığ evden eve nakliyat
erzurum evden eve nakliyat
1EN3
istanbul evden eve nakliyat
ReplyDeletebalıkesir evden eve nakliyat
şırnak evden eve nakliyat
kocaeli evden eve nakliyat
bayburt evden eve nakliyat
7VE
0DA9D
ReplyDeleteAdana Lojistik
Aksaray Parça Eşya Taşıma
Bingöl Parça Eşya Taşıma
Maraş Parça Eşya Taşıma
Ağrı Evden Eve Nakliyat
3EACB
ReplyDeleteBilecik Lojistik
Ankara Lojistik
Bingöl Lojistik
Konya Lojistik
Kars Parça Eşya Taşıma
06EE2
ReplyDeleteKastamonu Evden Eve Nakliyat
Ardahan Evden Eve Nakliyat
buy sarms
order testosterone propionat
Eskişehir Evden Eve Nakliyat
İzmir Evden Eve Nakliyat
Bilecik Evden Eve Nakliyat
masteron
Isparta Evden Eve Nakliyat
D245D
ReplyDeleteÜnye Evden Eve Nakliyat
Ankara Asansör Tamiri
buy anapolon oxymetholone
steroids for sale
Erzincan Evden Eve Nakliyat
clenbuterol for sale
sarms for sale
Eryaman Alkollü Mekanlar
Bartın Evden Eve Nakliyat
If you're looking to embark on a transformative journey into the world of programming, Python Training in Gurgaon at APTRON offers an unparalleled learning experience. Python has become a cornerstone in the tech industry, and mastering this versatile language opens doors to a myriad of opportunities.
ReplyDeleteC1A8A
ReplyDeletereferans kodu
A07F9
ReplyDeletesesli sohbet sesli chat
canlı sohbet sitesi
afyon sohbet sitesi
Antep En İyi Sesli Sohbet Uygulamaları
Kastamonu Mobil Sesli Sohbet
parasız görüntülü sohbet uygulamaları
mobil sohbet
düzce görüntülü sohbet kadınlarla
artvin görüntülü sohbet odaları
771BA
ReplyDeletetelefonda görüntülü sohbet
Adana Bedava Görüntülü Sohbet Sitesi
antep kadınlarla görüntülü sohbet
canlı sohbet ücretsiz
trabzon rastgele görüntülü sohbet uygulaması
kızlarla canlı sohbet
sesli sohbet uygulamaları
yalova sohbet muhabbet
Erzurum Kadınlarla Sohbet Et
40AC1
ReplyDeleteSui Coin Hangi Borsada
Bitcoin Nedir
Bitcoin Üretme
Bitcoin Oynama
Kripto Para Çıkarma Siteleri
Paribu Borsası Güvenilir mi
Tesla Coin Hangi Borsada
Tumblr Takipçi Satın Al
Anc Coin Hangi Borsada
Thanks for sharing this information. Say goodbye to tedious manual calculations and embrace the ease of automated financial tracking. Our accounting software in Surat ensures accuracy and compliance, allowing you to focus on growing your business. Whether you're a small business or a large enterprise, our user-friendly interface makes financial management a breeze.
ReplyDeleteF09B6
ReplyDeleteReferans Kimliği Nedir
Onlyfans Takipçi Satın Al
Xcn Coin Hangi Borsada
Bitcoin Çıkarma Siteleri
Bitcoin Kazanma Siteleri
Kripto Para Nasıl Alınır
Sweat Coin Hangi Borsada
Binance Referans Kodu
Twitter Beğeni Hilesi
Your Post Proved to be very helpful thank you for sharing ..
ReplyDeleteCheck Out The Best Short-Term Computer Courses After 12th Class
Please check out this new video about dark web money
ReplyDeleteCool and that i have a neat supply: What Does A Full House Renovation Cost split level home kitchen remodel
ReplyDeleteشركة مكافحة الفئران بالدمام VeK27U1k57
ReplyDeleteشركة مكافحة الفئران بالاحساء Qwr9TJP8zk
ReplyDeleteشركة تنظيف بيوت بالدمام IqwskkrxUs
ReplyDelete