Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
fcakyon committed Nov 5, 2023
2 parents 4fee50a + f04a7ee commit 487ef35
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 17 deletions.
17 changes: 7 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

## <div align="center">Overview</div>

Object detection and instance segmentation are by far the most important fields of applications in Computer Vision. However, detection of small objects and inference on large images are still major issues in practical usage. Here comes the SAHI to help developers overcome these real-world problems with many vision utilities.
Object detection and instance segmentation are by far the most important applications in Computer Vision. However, the detection of small objects and inference on large images still need to be improved in practical usage. Here comes the SAHI to help developers overcome these real-world problems with many vision utilities.

| Command | Description |
|---|---|
Expand All @@ -39,12 +39,12 @@ Object detection and instance segmentation are by far the most important fields
| [coco slice](https://github.com/obss/sahi/blob/main/docs/cli.md#coco-slice-command-usage) | automatically slice COCO annotation and image files |
| [coco fiftyone](https://github.com/obss/sahi/blob/main/docs/cli.md#coco-fiftyone-command-usage) | explore multiple prediction results on your COCO dataset with [fiftyone ui](https://github.com/voxel51/fiftyone) ordered by number of misdetections |
| [coco evaluate](https://github.com/obss/sahi/blob/main/docs/cli.md#coco-evaluate-command-usage) | evaluate classwise COCO AP and AR for given predictions and ground truth |
| [coco analyse](https://github.com/obss/sahi/blob/main/docs/cli.md#coco-analyse-command-usage) | calcualate and export many error analysis plots |
| [coco analyse](https://github.com/obss/sahi/blob/main/docs/cli.md#coco-analyse-command-usage) | calculate and export many error analysis plots |
| [coco yolov5](https://github.com/obss/sahi/blob/main/docs/cli.md#coco-yolov5-command-usage) | automatically convert any COCO dataset to [yolov5](https://github.com/ultralytics/yolov5) format |

## <div align="center">Quick Start Examples</div>

[📜 List of publications that cite SAHI (currently 40+)](https://scholar.google.com/scholar?hl=en&as_sdt=2005&sciodt=0,5&cites=14065474760484865747&scipsc=&q=&scisbd=1)
[📜 List of publications that cite SAHI (currently 100+)](https://scholar.google.com/scholar?hl=en&as_sdt=2005&sciodt=0,5&cites=14065474760484865747&scipsc=&q=&scisbd=1)

[🏆 List of competition winners that used SAHI](https://github.com/obss/sahi/discussions/688)

Expand Down Expand Up @@ -126,17 +126,14 @@ conda install pytorch=1.13.1 torchvision=0.14.1 pytorch-cuda=11.7 -c pytorch -c
- Install your desired detection framework (yolov5):

```console
pip install yolov5==7.0.4
pip install yolov5==7.0.13
```

- Install your desired detection framework (mmdet):

```console
pip install mmcv-full==1.7.0 -f https://download.openmmlab.com/mmcv/dist/cu117/torch1.13.0/index.html
```

```console
pip install mmdet==2.26.0
pip install mim
mim install mmdet==3.0.0
```

- Install your desired detection framework (detectron2):
Expand Down Expand Up @@ -270,4 +267,4 @@ python -m scripts.run_code_style format

<a align="left" href="https://github.com/pranavdurai10" target="_blank">Pranav Durai</a>

</div>
</div>
2 changes: 1 addition & 1 deletion sahi/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.11.14"
__version__ = "0.11.15"

from sahi.annotation import BoundingBox, Category, Mask
from sahi.auto_model import AutoDetectionModel
Expand Down
4 changes: 2 additions & 2 deletions sahi/slicing.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ def slice_coco(
sliced_coco_images: List = []

# iterate over images and slice
for coco_image in tqdm(coco.images):
for idx, coco_image in enumerate(tqdm(coco.images)):
# get image path
image_path: str = os.path.join(image_dir, coco_image.file_name)
# get annotation json list corresponding to selected coco image
Expand All @@ -478,7 +478,7 @@ def slice_coco(
slice_image_result = slice_image(
image=image_path,
coco_annotation_list=coco_image.annotations,
output_file_name=Path(coco_image.file_name).stem,
output_file_name=f"{Path(coco_image.file_name).stem}_{idx}",
output_dir=output_dir,
slice_height=slice_height,
slice_width=slice_width,
Expand Down
8 changes: 4 additions & 4 deletions sahi/utils/yolov8.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ class Yolov8TestConstants:
YOLOV8M_MODEL_URL = "https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8m.pt"
YOLOV8M_MODEL_PATH = "tests/data/models/yolov8/yolov8m.pt"

YOLOV8M_MODEL_URL = "https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8l.pt"
YOLOV8M_MODEL_PATH = "tests/data/models/yolov8/yolov8l.pt"
YOLOV8L_MODEL_URL = "https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8l.pt"
YOLOV8L_MODEL_PATH = "tests/data/models/yolov8/yolov8l.pt"

YOLOV8M_MODEL_URL = "https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8x.pt"
YOLOV8M_MODEL_PATH = "tests/data/models/yolov8/yolov8x.pt"
YOLOV8X_MODEL_URL = "https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8x.pt"
YOLOV8X_MODEL_PATH = "tests/data/models/yolov8/yolov8x.pt"


def download_yolov8n_model(destination_path: Optional[str] = None):
Expand Down

0 comments on commit 487ef35

Please sign in to comment.