Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
arunponnusamy authored Apr 12, 2020
1 parent e16dc4a commit 27f4a2c
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![Downloads](http://pepy.tech/badge/cvlib)](http://pepy.tech/project/cvlib) [![Gitter](https://badges.gitter.im/arunponnusamy/cvlib.svg)](https://gitter.im/arunponnusamy/cvlib?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![PyPI](https://img.shields.io/pypi/v/cvlib.svg?color=blue)](https://pypi.org/project/cvlib/)

# cvlib
A high level easy-to-use open source Computer Vision library for Python.
A simple, high level, easy-to-use open source Computer Vision library for Python.

## Installation

Expand Down Expand Up @@ -114,6 +114,22 @@ bbox, label, conf = cv.detect_common_objects(img, confidence=0.25, model='yolov3
```
Check out the [example](examples/object_detection_webcam_yolov3_tiny.py) to learn more.

### Custom trained YOLO weights
To run inference with custom trained YOLOv3 weights try the following
```
from cvlib.object_detection import YOLO
yolo = YOLO(weights, config, labels)
bbox, label, conf = yolo.detect_objects(img)
yolo.draw_bbox(img, bbox, label, conf)
```
To enable GPU
```
bbox, label, conf = yolo.detect_objects(img, enable_gpu=True)
```

Checkout the [example](examples/yolo_custom_weights_inference.py) to learn more.

### Sample output :

![](examples/images/object_detection_output.jpg)
Expand Down

0 comments on commit 27f4a2c

Please sign in to comment.