Skip to content

Commit

Permalink
update mmdet, mmcv, yolov5 version in ci (#303)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
fcakyon authored Dec 11, 2021
1 parent 068b0c2 commit e18ca00
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 22 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ jobs:
if: matrix.operating-system == 'macos-latest'
run: pip install torch==1.10.0 torchvision==0.11.1

- name: Install MMDetection(2.18.0), YOLOv5(6.0.4) and Norfair(0.3.1)
- name: Install MMDetection(2.19.0), YOLOv5(6.0.6) and Norfair(0.3.1)
run: >
pip install mmcv-full==1.3.17 mmdet==2.18.0 yolov5==6.0.4 norfair==0.3.1
pip install mmcv-full==1.4.0 mmdet==2.19.0 yolov5==6.0.6 norfair==0.3.1
- name: Lint with flake8, black and isort
run: |
Expand All @@ -90,7 +90,7 @@ jobs:
run: >
pip install -e .
- name: Test SAHI CLI for MMDetection(2.17.0), YOLOv5(6.0.4) and Norfair(0.3.1)
- name: Test SAHI CLI for MMDetection(2.19.0), YOLOv5(6.0.6) and Norfair(0.3.1)
run: |
# help
sahi --help
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/package_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,16 @@ jobs:
if: matrix.operating-system == 'macos-latest'
run: pip install torch==1.10.0 torchvision==0.11.1

- name: Install MMDetection(2.18.0), YOLOv5(6.0.4) and Norfair(0.3.1)
- name: Install MMDetection(2.19.0), YOLOv5(6.0.6) and Norfair(0.3.1)
run: >
pip install mmcv-full==1.3.17 mmdet==2.18.0 yolov5==6.0.4 norfair==0.3.1
pip install mmcv-full==1.4.0 mmdet==2.19.0 yolov5==6.0.6 norfair==0.3.1
- name: Test with unittest
run: |
pip install pytest
python -m unittest
- name: Test SAHI CLI for MMDetection(2.17.0), YOLOv5(6.0.4) and Norfair(0.3.1)
- name: Test SAHI CLI for MMDetection(2.19.0), YOLOv5(6.0.6) and Norfair(0.3.1)
run: |
# predict mmdet
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
Expand Down
14 changes: 7 additions & 7 deletions tests/test_mmdetectionmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def test_load_model(self):
model_path=MmdetTestConstants.MMDET_CASCADEMASKRCNN_MODEL_PATH,
config_path=MmdetTestConstants.MMDET_CASCADEMASKRCNN_CONFIG_PATH,
confidence_threshold=0.3,
device=None,
device="cpu",
category_remapping=None,
load_at_init=True,
)
Expand All @@ -36,7 +36,7 @@ def test_perform_inference_with_mask_output(self):
model_path=MmdetTestConstants.MMDET_CASCADEMASKRCNN_MODEL_PATH,
config_path=MmdetTestConstants.MMDET_CASCADEMASKRCNN_CONFIG_PATH,
confidence_threshold=0.5,
device=None,
device="cpu",
category_remapping=None,
load_at_init=True,
)
Expand Down Expand Up @@ -74,7 +74,7 @@ def test_perform_inference_without_mask_output(self):
model_path=MmdetTestConstants.MMDET_RETINANET_MODEL_PATH,
config_path=MmdetTestConstants.MMDET_RETINANET_CONFIG_PATH,
confidence_threshold=0.5,
device=None,
device="cpu",
category_remapping=None,
load_at_init=True,
)
Expand Down Expand Up @@ -110,7 +110,7 @@ def test_convert_original_predictions_with_mask_output(self):
model_path=MmdetTestConstants.MMDET_CASCADEMASKRCNN_MODEL_PATH,
config_path=MmdetTestConstants.MMDET_CASCADEMASKRCNN_CONFIG_PATH,
confidence_threshold=0.5,
device=None,
device="cpu",
category_remapping=None,
load_at_init=True,
)
Expand Down Expand Up @@ -157,7 +157,7 @@ def test_convert_original_predictions_without_mask_output(self):
model_path=MmdetTestConstants.MMDET_RETINANET_MODEL_PATH,
config_path=MmdetTestConstants.MMDET_RETINANET_CONFIG_PATH,
confidence_threshold=0.5,
device=None,
device="cpu",
category_remapping=None,
load_at_init=True,
)
Expand Down Expand Up @@ -200,7 +200,7 @@ def test_create_original_predictions_from_object_prediction_list_with_mask_outpu
model_path=MmdetTestConstants.MMDET_CASCADEMASKRCNN_MODEL_PATH,
config_path=MmdetTestConstants.MMDET_CASCADEMASKRCNN_CONFIG_PATH,
confidence_threshold=0.5,
device=None,
device="cpu",
category_remapping=None,
load_at_init=True,
)
Expand Down Expand Up @@ -245,7 +245,7 @@ def test_create_original_predictions_from_object_prediction_list_without_mask_ou
model_path=MmdetTestConstants.MMDET_RETINANET_MODEL_PATH,
config_path=MmdetTestConstants.MMDET_RETINANET_CONFIG_PATH,
confidence_threshold=0.5,
device=None,
device="cpu",
category_remapping=None,
load_at_init=True,
)
Expand Down
12 changes: 6 additions & 6 deletions tests/test_predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_get_prediction_mmdet(self):
model_path=MmdetTestConstants.MMDET_CASCADEMASKRCNN_MODEL_PATH,
config_path=MmdetTestConstants.MMDET_CASCADEMASKRCNN_CONFIG_PATH,
confidence_threshold=0.3,
device=None,
device="cpu",
category_remapping=None,
)
mmdet_detection_model.load_model()
Expand Down Expand Up @@ -78,7 +78,7 @@ def test_get_prediction_yolov5(self):
yolov5_detection_model = Yolov5DetectionModel(
model_path=Yolov5TestConstants.YOLOV5N_MODEL_PATH,
confidence_threshold=0.3,
device=None,
device="cpu",
category_remapping=None,
load_at_init=False,
)
Expand Down Expand Up @@ -124,7 +124,7 @@ def test_get_sliced_prediction_mmdet(self):
model_path=MmdetTestConstants.MMDET_CASCADEMASKRCNN_MODEL_PATH,
config_path=MmdetTestConstants.MMDET_CASCADEMASKRCNN_CONFIG_PATH,
confidence_threshold=0.3,
device=None,
device="cpu",
category_remapping=None,
load_at_init=False,
)
Expand Down Expand Up @@ -189,7 +189,7 @@ def test_get_sliced_prediction_yolov5(self):
yolov5_detection_model = Yolov5DetectionModel(
model_path=Yolov5TestConstants.YOLOV5N_MODEL_PATH,
confidence_threshold=0.3,
device=None,
device="cpu",
category_remapping=None,
load_at_init=False,
)
Expand Down Expand Up @@ -267,7 +267,7 @@ def test_coco_json_prediction(self):
model_path=MmdetTestConstants.MMDET_CASCADEMASKRCNN_MODEL_PATH,
model_config_path=MmdetTestConstants.MMDET_CASCADEMASKRCNN_CONFIG_PATH,
model_confidence_threshold=0.4,
model_device=None,
model_device="cpu",
model_category_mapping=None,
model_category_remapping=None,
source=source,
Expand Down Expand Up @@ -306,7 +306,7 @@ def test_coco_json_prediction(self):
model_path=Yolov5TestConstants.YOLOV5N_MODEL_PATH,
model_config_path=None,
model_confidence_threshold=0.4,
model_device=None,
model_device="cpu",
model_category_mapping=None,
model_category_remapping=None,
source=source,
Expand Down
6 changes: 3 additions & 3 deletions tests/test_yolov5model.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test_load_model(self):
yolov5_detection_model = Yolov5DetectionModel(
model_path=Yolov5TestConstants.YOLOV5N_MODEL_PATH,
confidence_threshold=0.3,
device=None,
device="cpu",
category_remapping=None,
load_at_init=True,
)
Expand All @@ -34,7 +34,7 @@ def test_perform_inference(self):
yolov5_detection_model = Yolov5DetectionModel(
model_path=Yolov5TestConstants.YOLOV5N_MODEL_PATH,
confidence_threshold=0.5,
device=None,
device="cpu",
category_remapping=None,
load_at_init=True,
)
Expand Down Expand Up @@ -72,7 +72,7 @@ def test_convert_original_predictions(self):
yolov5_detection_model = Yolov5DetectionModel(
model_path=Yolov5TestConstants.YOLOV5N_MODEL_PATH,
confidence_threshold=0.5,
device=None,
device="cpu",
category_remapping=None,
load_at_init=True,
)
Expand Down

0 comments on commit e18ca00

Please sign in to comment.