For this setup I have followed this original github repository- AlexeyAB/darknet . this repo is as same as original Darknet repo with additional Windows support. So don't forget to give a star to this repo as a token of our respect to the author. If you are reading my blog first time, then I recommend to read the Requirements section mentioned in this repo first.
Once your machine is ready with all requirements, next step is to install a compilation software- vcpkg which you can download from this link. Once you download the zip file, extract it, open command prompt with admin rights, navigate to the extracted vcpkg-master folder and run the following command-
Along with this new variable, add another variable VCPKG_DEFAULT_TRIPLET with following value-
Now we are ready for installing Darknet with this compilation software. Open Anaconda Poweshell Prompt with admin rights, navigate to the vcpkg-master folder by running following command:
cd $env:VCPKG_ROOT
After this run the following command:
.\vcpkg install pthreads opencv[ffmpeg]
Once you run above two commands, screen will look like below-
It will take some time to complete. Once this process is completed next step is to download the code from AlexeyAB/darknet. Once you downlaod the zip file from this repo, extract it and in the Anaconda Powershell Prompt navigate to the location of the darknet folder and run .\build.ps1 like below-
This command will install darknet repository once finishes. After this run following command:
Set-ExecutionPolicy -ExecutionPolicy Restricted and then when asked press A to exclude any restriction. Once this is done, you can navigate to the installed repository in your respective folder and see all installed files there. Now you need to copy the pretrained Yolo weights file in this location. You can download the weights from this link. After this we are ready to test the original YOLO system built on Darknet framework on our image.
To test any image you need to run following command in same Anaconda Powershell Prompt-
.\darknet.exe detector test cfg/coco.data cfg/yolov3.cfg yolov3.weights -thresh 0.25
Once this command finishes , it will ask you to enter the path of your test image. enter the full path and press enter-
Once you enter the image path and press enter, your input image will be opened in default photo viewer having bounding boxes and label. Also in server console accuracy of the prediction will be shown with each detected object-
That's amazing right. In this post we have successfully installed Darknet framework in our Windows machine and in my last post we have successfully setup the Python wrapper of Darknet. Now you are familiar with both ways. If you are working with a client who has Windows infrastructure like mine then this post will help you to deliver state of the art object detection model built on Yolo system. I recommend you to give some time to learn this framework and get your hands dirty by practicing it on different image dataset many times. In my next post I will share another my learnings. Till then Go chase your dreams, have an awesome day, make every second count and see you later in my next post.
ReplyDeleteThanks for sharing the information
python training institute in south delhi
python training institute in Noida
I was able to find good info from your blog posts.
ReplyDeleteUI Development Training in Bangalore
Reactjs Training in Bangalore
PHP Training in Bangalore
Python web development is quite in demand and a very good option for Python developers. In over the span of 25 years, Python has managed to reach a level that is high above others making it the fastest growing language.
ReplyDeleteBest Python Training Center in Delhi, India
Advanced Python Training Institute in Delhi
Advanced Python Training Institute in Noida
Good approach to install and use darknet. read detailed articles on machine learning here.
ReplyDeleteNumber onr Blockchain Training Course Bangalore
ReplyDeleteblockchain training bangalore
Blockchain Training Course Bangalore
Blockchain Course In Bangalore
Blockchain Course In Bangalore