You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What are your thoughts on having a sort of CustomModel template class that would mostly serve as an example for others to follow such that it would allow them to create their own model to be used with YOLO-Patch-Based-Inference, instead of using a ultralytics-provided model (yolo, fastsam, rtdetr)?
This library uses ultralytics models, but only for making detections in one line of code. But if someone wanted to use their own model, all they really need to do is wrap it in a custom class than ensures that it has the following:
fromultralytics.engineimportResultsclassCustomModel:
model.names= ...
...
defpredict( batch, imgsz, conf, iou, classes, verbose, extra_args):
# Make predictions# Process predictionsresults=Results(...) # processed predictions, in ultralytics Results format returnresults
This would expand the use of the library for others who cannot use ultralytics due to commercial licenses (though, I think technically the dependency of Results still means that it cannot be used by those folks, but one thing at a time I guess).
For reference, this is similar to supervision's implementation of SAHI, where they are model agnostic, and only need the results come out as supervision.Detections.
The text was updated successfully, but these errors were encountered:
What are your thoughts on having a sort of
CustomModel
template class that would mostly serve as an example for others to follow such that it would allow them to create their own model to be used withYOLO-Patch-Based-Inference
, instead of using a ultralytics-provided model (yolo, fastsam, rtdetr)?This library uses ultralytics models, but only for making detections in one line of code. But if someone wanted to use their own model, all they really need to do is wrap it in a custom class than ensures that it has the following:
This would expand the use of the library for others who cannot use ultralytics due to commercial licenses (though, I think technically the dependency of
Results
still means that it cannot be used by those folks, but one thing at a time I guess).For reference, this is similar to
supervision
's implementation ofSAHI
, where they are model agnostic, and only need the results come out assupervision.Detections
.The text was updated successfully, but these errors were encountered: