diff --git a/README.md b/README.md index 94f3c43..cc533f4 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ All the models are implemented in pytorch or mxnet first, and export a weights f - `28 May 2020`. arcface LResNet50E-IR model from [deepinsight/insightface](https://github.com/deepinsight/insightface) implemented. We got 333fps on GTX1080. - `2 June 2020`. yolov3 and yolov3-spp migrated to TensorRT 7 API. The new yolov3 is using pytorch implementation [ultralytics/yolov3](https://github.com/ultralytics/yolov3), the yolov3 in branch `trt4` was using pytorch implementation [ayooshkathuria/pytorch-yolo-v3](https://github.com/ayooshkathuria/pytorch-yolo-v3). - `23 June 2020`. Update yolov5-s model according to [ultralytics/yolov5](https://github.com/ultralytics/yolov5)'s PANet updates on 22 June 2020. -- `6 July 2020`. Add yolov3-tiny, and got 333fps GTX1080. +- `6 July 2020`. Add yolov3-tiny, and got 333fps on GTX1080. ## Tutorials diff --git a/yolov3-spp/gen_wts.py b/yolov3-spp/gen_wts.py index 7604c77..e649413 100644 --- a/yolov3-spp/gen_wts.py +++ b/yolov3-spp/gen_wts.py @@ -5,7 +5,7 @@ from utils.utils import * model = Darknet('cfg/yolov3-spp.cfg', (416, 416)) weights = sys.argv[1] -dev = '1' +dev = '0' device = torch_utils.select_device(dev) model.load_state_dict(torch.load(weights, map_location=device)['model']) diff --git a/yolov3-tiny/gen_wts.py b/yolov3-tiny/gen_wts.py index 27ea15e..8776566 100644 --- a/yolov3-tiny/gen_wts.py +++ b/yolov3-tiny/gen_wts.py @@ -5,7 +5,7 @@ from utils.utils import * model = Darknet('cfg/yolov3-tiny.cfg', (608, 608)) weights = sys.argv[1] -dev = '0' +device = torch_utils.select_device('0') if weights.endswith('.pt'): # pytorch format model.load_state_dict(torch.load(weights, map_location=device)['model']) else: # darknet format diff --git a/yolov3/gen_wts.py b/yolov3/gen_wts.py index 640cbb1..87cffda 100644 --- a/yolov3/gen_wts.py +++ b/yolov3/gen_wts.py @@ -5,7 +5,7 @@ from utils.utils import * model = Darknet('cfg/yolov3.cfg', (608, 608)) weights = sys.argv[1] -dev = '0' +device = torch_utils.select_device('0') if weights.endswith('.pt'): # pytorch format model.load_state_dict(torch.load(weights, map_location=device)['model']) else: # darknet format diff --git a/yolov4/gen_wts.py b/yolov4/gen_wts.py index 35a1d31..55c0215 100644 --- a/yolov4/gen_wts.py +++ b/yolov4/gen_wts.py @@ -5,7 +5,7 @@ from utils.utils import * model = Darknet('cfg/yolov4.cfg', (608, 608)) weights = sys.argv[1] -dev = '0' +device = torch_utils.select_device('0') if weights.endswith('.pt'): # pytorch format model.load_state_dict(torch.load(weights, map_location=device)['model']) else: # darknet format