Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added yolov7 into the sahi model.py #1

Open
wants to merge 17 commits into
base: inference
Choose a base branch
from
Open
Prev Previous commit
Next Next commit
Tested with other functions of SAHI
  • Loading branch information
kimb3rlyn committed Sep 19, 2022
commit 3fbf5e626541dbf6144af28d271ac1b9f25562ad
2 changes: 0 additions & 2 deletions scripts/inferenceSahi.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from importlib import resources
from sahi.predict import predict,get_prediction,get_sliced_prediction
from yolov7.utils.sahiModelExtended import Yolov7DetectionModel
from yolov7.utils.general import increment_path
from sahi.slicing import slice_image

# same_size : True if all the image that are passed in are the same size (defaulted to True)
Expand All @@ -17,7 +16,6 @@
weightPath = resources.files('yolov7').joinpath('weights/yolov7-e6_state.pt')
cfgPath = resources.files('yolov7').joinpath('cfg/deploy/yolov7-e6.yaml')


model = Yolov7DetectionModel(
image_size = 1280,
model_path = weightPath,
Expand Down