niki-stha's picture
Update README.md
dc6bb26
---
tags:
- yolov5
- yolo
- vision
- object-detection
- pytorch
library_name: yolov5
library_version: 7.0.6
inference: true
datasets:
- niki-stha/asl-detection-roboflow
model-index:
- name: niki-stha/asl-detection-yolov5
results:
- task:
type: object-detection
dataset:
type: niki-stha/asl-detection-roboflow
name: niki-stha/asl-detection-roboflow
split: validation
metrics:
- type: precision # since [email protected] is not available on hf.co/metrics
value: 0.9854910682105946 # min: 0.0 - max: 1.0
name: [email protected]
---
<div align="center">
<img width="640" alt="niki-stha/asl-detection-roboflow" src="https://datasets-server.huggingface.co/assets/niki-stha/asl-detection-roboflow/--/niki-stha--asl-detection-roboflow/train/54/image/image.jpg">
</div>
### How to use
- Install [yolov5](https://github.com/fcakyon/yolov5-pip):
```bash
pip install -U yolov5
```
- Load model and perform prediction:
```python
import yolov5
# load model
model = yolov5.load('niki-stha/asl-detection-yolov5')
# set model parameters
model.conf = 0.80 # NMS confidence threshold
model.iou = 0.45 # NMS IoU threshold
model.agnostic = False # NMS class-agnostic
model.multi_label = False # NMS multiple labels per box
model.max_det = 1000 # maximum number of detections per image
# set image
img = 'https://datasets-server.huggingface.co/assets/niki-stha/asl-detection-roboflow/--/niki-stha--asl-detection-roboflow/test/2/image/image.jpg'
# perform inference
results = model(img, size=640)
# inference with test time augmentation
results = model(img, augment=True)
# parse results
predictions = results.pred[0]
boxes = predictions[:, :4] # x1, y1, x2, y2
scores = predictions[:, 4]
categories = predictions[:, 5]
# show detection bounding boxes on image
results.show()
# save results into "results/" folder
results.save(save_dir='results/')
```
- Finetune the model on your custom dataset:
```bash
yolov5 train --data data.yaml --img 416 --batch 32 --weights keremberke/yolov5s-license-plate --epochs 10
```
**More models available at: [awesome-yolov5-models](https://github.com/keremberke/awesome-yolov5-models)**