FP16
#785
Replies: 1 comment
-
For yolov5 mixed precision inference: from sahi import AutoDetectionModel
from sahi.predict import predict
import yolov5
model = yolov5.load('yolov5s.pt')
model.amp = True # for automated mixed precision inference
detection_model = AutoDetectionModel.from_pretrained(
model_type='yolov5',
model=model,
)
predict(
detection_model=detection_model,
other parameters ...
) For yolov5 fp16 inference: from sahi import AutoDetectionModel
from sahi.predict import predict
import yolov5
model = yolov5.load('yolov5s.pt')
model = model.half() # for half precision inference
detection_model = AutoDetectionModel.from_pretrained(
model_type='yolov5',
model=model,
)
predict(
detection_model=detection_model,
other parameters ...
) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Whether YOLOV5 fp16 inference is supported
Beta Was this translation helpful? Give feedback.
All reactions