This page describes the tutorial of yolo-v4, up to the inference of the famous dog.ipg. os uses windows. Also, because I am not good at English, I may be taking unnecessary steps. If you are interested, please go to https://github.com/AlexeyAB/darknet and go by yourself. dog.jpg ↓↓↓
It is assumed that basic things such as opencv and visual studio are done. If you haven't done it, check it out, the procedure is the same as up to v3.
Clone by typing the following command at the location where you want to build the darknet.
git clone https://github.com/AlexeyAB/darknet
Go to the build in the darknet folder you cloned earlier and do cmake. The code below.
cd build
cmake ..
If cmake doesn't recognize it as a command, start by doing cmake. cmake is easy, so do your best to build it.
There is a second darknet under the build folder, so it's in it
We will build these three using visual studio. I think there is a file with no_gpu, but I haven't touched it so I don't know what will happen. As you can guess from the name, it will switch to cpu (-_-;) I will do it with gpu, so I will do it as gpu.
Take darknet.sln as an example. You can do the other two in the same way. If you open darknet.sln with vs, you will see a screen like this. procedure
After doing the above, if darknet.exe is created under x64, it is successful.
The above is made. At this point, it's almost over.
Execute the following command in the x64 folder.
python darknet.py
This command infers the default dog.jpg. result You will get results like this. I haven't made a correspondence table, so it's only bbox. If you want to do another image, you can do it by editing darknet.py.
I want to let you learn, and I want to do this as well, so I will write if the number of articles does not increase when the learning is completed.
It was difficult because there were few articles in Japanese (; ^ _ ^ A) I want to be able to study properly. I'm not good at English, so it's barely made, so the credibility is tattered (laughs), but if you are interested, please go by yourself from github. I feel like I'm doing a lot of things I don't need. I'm sorry it's hard to read m (_ _ "m)
Recommended Posts