Sahi

Latest version: v0.11.19

Safety actively analyzes 682387 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 9 of 16

0.8.4

- handle predictions with negative bbox values (225)
- fix remove_invalid_coco_results (227)
- fix coco evaluation (228)

**Remove invalid coco results:**
python
from sahi.utils.file import save_json
from sahi.utils.coco import remove_invalid_coco_results

remove invalid predictions from COCO results JSON
coco_results = remove_invalid_coco_results("coco_result.json")

export processed COCO results
save_json(coco_results, "fixed_coco_result.json")

bonus: remove invalid predictions from COCO results JSON by giving COCO
dataset path to also filter out bbox results exceeding image height&width
coco_results = remove_invalid_coco_results("coco_result.json", "coco_dataset.json")

0.8.3

- fix a bug in coco2fiftyone (223)

0.8.2

- fix optional dependencies (221)
- move conda builds to conda-forge (219)

0.8.1

make repo compatible for conda-forge:
- Include requirements.txt in sdist (217) thanks to weiji14

0.8.0

new cli description:
| Command | Description |
|---|---|
| [predict](https://github.com/obss/sahi/blob/main/docs/CLI.md#predict-command-usage) | perform sliced/standard prediction using any [yolov5](https://github.com/ultralytics/yolov5)/[mmdet](https://github.com/open-mmlab/mmdetection) 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) 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 ordered by false positives |
| [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 detection and segmentation error margin 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 |

new cli usage:

predict
bash
sahi predict --source image/file/or/folder --model_path path/to/model --model_config_path path/to/config


predict-fiftyone
bash
sahi predict-fiftyone --image_dir image/file/or/folder --dataset_json_path dataset.json --model_path path/to/model --model_config_path path/to/config


coco slice
bash
sahi coco slice --image_dir dir/to/images --dataset_json_path dataset.json


coco fiftyone
bash
sahi coco fiftyone --image_dir dir/to/images --dataset_json_path dataset.json cocoresult1.json cocoresult2.json


coco evaluate
bash
sahi coco evaluate --dataset_json_path dataset.json --result_json_path result.json


coco analyse
bash
sahi coco analyse --dataset_json_path dataset.json --result_json_path result.json


coco yolov5
bash
sahi coco yolov5 --image_dir dir/to/images --dataset_json_path dataset.json --train_split 0.9


breaking changes in `predict cli`:
- `config_path` to `model_config_path`
- `conf_thresh` to `model_confidence_threshold`
- `match_metric` to `postprocess_match_metric`
- `match_thresh` to `postprocess_match_threshold`
- `class_agnostic` to `postprocess_class_agnostic`
- `pickle` to `export_pickle`, `crop` to `export_crop`
- `novisual` to `export_visual`
- `no_sliced_pred` to `no_sliced_prediction`
- `no_standard_pred` to `no_standard_prediction`
- `coco_file` to `dataset_json_path`

0.7.4

enhancements
- add script for inspecting cocoresults in fiftyone (192)
- create symlinks for mot utils (199)
- handle when iou_thrs is a single float (196)
- Update coco_evaluation.py (197)

bugfix
- fix coco_evaluation script (195)
- fix a typo in object annotation (194)

Page 9 of 16

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.