当我运行官方源码:python demo/video_demo.py /media/zzbhhh/d8213707-f6c1-4ff9-bc4f-8634a83370e4/document/Code/mmsegmentation-main/pyqt5/downloadVideo.MP4 /media/zzbhhh/d8213707-f6c1-4ff9-bc4f-8634a83370e4/document/Code/mmsegmentation-main/configs/stdc/stdc1_in1k-pre_4xb12-80k_cityscapes-512x1024.py /media/zzbhhh/d8213707-f6c1-4ff9-bc4f-8634a83370e4/document/Code/mmsegmentation-main/configs/stdc/stdc1_in1k-pre_512x1024_80k_cityscapes_20220224_141648-3d4c2981.pth进行视频的分割可视化时,报错
libGL error: MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: 无法打开共享对象文件: 没有那个文件或目录 (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast
Traceback (most recent call last):
File "demo/video_demo.py", line 119, in
main()
File "demo/video_demo.py", line 101, in main
draw_img = show_result_pyplot(model, frame, result)
File "/media/zzbhhh/d8213707-f6c1-4ff9-bc4f-8634a83370e4/document/Code/mmsegmentation-main/mmseg/apis/inference.py", line 203, in show_result_pyplot
visualizer.add_datasample(
File "/home/zzbhhh/anaconda3/envs/openmmlab-1.0/lib/python3.8/site-packages/mmengine/dist/utils.py", line 401, in wrapper
return func(*args, *kwargs)
File "/media/zzbhhh/d8213707-f6c1-4ff9-bc4f-8634a83370e4/document/Code/mmsegmentation-main/mmseg/visualization/local_visualizer.py", line 231, in add_datasample
self.add_image(name, drawn_img, step)
File "/home/zzbhhh/anaconda3/envs/openmmlab-1.0/lib/python3.8/site-packages/mmengine/dist/utils.py", line 401, in wrapper
return func(args, **kwargs)
File "/home/zzbhhh/anaconda3/envs/openmmlab-1.0/lib/python3.8/site-packages/mmengine/visualization/visualizer.py", line 1082, in add_image
vis_backend.add_image(name, image, step) # type: ignore
File "/home/zzbhhh/anaconda3/envs/openmmlab-1.0/lib/python3.8/site-packages/mmengine/visualization/vis_backend.py", line 56, in wrapper
obj._init_env() # type: ignore
File "/home/zzbhhh/anaconda3/envs/openmmlab-1.0/lib/python3.8/site-packages/mmengine/visualization/vis_backend.py", line 212, in _init_env
if not os.path.exists(self._save_dir):
File "/home/zzbhhh/anaconda3/envs/openmmlab-1.0/lib/python3.8/genericpath.py", line 19, in exists
os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
不知道是什么原因,尝试解决无果。
当我运行官方源码:python demo/video_demo.py /media/zzbhhh/d8213707-f6c1-4ff9-bc4f-8634a83370e4/document/Code/mmsegmentation-main/pyqt5/downloadVideo.MP4 /media/zzbhhh/d8213707-f6c1-4ff9-bc4f-8634a83370e4/document/Code/mmsegmentation-main/configs/stdc/stdc1_in1k-pre_4xb12-80k_cityscapes-512x1024.py /media/zzbhhh/d8213707-f6c1-4ff9-bc4f-8634a83370e4/document/Code/mmsegmentation-main/configs/stdc/stdc1_in1k-pre_512x1024_80k_cityscapes_20220224_141648-3d4c2981.pth进行视频的分割可视化时,报错 libGL error: MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: 无法打开共享对象文件: 没有那个文件或目录 (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri) libGL error: failed to load driver: swrast Traceback (most recent call last): File "demo/video_demo.py", line 119, in
main()
File "demo/video_demo.py", line 101, in main
draw_img = show_result_pyplot(model, frame, result)
File "/media/zzbhhh/d8213707-f6c1-4ff9-bc4f-8634a83370e4/document/Code/mmsegmentation-main/mmseg/apis/inference.py", line 203, in show_result_pyplot
visualizer.add_datasample(
File "/home/zzbhhh/anaconda3/envs/openmmlab-1.0/lib/python3.8/site-packages/mmengine/dist/utils.py", line 401, in wrapper
return func(*args, *kwargs)
File "/media/zzbhhh/d8213707-f6c1-4ff9-bc4f-8634a83370e4/document/Code/mmsegmentation-main/mmseg/visualization/local_visualizer.py", line 231, in add_datasample
self.add_image(name, drawn_img, step)
File "/home/zzbhhh/anaconda3/envs/openmmlab-1.0/lib/python3.8/site-packages/mmengine/dist/utils.py", line 401, in wrapper
return func(args, **kwargs)
File "/home/zzbhhh/anaconda3/envs/openmmlab-1.0/lib/python3.8/site-packages/mmengine/visualization/visualizer.py", line 1082, in add_image
vis_backend.add_image(name, image, step) # type: ignore
File "/home/zzbhhh/anaconda3/envs/openmmlab-1.0/lib/python3.8/site-packages/mmengine/visualization/vis_backend.py", line 56, in wrapper
obj._init_env() # type: ignore
File "/home/zzbhhh/anaconda3/envs/openmmlab-1.0/lib/python3.8/site-packages/mmengine/visualization/vis_backend.py", line 212, in _init_env
if not os.path.exists(self._save_dir):
File "/home/zzbhhh/anaconda3/envs/openmmlab-1.0/lib/python3.8/genericpath.py", line 19, in exists
os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
不知道是什么原因,尝试解决无果。