Skip to content

Commit e18ca00

Browse files
authored
update mmdet, mmcv, yolov5 version in ci (#303)
* update mmdet, mmcv, yolov5 version in ci * update versions in package testing * update default device for yolov5 * update default device for yolov5 * reformat with black * update default device in tests * update mmdc to 1.4.0 * update mmcv to 1.4.0
1 parent 068b0c2 commit e18ca00

File tree

5 files changed

+22
-22
lines changed

5 files changed

+22
-22
lines changed

.github/workflows/ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ jobs:
6767
if: matrix.operating-system == 'macos-latest'
6868
run: pip install torch==1.10.0 torchvision==0.11.1
6969

70-
- name: Install MMDetection(2.18.0), YOLOv5(6.0.4) and Norfair(0.3.1)
70+
- name: Install MMDetection(2.19.0), YOLOv5(6.0.6) and Norfair(0.3.1)
7171
run: >
72-
pip install mmcv-full==1.3.17 mmdet==2.18.0 yolov5==6.0.4 norfair==0.3.1
72+
pip install mmcv-full==1.4.0 mmdet==2.19.0 yolov5==6.0.6 norfair==0.3.1
7373
7474
- name: Lint with flake8, black and isort
7575
run: |
@@ -90,7 +90,7 @@ jobs:
9090
run: >
9191
pip install -e .
9292
93-
- name: Test SAHI CLI for MMDetection(2.17.0), YOLOv5(6.0.4) and Norfair(0.3.1)
93+
- name: Test SAHI CLI for MMDetection(2.19.0), YOLOv5(6.0.6) and Norfair(0.3.1)
9494
run: |
9595
# help
9696
sahi --help

.github/workflows/package_testing.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,16 @@ jobs:
6666
if: matrix.operating-system == 'macos-latest'
6767
run: pip install torch==1.10.0 torchvision==0.11.1
6868

69-
- name: Install MMDetection(2.18.0), YOLOv5(6.0.4) and Norfair(0.3.1)
69+
- name: Install MMDetection(2.19.0), YOLOv5(6.0.6) and Norfair(0.3.1)
7070
run: >
71-
pip install mmcv-full==1.3.17 mmdet==2.18.0 yolov5==6.0.4 norfair==0.3.1
71+
pip install mmcv-full==1.4.0 mmdet==2.19.0 yolov5==6.0.6 norfair==0.3.1
7272
7373
- name: Test with unittest
7474
run: |
7575
pip install pytest
7676
python -m unittest
7777
78-
- name: Test SAHI CLI for MMDetection(2.17.0), YOLOv5(6.0.4) and Norfair(0.3.1)
78+
- name: Test SAHI CLI for MMDetection(2.19.0), YOLOv5(6.0.6) and Norfair(0.3.1)
7979
run: |
8080
# predict mmdet
8181
sahi predict --source tests/data/ --model_path tests/data/models/mmdet_retinanet/retinanet_r50_fpn_2x_coco_20200131-fdb43119.pth --model_config_path tests/data/models/mmdet_retinanet/retinanet_r50_fpn_1x_coco.py --image_size 320

tests/test_mmdetectionmodel.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def test_load_model(self):
1919
model_path=MmdetTestConstants.MMDET_CASCADEMASKRCNN_MODEL_PATH,
2020
config_path=MmdetTestConstants.MMDET_CASCADEMASKRCNN_CONFIG_PATH,
2121
confidence_threshold=0.3,
22-
device=None,
22+
device="cpu",
2323
category_remapping=None,
2424
load_at_init=True,
2525
)
@@ -36,7 +36,7 @@ def test_perform_inference_with_mask_output(self):
3636
model_path=MmdetTestConstants.MMDET_CASCADEMASKRCNN_MODEL_PATH,
3737
config_path=MmdetTestConstants.MMDET_CASCADEMASKRCNN_CONFIG_PATH,
3838
confidence_threshold=0.5,
39-
device=None,
39+
device="cpu",
4040
category_remapping=None,
4141
load_at_init=True,
4242
)
@@ -74,7 +74,7 @@ def test_perform_inference_without_mask_output(self):
7474
model_path=MmdetTestConstants.MMDET_RETINANET_MODEL_PATH,
7575
config_path=MmdetTestConstants.MMDET_RETINANET_CONFIG_PATH,
7676
confidence_threshold=0.5,
77-
device=None,
77+
device="cpu",
7878
category_remapping=None,
7979
load_at_init=True,
8080
)
@@ -110,7 +110,7 @@ def test_convert_original_predictions_with_mask_output(self):
110110
model_path=MmdetTestConstants.MMDET_CASCADEMASKRCNN_MODEL_PATH,
111111
config_path=MmdetTestConstants.MMDET_CASCADEMASKRCNN_CONFIG_PATH,
112112
confidence_threshold=0.5,
113-
device=None,
113+
device="cpu",
114114
category_remapping=None,
115115
load_at_init=True,
116116
)
@@ -157,7 +157,7 @@ def test_convert_original_predictions_without_mask_output(self):
157157
model_path=MmdetTestConstants.MMDET_RETINANET_MODEL_PATH,
158158
config_path=MmdetTestConstants.MMDET_RETINANET_CONFIG_PATH,
159159
confidence_threshold=0.5,
160-
device=None,
160+
device="cpu",
161161
category_remapping=None,
162162
load_at_init=True,
163163
)
@@ -200,7 +200,7 @@ def test_create_original_predictions_from_object_prediction_list_with_mask_outpu
200200
model_path=MmdetTestConstants.MMDET_CASCADEMASKRCNN_MODEL_PATH,
201201
config_path=MmdetTestConstants.MMDET_CASCADEMASKRCNN_CONFIG_PATH,
202202
confidence_threshold=0.5,
203-
device=None,
203+
device="cpu",
204204
category_remapping=None,
205205
load_at_init=True,
206206
)
@@ -245,7 +245,7 @@ def test_create_original_predictions_from_object_prediction_list_without_mask_ou
245245
model_path=MmdetTestConstants.MMDET_RETINANET_MODEL_PATH,
246246
config_path=MmdetTestConstants.MMDET_RETINANET_CONFIG_PATH,
247247
confidence_threshold=0.5,
248-
device=None,
248+
device="cpu",
249249
category_remapping=None,
250250
load_at_init=True,
251251
)

tests/test_predict.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def test_get_prediction_mmdet(self):
3434
model_path=MmdetTestConstants.MMDET_CASCADEMASKRCNN_MODEL_PATH,
3535
config_path=MmdetTestConstants.MMDET_CASCADEMASKRCNN_CONFIG_PATH,
3636
confidence_threshold=0.3,
37-
device=None,
37+
device="cpu",
3838
category_remapping=None,
3939
)
4040
mmdet_detection_model.load_model()
@@ -78,7 +78,7 @@ def test_get_prediction_yolov5(self):
7878
yolov5_detection_model = Yolov5DetectionModel(
7979
model_path=Yolov5TestConstants.YOLOV5N_MODEL_PATH,
8080
confidence_threshold=0.3,
81-
device=None,
81+
device="cpu",
8282
category_remapping=None,
8383
load_at_init=False,
8484
)
@@ -124,7 +124,7 @@ def test_get_sliced_prediction_mmdet(self):
124124
model_path=MmdetTestConstants.MMDET_CASCADEMASKRCNN_MODEL_PATH,
125125
config_path=MmdetTestConstants.MMDET_CASCADEMASKRCNN_CONFIG_PATH,
126126
confidence_threshold=0.3,
127-
device=None,
127+
device="cpu",
128128
category_remapping=None,
129129
load_at_init=False,
130130
)
@@ -189,7 +189,7 @@ def test_get_sliced_prediction_yolov5(self):
189189
yolov5_detection_model = Yolov5DetectionModel(
190190
model_path=Yolov5TestConstants.YOLOV5N_MODEL_PATH,
191191
confidence_threshold=0.3,
192-
device=None,
192+
device="cpu",
193193
category_remapping=None,
194194
load_at_init=False,
195195
)
@@ -267,7 +267,7 @@ def test_coco_json_prediction(self):
267267
model_path=MmdetTestConstants.MMDET_CASCADEMASKRCNN_MODEL_PATH,
268268
model_config_path=MmdetTestConstants.MMDET_CASCADEMASKRCNN_CONFIG_PATH,
269269
model_confidence_threshold=0.4,
270-
model_device=None,
270+
model_device="cpu",
271271
model_category_mapping=None,
272272
model_category_remapping=None,
273273
source=source,
@@ -306,7 +306,7 @@ def test_coco_json_prediction(self):
306306
model_path=Yolov5TestConstants.YOLOV5N_MODEL_PATH,
307307
model_config_path=None,
308308
model_confidence_threshold=0.4,
309-
model_device=None,
309+
model_device="cpu",
310310
model_category_mapping=None,
311311
model_category_remapping=None,
312312
source=source,

tests/test_yolov5model.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def test_load_model(self):
1818
yolov5_detection_model = Yolov5DetectionModel(
1919
model_path=Yolov5TestConstants.YOLOV5N_MODEL_PATH,
2020
confidence_threshold=0.3,
21-
device=None,
21+
device="cpu",
2222
category_remapping=None,
2323
load_at_init=True,
2424
)
@@ -34,7 +34,7 @@ def test_perform_inference(self):
3434
yolov5_detection_model = Yolov5DetectionModel(
3535
model_path=Yolov5TestConstants.YOLOV5N_MODEL_PATH,
3636
confidence_threshold=0.5,
37-
device=None,
37+
device="cpu",
3838
category_remapping=None,
3939
load_at_init=True,
4040
)
@@ -72,7 +72,7 @@ def test_convert_original_predictions(self):
7272
yolov5_detection_model = Yolov5DetectionModel(
7373
model_path=Yolov5TestConstants.YOLOV5N_MODEL_PATH,
7474
confidence_threshold=0.5,
75-
device=None,
75+
device="cpu",
7676
category_remapping=None,
7777
load_at_init=True,
7878
)

0 commit comments

Comments
 (0)