Skip to content

Commit

Permalink
Deprecated interface fix: ultralytics Boxes.boxes is deprecated - rep…
Browse files Browse the repository at this point in the history
…laced with Boxes.data (#873)
  • Loading branch information
eVen-gits authored May 15, 2023
1 parent 26acb89 commit 1cd7a1b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
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

0 comments on commit 1cd7a1b

Please sign in to comment.