Code Monkey home page Code Monkey logo

pysimplegui-yolo's Introduction

PySimpleGUI openCV YOLO Deep Learning

SNAG-0360

YOLO May 21

Running the Demos

You will need to pip install openCV and PySimpleGUI

pip install opencv-python
pip install pysimplegui

Run any of the .py files in the top level directory:

yolo.py - single image processing
yolo_video.py Video display
yolo_video_with_webcam.py - webcam or file source. Option to write to hard drive

And you'll need the training data. It's 242 MB and too large for GitHub: https://www.dropbox.com/s/uf00d4ov6fmw0he/yolov3.weights?dl=1

Learn More

This code has an article associated with it that will step you through the code (minus GUI part).

https://www.pyimagesearch.com/2018/11/12/yolo-object-detection-with-opencv/

Acknowledgements

This software is provided by Dr. Adrian Rosebrock of the pyimagesearch organization. https://www.pyimagesearch.com

pysimplegui-yolo's People

Contributors

pysimplegui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pysimplegui-yolo's Issues

Custom dataset with own weights

Hello. Thank you for your amazing work with GUI. I'de like to use with this GUI my own weights from own dataset. Could you explain if I need to change code -> downloading from darknet (#56 net = cv2.dnn.readNetFromDarknet(configPath, weightsPath)) or I should only change the paths to my own classes and weights files/directories?
If I run "python yolo_video.py" I get the following error:

[INFO] loading YOLO from disk...
Traceback (most recent call last):
File "yolo_video.py", line 56, in
net = cv2.dnn.readNetFromDarknet(configPath, weightsPath)
cv2.error: OpenCV(4.1.2) C:\projects\opencv-python\opencv\modules\dnn\src\darknet\darknet_importer.cpp:214: error: (-212:Parsing error) Failed to parse NetParameter file: yolo-coco\yolov3.weights in function 'cv::dnn::dnn4_v20190902::readNetFromDarknet'

if I try to change the original weights from YOLO to my own as .h5 then I get:

[INFO] loading YOLO from disk...
Traceback (most recent call last):
File "yolo.py", line 65, in
net = cv2.dnn.readNet(configPath, weightsPath)
cv2.error: OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\dnn\src\darknet\darknet_io.cpp:712: error: (-213:The function/feature is not implemented) Transpose the weights (except for convolutional) is not implemented in function 'cv::dnn::darknet::ReadDarknetFromWeightsStream'

Thank you for your help!

Implementation on GPU

Hello!
Please tell me how to run this on GPU. I'm not able to configure GPU access. This code doesn't run on GPU (runs on CPU with low frame-rate). Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.