Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support ultralytics>=8.0.99 #873

Merged
merged 3 commits into from
May 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
pip install -e .[dev]
# stop the build if there are Python syntax errors or undefined names
python -m scripts.run_code_style check

# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --exit-zero --max-complexity=10 --max-line-length=127

Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:

- name: Install ultralytics
run: >
pip install ultralytics==8.0.43
pip install ultralytics==8.0.99

- name: Unittest for SAHI+YOLOV5/MMDET/Detectron2 on all platforms
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci_torch1.10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
pip install -e .[dev]
# stop the build if there are Python syntax errors or undefined names
python -m scripts.run_code_style check

# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --exit-zero --max-complexity=10 --max-line-length=127

Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:

- name: Install ultralytics
run: >
pip install ultralytics==8.0.43
pip install ultralytics==8.0.99

- name: Unittest for SAHI+YOLOV5/MMDET/Detectron2 on all platforms
run: |
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 @@ -70,11 +70,11 @@ jobs:
- name: Install YOLOv5(7.0.9)
run: >
pip install yolov5==7.0.9

- name: Install DeepSparse
run: >
pip install deepsparse

- name: Install Detectron2(0.6)
run: >
python -m pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cpu/torch1.10/index.html
Expand All @@ -89,7 +89,7 @@ jobs:

- name: Install ultralytics
run: >
pip install ultralytics==8.0.43
pip install ultralytics==8.0.99

- name: Install latest SAHI package
run: >
Expand Down
2 changes: 1 addition & 1 deletion sahi/models/yolov8.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def perform_inference(self, image: np.ndarray):
raise ValueError("Model is not loaded, load it by calling .load_model()")
prediction_result = self.model(image[:, :, ::-1], verbose=False) # YOLOv8 expects numpy arrays to have BGR
prediction_result = [
result.boxes.boxes[result.boxes.boxes[:, 4] >= self.confidence_threshold] for result in prediction_result
result.boxes.data[result.boxes.data[:, 4] >= self.confidence_threshold] for result in prediction_result
]

self._original_predictions = prediction_result
Expand Down