Sahi

Latest version: v0.11.19

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

Scan your dependencies

Page 5 of 16

0.10.3

What's Changed
* fix coco2fiftyone script by fcakyon in https://github.com/obss/sahi/pull/540
* fix segmentation fault in same cases by fcakyon in https://github.com/obss/sahi/pull/541


**Full Changelog**: https://github.com/obss/sahi/compare/0.10.2...0.10.3

0.10.2

What's Changed
* add automatic slice size calculation by mcvarer in https://github.com/obss/sahi/pull/512
* Fix bug that Unable to print for prediction time when verbose=2 by youngjae-avikus in https://github.com/obss/sahi/pull/521
* pybboxes allow oob, strict=False fix. by devrimcavusoglu in https://github.com/obss/sahi/pull/528
* update predict verbose by fcakyon in https://github.com/obss/sahi/pull/514
* update pybboxes version by fcakyon in https://github.com/obss/sahi/pull/531

New Contributors
* youngjae-avikus made their first contribution in https://github.com/obss/sahi/pull/521

**Full Changelog**: https://github.com/obss/sahi/compare/0.10.1...0.10.2

0.10.1

What's Changed
* add python 3.10 support by fcakyon in https://github.com/obss/sahi/pull/503
* add file_name to export_visuals by mcvarer in https://github.com/obss/sahi/pull/507
* refactor automodel to lazyload models by fcakyon in https://github.com/obss/sahi/pull/509
* update automodel loading method to from_pretrained by fcakyon in https://github.com/obss/sahi/pull/510

New Contributors
* mcvarer made their first contribution in https://github.com/obss/sahi/pull/507

**Full Changelog**: https://github.com/obss/sahi/compare/0.10.0...0.10.1

0.10.0

New Features
- Layer.ai integration
python
from sahi import AutoDetectionModel

detection_model = AutoDetectionModel.from_layer("layer/yolov5/models/yolov5s")

result = get_sliced_prediction(
"image.jpeg",
detection_model,
slice_height = 512,
slice_width = 512,
overlap_height_ratio = 0.2,
overlap_width_ratio = 0.2
)


- HuggingfFace Transformers object detectors
python
from sahi.model import HuggingfaceDetectionModel

detection_model = HuggingfaceDetectionModel(
model_path="facebook/detr-resnet-50",
image_size=640,
confidence_threshold=0.5
)

result = get_sliced_prediction(
"image.jpeg",
detection_model,
slice_height = 512,
slice_width = 512,
overlap_height_ratio = 0.2,
overlap_width_ratio = 0.2
)


- TorchVision object detectors
python
import torchvision
from sahi.model import TorchVisionDetectionModel

model = torchvision.models.detection.fasterrcnn_resnet50_fpn(pretrained=True)

detection_model = TorchVisionDetectionModel(
model=model,
image_size=640,
confidence_threshold=0.5
)

result = get_sliced_prediction(
"image.jpeg",
detection_model,
slice_height = 512,
slice_width = 512,
overlap_height_ratio = 0.2,
overlap_width_ratio = 0.2
)


- Support for exporting predictions in COCO format
python
from sahi.utils.coco import Coco, CocoImage, CocoAnnotation, CocoPrediction
from sahi.utils.file import save_json
from pycocotools.cocoeval import COCOeval
from pycocotools.coco import COCO

coco_obj = Coco()

add n images to coco_obj
for _ in range(n):
image = CocoImage(**kwargs)

add n annotations to the image
for _ in ange(n):
image.add_annotation(CocoAnnotation(**kwargs))

add n predictions to the image
for _ in range(n)
image.add_prediction(CocoPrediction(**kwargs))

add image to coco object
coco_obj.add_image(image)

export ground truth annotations
coco_gt = coco_obj.json
save_json(coco_gt , "ground_truth.json")

export predictions
coco_predictions = coco_obj.prediction_array
save_json(coco_predictions, "predictions.json")

coco_ground_truth = COCO(annotation_file="coco_dataset.json")
coco_predictions = coco_ground_truth.loadRes("coco_predictions.json")
coco_evaluator = COCOeval(coco_ground_truth, coco_predictions, "bbox")
coco_evaluator.evaluate()
coco_evaluator.accumulate()
coco_evaluator.summarize()


What's Changed
* refactor torch utils by fcakyon in https://github.com/obss/sahi/pull/468
* add automodel structure for unified model loading by fcakyon in https://github.com/obss/sahi/pull/469
* add support to instantiate a `DetectionModel` from layer by mecevit in https://github.com/obss/sahi/pull/462
* refactor automodel by fcakyon in https://github.com/obss/sahi/pull/470
* update layer versions in workflows by fcakyon in https://github.com/obss/sahi/pull/471
* update version to 0.10.0 by fcakyon in https://github.com/obss/sahi/pull/474
* Added support for exporting predictions in COCO format by PushpakBhoge in https://github.com/obss/sahi/pull/465
* update contributors in readme by fcakyon in https://github.com/obss/sahi/pull/477
* update device priority for Detectron2DetectionModel by fcakyon in https://github.com/obss/sahi/pull/479
* fix pickle export for video by fcakyon in https://github.com/obss/sahi/pull/481
* update continuous integration by fcakyon in https://github.com/obss/sahi/pull/483
* refactor import and torch utils by fcakyon in https://github.com/obss/sahi/pull/484
* make detectionmodel classes more explicit in automodel by fcakyon in https://github.com/obss/sahi/pull/485
* utilize check_requirements in several modules by fcakyon in https://github.com/obss/sahi/pull/487
* update package versions in workflows by fcakyon in https://github.com/obss/sahi/pull/488
* add support for huggingface transformers object detectors by devrimcavusoglu in https://github.com/obss/sahi/pull/475
* add torchvision detector support by fcakyon in https://github.com/obss/sahi/pull/486
* remove legacy image_size parameter by kadirnar in https://github.com/obss/sahi/pull/494
* AutoDetectionModel can be imported from sahi by fcakyon in https://github.com/obss/sahi/pull/498
* add python3.6 support by fcakyon in https://github.com/obss/sahi/pull/489
* refactor exception handling by kadirnar in https://github.com/obss/sahi/pull/499
* improve requirements and import handling by fcakyon in https://github.com/obss/sahi/pull/502

New Contributors
* mecevit made their first contribution in https://github.com/obss/sahi/pull/462
* PushpakBhoge made their first contribution in https://github.com/obss/sahi/pull/465

**Full Changelog**: https://github.com/obss/sahi/compare/0.9.4...0.10.0

0.9.4

What's Changed
* reduce ram usage by adding buffer based merging by weypro in https://github.com/obss/sahi/pull/445
* improve json loading by qingfengtommy in https://github.com/obss/sahi/pull/453

New Contributors
* weypro made their first contribution in https://github.com/obss/sahi/pull/445
* qingfengtommy made their first contribution in https://github.com/obss/sahi/pull/453

**Full Changelog**: https://github.com/obss/sahi/compare/0.9.3...0.9.4

0.9.3

What's Changed
* add support for video prediction by madenburak in https://github.com/obss/sahi/pull/442

![sahi-video-inf](https://user-images.githubusercontent.com/34196005/167277618-9552add8-4f7f-49b9-ada4-1047ca3ce754.gif)
* export prediction visuals by default fcakyon in [](https://github.com/obss/sahi/commit/32946fa0228919198a5603fd9649af7f9da88daa)
* add `detection_model` input to `predict` function by ssahinnkadir in https://github.com/obss/sahi/pull/443
* refactor postprocess call by fcakyon in https://github.com/obss/sahi/pull/458
* update yolov5, mmdet, norfair versions in ci by fcakyon in https://github.com/obss/sahi/pull/459

New Contributors
* madenburak made their first contribution in https://github.com/obss/sahi/pull/442

**Full Changelog**: https://github.com/obss/sahi/compare/0.9.2...0.9.3

Page 5 of 16

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.