目录
sam部署教程:
segment-anyghing地址:
sam onnx地址:
报错:
encode继续报错:
sam部署教程:
Ascend/ModelZoo-PyTorch - Gitee.com
segment-anyghing地址:
https://github.com/visheratin/segment-anything
https://github.com/OroChippw/segment-anything
ais_bench
sam onnx地址:
https://github.com/OroChippw/SegmentAnything-OnnxRunner?tab=readme-ov-file
报错:
import auto_optimizer
解决方法:安装msit
msit: 统一推理工具链入口,提供客户一体化开发工具,支持一站式调试调优 - Gitee.com
encode继续报错:
Traceback (most recent call last):File "/root/lbg/project/ACL_PyTorch/built-in/cv/SAM/encoder_onnx_modify.py", line 158, in <module>graph = fa_adapter.adapt()File "/root/lbg/project/ACL_PyTorch/built-in/cv/SAM/encoder_onnx_modify.py", line 29, in adaptself.__adapt_layer(softmax)File "/root/lbg/project/ACL_PyTorch/built-in/cv/SAM/encoder_onnx_modify.py", line 72, in __adapt_layertarget_shape = self.__infer_target_shape(layer_name_prefix, q)File "/root/lbg/project/ACL_PyTorch/built-in/cv/SAM/encoder_onnx_modify.py", line 110, in __infer_target_shapeshape_q = self.__graph.add_node(File "/usr/local/lib/python3.10/dist-packages/auto_optimizer/graph_refactor/onnx/graph.py", line 402, in add_nodereturn self._add_node(node)File "/usr/local/lib/python3.10/dist-packages/auto_optimizer/graph_refactor/interface/base_graph.py", line 569, in _add_noderaise ValueError("node name '{}' already exists!".format(node.name))
ValueError: node name 'Shape_q' already exists!
segment_anything_diff.patch
ACL_PyTorch/built-in/cv/SAM/segment_anything_diff.patch
ModelZoo-PyTorch/ACL_PyTorch/built-in/cv/SAM/segment_anything_diff.patch at 6a2804a358a5b18e3dac1ab902f41f88e240b00f · Ascend/ModelZoo-PyTorch · GitHub
cv报错:
Traceback (most recent call last):File "/root/lbg/sam_quant_preprocessing.py", line 19, in <module>import cv2File "/usr/local/lib/python3.10/dist-packages/cv2/__init__.py", line 181, in <module>bootstrap()File "/usr/local/lib/python3.10/dist-packages/cv2/__init__.py", line 153, in bootstrapnative_module = importlib.import_module("cv2")File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
sudo apt-get update
sudo apt-get install libgl1-mesa-glx