MobileAgent icon indicating copy to clipboard operation
MobileAgent copied to clipboard

TypeError: annotate() got an unexpected keyword argument 'labels'

Open hulk-zhk opened this issue 1 year ago • 1 comments

辛苦看看下面这个报错原因是什么呢?Python版本 3.9.13, 系统版本:windows 10 Traceback (most recent call last): File "D:\Project\script\MobileAgent-main\Mobile-Agent-v2\run.py", line 286, in perception_infos, width, height = get_perception_infos(adb_path, screenshot_file) File "D:\Project\script\MobileAgent-main\Mobile-Agent-v2\run.py", line 190, in get_perception_infos coordinates = det(screenshot_file, "icon", groundingdino_model) File "D:\Project\script\MobileAgent-main\Mobile-Agent-v2\MobileAgent\icon_localization.py", line 45, in det result = groundingdino_model(inputs) File "D:\Env\Python\lib\site-packages\modelscope\pipelines\base.py", line 220, in call output = self._process_single(input, *args, **kwargs) File "D:\Env\Python\lib\site-packages\modelscope\pipelines\base.py", line 255, in _process_single out = self.forward(out, **forward_params) File "C:\Users\xiaomi.cache\modelscope\modelscope_modules\GroundingDINO\ms_wrapper.py", line 35, in forward return self.model(inputs,**forward_params) File "D:\Env\Python\lib\site-packages\modelscope\models\base\base_torch_model.py", line 36, in call return self.postprocess(self.forward(*args, **kwargs)) File "C:\Users\xiaomi.cache\modelscope\modelscope_modules\GroundingDINO\ms_wrapper.py", line 66, in forward annotated_frame = annotate(image_source=image_source, boxes=boxes, logits=logits, phrases=phrases) File "C:\Users\xiaomi.cache\modelscope\modelscope_modules\GroundingDINO\groundingdino\util\inference.py", line 97, in annotate annotated_frame = box_annotator.annotate( File "D:\Env\Python\lib\site-packages\supervision\utils\conversion.py", line 23, in wrapper return annotate_func(self, scene, *args, **kwargs) TypeError: annotate() got an unexpected keyword argument 'labels'

hulk-zhk avatar Jul 22 '24 03:07 hulk-zhk

辛苦看看下面这个报错原因是什么呢?Python版本 3.9.13, 系统版本:windows 10 Traceback (most recent call last): File "D:\Project\script\MobileAgent-main\Mobile-Agent-v2\run.py", line 286, in perception_infos, width, height = get_perception_infos(adb_path, screenshot_file) File "D:\Project\script\MobileAgent-main\Mobile-Agent-v2\run.py", line 190, in get_perception_infos coordinates = det(screenshot_file, "icon", groundingdino_model) File "D:\Project\script\MobileAgent-main\Mobile-Agent-v2\MobileAgent\icon_localization.py", line 45, in det result = groundingdino_model(inputs) File "D:\Env\Python\lib\site-packages\modelscope\pipelines\base.py", line 220, in call output = self._process_single(input, *args, **kwargs) File "D:\Env\Python\lib\site-packages\modelscope\pipelines\base.py", line 255, in _process_single out = self.forward(out, **forward_params) File "C:\Users\xiaomi.cache\modelscope\modelscope_modules\GroundingDINO\ms_wrapper.py", line 35, in forward return self.model(inputs,**forward_params) File "D:\Env\Python\lib\site-packages\modelscope\models\base\base_torch_model.py", line 36, in call return self.postprocess(self.forward(*args, **kwargs)) File "C:\Users\xiaomi.cache\modelscope\modelscope_modules\GroundingDINO\ms_wrapper.py", line 66, in forward annotated_frame = annotate(image_source=image_source, boxes=boxes, logits=logits, phrases=phrases) File "C:\Users\xiaomi.cache\modelscope\modelscope_modules\GroundingDINO\groundingdino\util\inference.py", line 97, in annotate annotated_frame = box_annotator.annotate( File "D:\Env\Python\lib\site-packages\supervision\utils\conversion.py", line 23, in wrapper return annotate_func(self, scene, *args, **kwargs) TypeError: annotate() got an unexpected keyword argument 'labels'

这个错误是因为supervision更新了,有一些东西被修改了,可以尝试回退supervision的版本: pip install supervision==0.21.0

junyangwang0410 avatar Jul 22 '24 03:07 junyangwang0410