Jump to content

Real-Time Object Detection using YOLOv3 wrapper


smartee
 Share

Recommended Posts

copy the 3 files to \yolo\ but the ""Using autoyolo version:" & _AutoYolo3_GetVersion()" returns nothing and running the GUI example gets error "unable to use the DLL file".
I'm with a 1080 Ti.  Do I need to do anything other than decompress to a random folder and run in x64 ?

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

..so I run opencv_version.exe and got these errors:

The program can't start because MFPlat.DLL is missing from your computer. Try reinstalling the program to fix this problem. 
The program can't start because MF.dll is missing from your computer. Try reinstalling the program to fix this problem. 
The program can't start because MFReadWrite.dll is missing from your computer. Try reinstalling the program to fix this problem.

This error usually occurs when you are running on Windows N or Windows KN operating system, which does not include some media features required.
To install the required media features, follow the link and select your particular Windows system to install the required files. Once you complete the installation, this error should no longer appear.

Solution from: https://support.rockstargames.com/articles/204933118/How-to-Resolve-Dependency-MFREADWRITE-DLL-is-missing-Please-reinstall-the-game-errors-on-GTAV-for-PC

Edited by argumentum

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

oh hmm, and your project directory looks like this?

C:\projectdir\
│   autoyolo.dll
│   AutoYOLO3.au3
│   basic_example.au3
│   gui_example.au3
│   opencv_videoio_ffmpeg430_64.dll
│   opencv_world430.dll
│   people-2557408_1920.jpg
│   scooter-5180947_1920.jpg
│
└───yolo
        yolov3.cfg
        yolov3.txt
        yolov3.weights

 

Link to comment
Share on other sites

3 minutes ago, argumentum said:

..so I run opencv_version.exe and got these errors:

The program can't start because MFPlat.DLL is missing from your computer. Try reinstalling the program to fix this problem. 
The program can't start because MF.dll is missing from your computer. Try reinstalling the program to fix this problem. 
The program can't start because MFReadWrite.dll is missing from your computer. Try reinstalling the program to fix this problem.

 

What version of windows are you using?

Link to comment
Share on other sites

..so I click click the script in explorer and nothing, error, so I'm like, whaaaa !

If StringInStr(@AutoItExe, "\autoit3.exe") Then Exit ShellExecute( StringReplace(@AutoItExe, "\autoit3.exe", "\autoit3_x64.exe"), '"' & @ScriptFullPath & '"')

Add that to the examples in the next release, it'll save us from a scare :) 

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

  • 1 month later...
On 7/7/2020 at 12:36 AM, bazanski said:

Please tell me is it possible to create (or edit) a file yolov3.weights ?

In what program can I do this ?

Hi bazanski, you will find detailed instructions on training your own network with different datasets such as Pascal VOC and COCO on Joseph Redmon's site, https://pjreddie.com/darknet/yolo/ , using his darknet application like:

./darknet detector train cfg/coco.data cfg/yolov3.cfg darknet53.conv.74

If you want to use multiple gpus run:

./darknet detector train cfg/coco.data cfg/yolov3.cfg darknet53.conv.74 -gpus 0,1,2,3

If you want to stop and restart training from a checkpoint:

./darknet detector train cfg/coco.data cfg/yolov3.cfg backup/yolov3.backup -gpus 0,1,2,3

 

Link to comment
Share on other sites

  • 3 weeks later...

Thanks! I tried this and got it working.

I wanted to test auto cropping images with irfanview. It works great. I ran it on every images in a folder, then passed the array of size and location to irfanview cmd and had thumbs of all the objects generated. 

I have a question about the 3 yolo files, weights, cfg, and the classes i believe, the txt file. I went to the yolo website and seen I can get different weights and cfg files. Are these more object sets? Sorry if such a noob question, just exploring my options for existing weight files already made and if different objects can be detected with these weight files than the one you linked to. Looks like the class file here has 80 objects it can detect. 

I need to read more, but any direction you can point is helpful, thanks.

Link to comment
Share on other sites

Hi sloppyjoe, glad you got it working, it just might work with some other weights and config files you find laying about, give it a shot and let us know how it goes, here is the relevant part of the dll C source where the network is loaded:
 

    // Load the network
    Net net = readNetFromDarknet(modelConfiguration, modelWeights);

    net.setPreferableBackend(DNN_BACKEND_OPENCV);

    frame = GdiPlusBitmapToOpenCvMat(bmp);

    // Create a 4D blob from a frame.
    blobFromImage(frame, blob, 1 / 255.0, cvSize(inpWidth, inpHeight), Scalar(0, 0, 0), true, false);

    //Sets the input to the network
    net.setInput(blob);

    // Runs the forward pass to get output of the output layers
    vector<Mat> outs;
    net.forward(outs, getOutputsNames(net));

If you want to dive deeper and work with custom object classes I'd advise checking out his site and trying to utilize his darknet application to see if you can successfully train and test your network etc with his native tools. Also take a look at the sites I posted in the credits section above. I've only just started playing with these networks myself, I look forward to hearing of your adventures. Feel free to post back here or in General Help section with any follow ups, I'll chime in when I can and will be happy to share any code and resources to help you bridge the python and c dominated domain of ML with AutoIt. Good luck.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...