Upload 2 files
Browse files- README.md +44 -0
- yolov7-tiny.pt +3 -0
README.md
CHANGED
|
@@ -1,3 +1,47 @@
|
|
| 1 |
---
|
| 2 |
license: gpl-3.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: gpl-3.0
|
| 3 |
+
inference: false
|
| 4 |
+
tags:
|
| 5 |
+
- object-detection
|
| 6 |
+
- computer-vision
|
| 7 |
+
- yolov7
|
| 8 |
+
- pypi
|
| 9 |
+
datasets:
|
| 10 |
+
- detection-datasets/coco
|
| 11 |
---
|
| 12 |
+
|
| 13 |
+
### Installation
|
| 14 |
+
```
|
| 15 |
+
pip install yolov7detect
|
| 16 |
+
```
|
| 17 |
+
|
| 18 |
+
### Yolov7 Inference
|
| 19 |
+
```python
|
| 20 |
+
import yolov7
|
| 21 |
+
|
| 22 |
+
# load pretrained or custom model
|
| 23 |
+
model = yolov7.load('kadirnar/yolov7-tiny-v0.1')
|
| 24 |
+
|
| 25 |
+
# set model parameters
|
| 26 |
+
model.conf = 0.25 # NMS confidence threshold
|
| 27 |
+
model.iou = 0.45 # NMS IoU threshold
|
| 28 |
+
model.classes = None # (optional list) filter by class
|
| 29 |
+
|
| 30 |
+
# set image
|
| 31 |
+
imgs = 'inference/images'
|
| 32 |
+
|
| 33 |
+
# perform inference
|
| 34 |
+
results = model(imgs)
|
| 35 |
+
|
| 36 |
+
# inference with larger input size and test time augmentation
|
| 37 |
+
results = model(img, size=1280, augment=True)
|
| 38 |
+
|
| 39 |
+
# parse results
|
| 40 |
+
predictions = results.pred[0]
|
| 41 |
+
boxes = predictions[:, :4] # x1, y1, x2, y2
|
| 42 |
+
scores = predictions[:, 4]
|
| 43 |
+
categories = predictions[:, 5]
|
| 44 |
+
|
| 45 |
+
# show detection bounding boxes on image
|
| 46 |
+
results.show()
|
| 47 |
+
```
|
yolov7-tiny.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0fa1423606133c06362ec716029dade1169d5631e83195b75d8efa66d2ee0b77
|
| 3 |
+
size 12639769
|