Skip to content

Commit

Permalink
update package versions in workflows (#592)
Browse files Browse the repository at this point in the history
  • Loading branch information
fcakyon authored Sep 24, 2022
1 parent b93132d commit a066687
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 20 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ jobs:
pip install mmcv-full==1.6.1 -f https://download.openmmlab.com/mmcv/dist/cpu/torch1.11.0/index.html
pip install mmdet==2.25.1
- name: Install YOLOv5(6.1.8) and Norfair(1.0.0)
- name: Install YOLOv5(6.2.1) and Norfair(1.0.0)
run: >
pip install yolov5==6.1.8 norfair==1.0.0
pip install yolov5==6.2.1 norfair==1.0.0
- name: Install Transformers(4.21.2)
- name: Install Transformers(4.22.1)
run: >
pip install transformers==4.21.2
pip install transformers==4.22.1
- name: Install Layer (0.10.*)
run: >
Expand All @@ -96,9 +96,9 @@ jobs:
run: |
python -m unittest
- name: Install pycocotools(2.0.4)
- name: Install pycocotools(2.0.5)
run: >
pip install pycocotools==2.0.4
pip install pycocotools==2.0.5
- name: Install SAHI package from local setup.py
run: >
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci_torch1.10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ jobs:
pip install mmcv-full==1.6.1 -f https://download.openmmlab.com/mmcv/dist/cpu/torch1.10.0/index.html
pip install mmdet==2.25.1
- name: Install YOLOv5(6.1.8) and Norfair(1.0.0)
- name: Install YOLOv5(6.2.1) and Norfair(1.0.0)
run: >
pip install yolov5==6.1.8 norfair==1.0.0
pip install yolov5==6.2.1 norfair==1.0.0
- name: Install Detectron2(0.6)
run: >
python -m pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cpu/torch1.10/index.html
- name: Install Transformers(4.21.2)
- name: Install Transformers(4.22.1)
if: >
matrix.python-version != '3.6'
run: >
Expand All @@ -105,9 +105,9 @@ jobs:
run: |
python -m unittest
- name: Install pycocotools(2.0.4)
- name: Install pycocotools(2.0.5)
run: >
pip install pycocotools==2.0.4
pip install pycocotools==2.0.5
- name: Install SAHI package from local setup.py
run: >
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/package_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ jobs:
pip install mmcv-full==1.6.1 -f https://download.openmmlab.com/mmcv/dist/cpu/torch1.10.0/index.html
pip install mmdet==2.25.1
- name: Install YOLOv5(6.1.8) and Norfair(1.0.0)
- name: Install YOLOv5(6.2.1) and Norfair(1.0.0)
run: >
pip install yolov5==6.1.8 norfair==1.0.0
pip install yolov5==6.2.1 norfair==1.0.0
- name: Install Detectron2(0.6)
run: >
Expand All @@ -87,9 +87,9 @@ jobs:
run: >
pip install -U "layer>=0.10.0,<0.11.0"
- name: Install pycocotools(2.0.4)
- name: Install pycocotools(2.0.5)
run: >
pip install pycocotools==2.0.4
pip install pycocotools==2.0.5
- name: Install latest SAHI package
run: >
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Object detection and instance segmentation are by far the most important fields

- [Introduction to SAHI](https://medium.com/codable/sahi-a-vision-library-for-performing-sliced-inference-on-large-images-small-objects-c8b086af3b80)

- [Official paper](https://arxiv.org/abs/2202.06934) (ICIP 2022 oral, 9+ citations)
- [Official paper](https://arxiv.org/abs/2202.06934) (ICIP 2022 oral, 11+ citations)

- [Pretrained weights and ICIP 2022 paper files](https://github.com/fcakyon/small-object-detection-benchmark)

Expand Down Expand Up @@ -115,7 +115,7 @@ conda install pytorch=1.11.0 torchvision=0.12.0 cudatoolkit=11.3 -c pytorch
- Install your desired detection framework (yolov5):

```console
pip install yolov5==6.1.8
pip install yolov5==6.2.1
```

- Install your desired detection framework (mmdet):
Expand Down
17 changes: 14 additions & 3 deletions sahi/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,12 +421,23 @@ def has_mask(self):
"""
Returns if model output contains segmentation mask
"""
has_mask = self.model.with_mask
return has_mask
import yolov5
from packaging import version

if version.parse(yolov5.__version__) < version.parse("6.2.0"):
return False
else:
return False # fix when yolov5 supports segmentation models

@property
def category_names(self):
return self.model.names
import yolov5
from packaging import version

if version.parse(yolov5.__version__) >= version.parse("6.1.9"):
return list(self.model.names.values())
else:
return self.model.names

def _create_object_prediction_list_from_original_predictions(
self,
Expand Down

0 comments on commit a066687

Please sign in to comment.