Closed DiamondGlassDrill closed 1 year ago
I tried also to look where I can add models in e.g. site_packages metaseg but couldn't find where to add it?
Hello
You should provide model type in image_predict and it will download the file automatically and start do detection afterwards
SegAutoMaskPredictor <-- this init doesn't take model_type so it is a syntax error.
If you check here https://github.com/kadirnar/segment-anything-video/blob/main/examples/image_cv_segautomask.py#L12
You can see that we use model_type at "image_predict"
Will check it tomorrow. Makes total sense, and the advice never code when tired, just to make the code base ready :). Thanks for the support.
Tried to use metaseg in image and video project but couldn't do anything as it claimed that it doesn't know a model_type: self.segmentor = SegAutoMaskPredictor(model_type="vit_l", points_per_side=16, points_per_batch=64) TypeError: init() got an unexpected keyword argument 'model_type'
Code: import cv2 from PyQt6 import QtCore, QtGui, QtWidgets from led_grid import LedGrid from metaseg import SegAutoMaskPredictor
class HandTracker(QtCore.QObject): def init(self, grid): super().init() self.grid = grid self.cap = cv2.VideoCapture(0) self.segmentor = SegAutoMaskPredictor(model_type="vit_l", points_per_side=16, points_per_batch=64)