<div align="center">
<h1>
SAHI: Slicing Aided Hyper Inference
</h1>
<h4>
A lightweight vision library for performing large scale object detection & instance segmentation
</h4>
<h4>
<img width="700" alt="teaser" src="https://raw.githubusercontent.com/obss/sahi/main/resources/sliced_inference.gif">
</h4>
<div>
<a href="https://pepy.tech/project/sahi"><img src="https://pepy.tech/badge/sahi" alt="downloads"></a>
<a href="https://pepy.tech/project/sahi"><img src="https://pepy.tech/badge/sahi/month" alt="downloads"></a>
<br>
<a href="https://badge.fury.io/py/sahi"><img src="https://badge.fury.io/py/sahi.svg" alt="pypi version"></a>
<a href="https://anaconda.org/conda-forge/sahi"><img src="https://anaconda.org/conda-forge/sahi/badges/version.svg" alt="conda version"></a>
<a href="https://github.com/obss/sahi/actions/workflows/package_testing.yml"><img src="https://github.com/obss/sahi/actions/workflows/package_testing.yml/badge.svg" alt="package testing"></a>
<br>
<a href="https://ieeexplore.ieee.org/document/9897990"><img src="https://img.shields.io/badge/DOI-10.1109%2FICIP46576.2022.9897990-orange.svg" alt="ci"></a>
<br>
<a href="https://colab.research.google.com/github/obss/sahi/blob/main/demo/inference_for_yolov5.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a>
<a href="https://huggingface.co/spaces/fcakyon/sahi-yolox"><img src="https://raw.githubusercontent.com/obss/sahi/main/resources/hf_spaces_badge.svg" alt="HuggingFace Spaces"></a>
â
</div>
</div>
## <div align="center">Overview</div>
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 |
|---|---|
| [predict](https://github.com/obss/sahi/blob/main/docs/cli.md#predict-command-usage) | perform sliced/standard video/image prediction using any [yolov5](https://github.com/ultralytics/yolov5)/[mmdet](https://github.com/open-mmlab/mmdetection)/[detectron2](https://github.com/facebookresearch/detectron2)/[huggingface](https://huggingface.co/models?pipeline_tag=object-detection&sort=downloads) model |
| [predict-fiftyone](https://github.com/obss/sahi/blob/main/docs/cli.md#predict-fiftyone-command-usage) | perform sliced/standard prediction using any [yolov5](https://github.com/ultralytics/yolov5)/[mmdet](https://github.com/open-mmlab/mmdetection)/[detectron2](https://github.com/facebookresearch/detectron2)/[huggingface](https://huggingface.co/models?pipeline_tag=object-detection&sort=downloads) model and explore results in [fiftyone app](https://github.com/voxel51/fiftyone) |
| [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) | 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 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)
### Tutorials
- [Introduction to SAHI](https://medium.com/codable/sahi-a-vision-library-for-performing-sliced-inference-on-large-images-small-objects-c8b086af3b80)
- [Official paper](https://ieeexplore.ieee.org/document/9897990) (ICIP 2022 oral) (NEW)
- [Pretrained weights and ICIP 2022 paper files](https://github.com/fcakyon/small-object-detection-benchmark)
- ['Exploring SAHI' Research Article from 'learnopencv.com'](https://learnopencv.com/slicing-aided-hyper-inference/) (2023) (NEW)
- ['VIDEO TUTORIAL: Slicing Aided Hyper Inference for Small Object Detection - SAHI'](https://www.youtube.com/watch?v=UuOjJKxn-M8&t=270s) (2023) (NEW)
- [Video inference support is live](https://github.com/obss/sahi/discussions/626)
- [Kaggle notebook](https://www.kaggle.com/remekkinas/sahi-slicing-aided-hyper-inference-yv5-and-yx)
- [Satellite object detection](https://blog.ml6.eu/how-to-detect-small-objects-in-very-large-images-70234bab0f98)
- [Error analysis plots & evaluation](https://github.com/obss/sahi/discussions/622) (NEW)
- [Interactive result visualization and inspection](https://github.com/obss/sahi/discussions/624) (NEW)
- [COCO dataset conversion](https://medium.com/codable/convert-any-dataset-to-coco-object-detection-format-with-sahi-95349e1fe2b7)
- [Slicing operation notebook](demo/slicing.ipynb)
- `YOLOX` + `SAHI` demo: <a href="https://huggingface.co/spaces/fcakyon/sahi-yolox"><img src="https://raw.githubusercontent.com/obss/sahi/main/resources/hf_spaces_badge.svg" alt="sahi-yolox"></a> (RECOMMENDED)
- `YOLOv5` + `SAHI` walkthrough: <a href="https://colab.research.google.com/github/obss/sahi/blob/main/demo/inference_for_yolov5.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="sahi-yolov5"></a>
- `MMDetection` + `SAHI` walkthrough: <a href="https://colab.research.google.com/github/obss/sahi/blob/main/demo/inference_for_mmdetection.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="sahi-mmdetection"></a>
- `Detectron2` + `SAHI` walkthrough: <a href="https://colab.research.google.com/github/obss/sahi/blob/main/demo/inference_for_detectron2.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="sahi-detectron2"></a>
- `HuggingFace` + `SAHI` walkthrough: <a href="https://colab.research.google.com/github/obss/sahi/blob/main/demo/inference_for_huggingface.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="sahi-huggingface"></a> (NEW)
- `TorchVision` + `SAHI` walkthrough: <a href="https://colab.research.google.com/github/obss/sahi/blob/main/demo/inference_for_torchvision.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="sahi-torchvision"></a> (NEW)
<a href="https://huggingface.co/spaces/fcakyon/sahi-yolox"><img width="600" src="https://user-images.githubusercontent.com/34196005/144092739-c1d9bade-a128-4346-947f-424ce00e5c4f.gif" alt="sahi-yolox"></a>
</details>
### Installation
<img width="700" alt="sahi-installation" src="https://user-images.githubusercontent.com/34196005/149311602-b44e6fe1-f496-40f2-a7ae-5ea1f66e1550.gif">
<details closed>
<summary>
<big><b>Installation details:</b></big>
</summary>
- Install `sahi` using pip:
```console
pip install sahi
```
- On Windows, `Shapely` needs to be installed via Conda:
```console
conda install -c conda-forge shapely
```
- Install your desired version of pytorch and torchvision (cuda 11.3 for detectron2, cuda 11.7 for rest):
```console
conda install pytorch=1.10.2 torchvision=0.11.3 cudatoolkit=11.3 -c pytorch
```
```console
conda install pytorch=1.13.1 torchvision=0.14.1 pytorch-cuda=11.7 -c pytorch -c nvidia
```
- Install your desired detection framework (yolov5):
```console
pip install yolov5==7.0.13
```
- Install your desired detection framework (mmdet):
```console
pip install mim
mim install m
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
基于YOLOv8+sahi策略(切片、微调、推理)实现遥感数据集上小目标检测python源码.zip 【说明】 【1】项目代码完整且功能都验证ok,确保稳定可靠运行后才上传。欢迎下载使用!在使用过程中,如有问题或建议,请及时私信沟通,帮助解答。 【2】项目主要针对各个计算机相关专业,包括计科、信息安全、数据科学与大数据技术、人工智能、通信、物联网等领域的在校学生、专业教师或企业员工使用。 【3】项目具有较高的学习借鉴价值,不仅适用于小白学习入门进阶。也可作为毕设项目、课程设计、大作业、初期项目立项演示等。 【4】如果基础还行,或热爱钻研,可基于此项目进行二次开发,DIY其他不同功能,欢迎交流学习。 【注意】 项目下载解压后,项目名字和项目路径不要用中文,建议解压重命名为英文名字后再运行!有问题私信沟通,祝顺利!
资源推荐
资源详情
资源评论
收起资源包目录
课题实验基于YOLOv8+sahi策略(切片、微调、推理)实现遥感数据集上小目标检测python源码.zip (338个子文件)
CITATION.cff 1017B
setup.cfg 319B
sliced_inference.gif 1.98MB
MANIFEST.in 25B
inference_for_torchvision.ipynb 2.98MB
inference_for_detectron2.ipynb 2.97MB
inference_for_yolov5.ipynb 2.97MB
inference_for_huggingface.ipynb 2.97MB
inference_for_mmdetection.ipynb 2.97MB
inference_for_sparse_yolov5.ipynb 2.89MB
inference_for_yolov8.ipynb 2.89MB
inference_for_yolonas.ipynb 2.88MB
slicing.ipynb 2.7MB
small-vehicles1.jpeg 316KB
small-vehicles1.jpeg 316KB
terrain1.jpg 573KB
bus.jpg 134KB
zidane.jpg 49KB
visdrone2019-det-train-first50image.json 991KB
dataset.json 32KB
terrain1.json 19KB
terrain3.json 13KB
terrain_all_coco.json 13KB
result.json 12KB
terrain2.json 10KB
combined_coco.json 7KB
terrain3_coco.json 6KB
modified_terrain1_coco.json 5KB
terrain1_coco.json 4KB
modified_terrain2_coco.json 3KB
terrain2_coco.json 3KB
terrain2_coco.json 3KB
README.md 13KB
README.md 13KB
coco.md 10KB
cli.md 7KB
README.md 3KB
predict.md 2KB
fiftyone.md 1KB
slicing.md 625B
介绍.md 244B
terrain3.png 6.49MB
terrain4.png 576KB
terrain2_gray.png 449KB
terrain2.png 426KB
terrain2.png 426KB
coco.py 88KB
exporter.py 49KB
metrics.py 46KB
augment.py 46KB
predict.py 37KB
tasks.py 36KB
test_cocoutils.py 35KB
__init__.py 33KB
trainer.py 32KB
plotting.py 31KB
ops.py 31KB
utils.py 29KB
tiny_encoder.py 28KB
autobackend.py 26KB
checks.py 25KB
slicing.py 25KB
loss.py 25KB
encoders.py 24KB
torch_utils.py 24KB
annotation.py 23KB
predict.py 23KB
results.py 23KB
combine.py 22KB
loaders.py 22KB
cv.py 21KB
__init__.py 19KB
model.py 19KB
test_predict.py 18KB
head.py 18KB
benchmarks.py 18KB
byte_tracker.py 18KB
transformer.py 17KB
downloads.py 17KB
predictor.py 16KB
coco_error_analysis.py 16KB
prompt.py 16KB
dataset.py 16KB
loss.py 16KB
instance.py 16KB
coco_evaluation.py 15KB
kalman_filter.py 15KB
validator.py 14KB
comet.py 14KB
tal.py 13KB
base.py 13KB
ops.py 13KB
val.py 13KB
block.py 13KB
conv.py 12KB
converter.py 12KB
gmc.py 12KB
test_huggingfacemodel.py 12KB
val.py 12KB
test_detectron2.py 11KB
共 338 条
- 1
- 2
- 3
- 4
资源评论
.whl
- 粉丝: 3823
- 资源: 4648
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- HtmlMate标签使用详解中文最新版本
- ATM机旁危险物品检测数据集VOC+YOLO格式1251张5类别.zip
- 网页优化meta标签使用方法及规则中文最新版本
- 网页万能复制 浏览器插件
- IMG_20241123_093226.jpg
- JavaScript的表白代码项目源码.zip
- springboot vue3前后端分离开发入门介绍,分享给有需要的人,仅供参考
- 全国297个地级市城市辖区数据1990-2022年末实有公共汽车出租车数人均城市道路建成区绿地面积供水供气总量医院卫生机构数医生人数GDP第一二三产业增加值分行业从业人员水资源农产品产量利用外资
- Python客流量时间序列预测模型.zip
- 故障预测-灰色预测模型C++源码.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功