ultralytics 8.0.128 FastSAM autodownload and super() init (#3552)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
400f3f72a1
commit
ad99246ff1
7 changed files with 90 additions and 72 deletions
|
|
@ -21,6 +21,13 @@ from .predict import FastSAMPredictor
|
|||
|
||||
class FastSAM(YOLO):
|
||||
|
||||
def __init__(self, model='FastSAM-x.pt'):
|
||||
# Call the __init__ method of the parent class (YOLO) with the updated default model
|
||||
if model == 'FastSAM.pt':
|
||||
model = 'FastSAM-x.pt'
|
||||
super().__init__(model=model)
|
||||
# any additional initialization code for FastSAM
|
||||
|
||||
@smart_inference_mode()
|
||||
def predict(self, source=None, stream=False, **kwargs):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue