Skip to content

Commit

Permalink
added yolo object detection tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
x4nth055 committed Jan 29, 2020
1 parent 3647fcc commit e2ca474
Show file tree
Hide file tree
Showing 25 changed files with 1,967 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ This is a repository of all the tutorials of [The Python Code](https://www.thepy
- [How to Detect Contours in Images using OpenCV in Python](https://www.thepythoncode.com/article/contour-detection-opencv-python). ([code](machine-learning/contour-detection))
- [How to Recognize Optical Characters in Images in Python](https://www.thepythoncode.com/article/optical-character-recognition-pytesseract-python). ([code](machine-learning/optical-character-recognition))
- [How to Use K-Means Clustering for Image Segmentation using OpenCV in Python](https://www.thepythoncode.com/article/kmeans-for-image-segmentation-opencv-python). ([code](machine-learning/kmeans-image-segmentation))
- [How to Perform YOLO Object Detection using OpenCV and PyTorch in Python](https://www.thepythoncode.com/article/yolo-object-detection-with-opencv-and-pytorch-in-python). ([code](machine-learning/object-detection))
- [Building a Speech Emotion Recognizer using Scikit-learn](https://www.thepythoncode.com/article/building-a-speech-emotion-recognizer-using-sklearn). ([code](machine-learning/speech-emotion-recognition))
- [How to Convert Speech to Text in Python](https://www.thepythoncode.com/article/using-speech-recognition-to-convert-speech-to-text-python). ([code](machine-learning/speech-recognition))
- [Top 8 Python Libraries For Data Scientists and Machine Learning Engineers](https://www.thepythoncode.com/article/top-python-libraries-for-data-scientists).
Expand All @@ -44,7 +45,6 @@ This is a repository of all the tutorials of [The Python Code](https://www.thepy

- ### [General Python Topics](https://www.thepythoncode.com/topic/general-python-topics)
- [How to Make Facebook Messenger bot in Python](https://www.thepythoncode.com/article/make-bot-fbchat-python). ([code](general/messenger-bot))

- [How to Get Hardware and System Information in Python](https://www.thepythoncode.com/article/get-hardware-system-information-python). ([code](general/sys-info))
- [How to Control your Mouse in Python](https://www.thepythoncode.com/article/control-mouse-python). ([code](general/mouse-controller))
- [How to Control your Keyboard in Python](https://www.thepythoncode.com/article/control-keyboard-python). ([code](general/keyboard-controller))
Expand Down
20 changes: 20 additions & 0 deletions machine-learning/object-detection/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# [How to Perform YOLO Object Detection using OpenCV and PyTorch in Python](https://www.thepythoncode.com/article/yolo-object-detection-with-opencv-and-pytorch-in-python)
To run this:
- `pip3 install -r requirements.txt`
- Download the model weights and put them in `weights` folder.
- To generate a object detection image on `images/dog.jpg`:
```
python yolo_opencv.py images/dog.jpg
```
A new image `dog_yolo3.jpg` will appear which has the bounding boxes of different objects in the image.
- For live object detection:
```
python live_yolo_opencv.py
```
- If you want to read from a video file and make predictions:
```
python read_video.py video.avi
```
This will start detecting objects in that video, in the end, it'll save the resulting video to `output.avi`
- If you wish to use PyTorch for GPU acceleration, please install PyTorch CUDA [here](https://pytorch.org/get-started) and use `yolo.py` file.
- Feel free to edit the codes for your needs!
Loading

0 comments on commit e2ca474

Please sign in to comment.