Skip to content

Commit

Permalink
added sahi-yolov6
Browse files Browse the repository at this point in the history
  • Loading branch information
kadirnar committed Jul 3, 2022
1 parent 9b97965 commit 14307c5
Show file tree
Hide file tree
Showing 39 changed files with 10,986 additions and 0 deletions.
22 changes: 22 additions & 0 deletions detect.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from sahi.model import Yolov6DetectionModel
from sahi.predict import get_prediction, get_sliced_prediction, predict

detection_model = Yolov6DetectionModel(
model_path='yolov6s.pt',
confidence_threshold=0.3,
device="cpu", # or 'cuda:0'
image_size=640,
)

#result = get_prediction("demo/demo_data/highway.jpg", detection_model)

result = get_sliced_prediction(
'demo/demo_data/highway.jpg',
detection_model,
slice_height = 1280,
slice_width = 1280,
overlap_height_ratio = 0.6,
overlap_width_ratio = 0.6,
)

result.export_visuals(export_dir="demo_data/")
3 changes: 3 additions & 0 deletions sahi/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
__version__ = "0.10.1"

from sahi.auto_model import AutoDetectionModel
Loading

0 comments on commit 14307c5

Please sign in to comment.