File size: 793 Bytes
1e9ea58 06af233 b76b76b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
---
license: mit
---
# gchar_models
This is a repository for models used by gchar.
All the models' resourced will be listed below.
## yolov5
All the models (with pattern of `yolov5*.pt`) from [ultralytics/yolov5](https://github.com/ultralytics/yolov5/tags) is placed at directory `yolov5`.
You can download the model files with the following python code
```python
import torch
from huggingface_hub import hf_hub_download
# attention to the side effect on matplotlib
# see: https://github.com/zhiqwang/yolov5-rt-stack/issues/467
from yolort.models import YOLOv5
model_file = hf_hub_download(
repo_id="narugo/gchar_models",
filename="yolov5/v6.0/yolov5s.pt"
)
model = YOLOv5.load_from_yolov5(model_file)
if torch.cuda.is_available():
model = model.cuda()
model.eval()
```
|