Releases: obss/sahi
Releases · obss/sahi
v0.10.4
What's Changed
- hotfix for occasional segmentation fault by @fcakyon in #546
- refactor requirement checking by @fcakyon in #549
- Code formatting and checks are moved to a single module. by @devrimcavusoglu in #548
- fix a typo in type hinting by @ymerkli in #553
- fix an incorrect url in comments by @aynursusuz in #554
- update version by @fcakyon in #555
- fix linting script by @devrimcavusoglu in #558
- fix an incorrect url in comments by @aynursusuz in #559
New Contributors
- @ymerkli made their first contribution in #553
- @aynursusuz made their first contribution in #554
Full Changelog: 0.10.3...0.10.4
v0.10.3
v0.10.2
What's Changed
- add automatic slice size calculation by @mcvarer in #512
- Fix bug that Unable to print for prediction time when verbose=2 by @youngjae-avikus in #521
- pybboxes allow oob, strict=False fix. by @devrimcavusoglu in #528
- update predict verbose by @fcakyon in #514
- update pybboxes version by @fcakyon in #531
New Contributors
- @youngjae-avikus made their first contribution in #521
Full Changelog: 0.10.1...0.10.2
v0.10.1
v0.10.0
New Features
- Layer.ai integration
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
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
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
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 #468
- add automodel structure for unified model loading by @fcakyon in #469
- add support to instantiate a
DetectionModelfrom layer by @mecevit in #462 - refactor automodel by @fcakyon in #470
- update layer versions in workflows by @fcakyon in #471
- update version to 0.10.0 by @fcakyon in #474
- Added support for exporting predictions in COCO format by @PushpakBhoge in #465
- update contributors in readme by @fcakyon in #477
- update device priority for Detectron2DetectionModel by @fcakyon in #479
- fix pickle export for video by @fcakyon in #481
- update continuous integration by @fcakyon in #483
- refactor import and torch utils by @fcakyon in #484
- make detectionmodel classes more explicit in automodel by @fcakyon in #485
- utilize check_requirements in several modules by @fcakyon in #487
- update package versions in workflows by @fcakyon in #488
- add support for huggingface transformers object detectors by @devrimcavusoglu in #475
- add torchvision detector support by @fcakyon in #486
- remove legacy image_size parameter by @kadirnar in #494
- AutoDetectionModel can be imported from sahi by @fcakyon in #498
- add python3.6 support by @fcakyon in #489
- refactor exception handling by @kadirnar in #499
- improve requirements and import handling by @fcakyon in #502
New Contributors
- @mecevit made their first contribution in #462
- @PushpakBhoge made their first contribution in #465
Full Changelog: 0.9.4...0.10.0
v0.9.4
What's Changed
- reduce ram usage by adding buffer based merging by @weypro in #445
- improve json loading by @qingfengtommy in #453
New Contributors
- @weypro made their first contribution in #445
- @qingfengtommy made their first contribution in #453
Full Changelog: 0.9.3...0.9.4
v0.9.3
What's Changed
- add support for video prediction by @madenburak in #442
- export prediction visuals by default @fcakyon in ##
- add
detection_modelinput topredictfunction by @ssahinnkadir in #443 - refactor postprocess call by @fcakyon in #458
- update yolov5, mmdet, norfair versions in ci by @fcakyon in #459
New Contributors
- @madenburak made their first contribution in #442
Full Changelog: 0.9.2...0.9.3
v0.9.2
What's Changed
- fix fiftyone utils by @fcakyon in #423
- update paper doi badge by @fcakyon in #424
- update env setup in readme by @kadirnar in #408
- update contributing section in readme by @fcakyon in #434
- update cli docs by @fcakyon in #437
- update package versions in ci by @fcakyon in #439
- update version by @fcakyon in #440
Full Changelog: 0.9.1...0.9.2
v0.9.1
What's Changed
- add the list of competitions sahi made us win by @fcakyon in #385
- add citation to paper by @fcakyon in #387
- add arxiv url for the SAHI paper by @fcakyon in #388
- handle invalid mask prediction by @fcakyon in #390
- improve code quality by @fcakyon in #398
- improve nms postprocess by @tureckova in #405
Full Changelog: 0.9.0...0.9.1
v0.9.0
What's Changed
- add detectron2 support by @kadirnar in #322
- update detectron notebook by @fcakyon in #355
- refactor readme by @fcakyon in #316
- refactor slice_coco script and cli by @fcakyon in #359
- update analysis gif in readme by @fcakyon in #362
- update slice_coco export naming by @fcakyon in #361
- fix broken links in readme by @fcakyon in #365
- add kaggle notebook into readme by @rkinas in #366
- handle when class name contains invalid char by @fcakyon in #369
- handle out of image bbox predictions by @fcakyon in #373
- handle annotation dict without segmentation by @tureckova in #374
- fix unused coco util by @fcakyon @oulcan in #375
- fix coco util tests by @fcakyon in #376
- update torch, torchvision, mmdet, mmcv in tests by @fcakyon in #379
- handle nms-postprocess in edge cases by @fcakyon in #370
New Contributors
- @kadirnar made their first contribution in #322
- @tureckova made their first contribution in #374
Full Changelog: 0.8.22...0.9.0

