Add CLI support for SAM, RTDETR (#3253)
This commit is contained in:
parent
4c2033d7c3
commit
58bccb1a9f
2 changed files with 10 additions and 2 deletions
|
|
@ -17,6 +17,7 @@ class SAM:
|
|||
# Should raise AssertionError instead?
|
||||
raise NotImplementedError('Segment anything prediction requires pre-trained checkpoint')
|
||||
self.model = build_sam(model)
|
||||
self.task = 'segment' # required
|
||||
self.predictor = None # reuse predictor
|
||||
|
||||
def predict(self, source, stream=False, **kwargs):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue