Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行 python bigImgSeg.py 报错 #8

Closed
cgliu2000 opened this issue May 26, 2023 · 18 comments
Closed

运行 python bigImgSeg.py 报错 #8

cgliu2000 opened this issue May 26, 2023 · 18 comments

Comments

@cgliu2000
Copy link
Collaborator

(segstone) root@autodl-container-d04f44a835-2d5c31f5:/project/StoneSegmentator/tools/splitSeg# python bigImgSeg.py
Traceback (most recent call last):
File "bigImgSeg.py", line 5, in
import torch
File "/root/miniconda3/envs/segstone/lib/python3.8/site-packages/torch/init.py", line 229, in
from torch._C import * # noqa: F403
ImportError: /root/miniconda3/envs/segstone/lib/python3.8/site-packages/torch/lib/libtorch_cuda.so: undefined symbol: cudaGraphInstantiateWithFlags, version libcudart.so.11.0
(segstone) root@autodl-container-d04f44a835-2d5c31f5:
/project/StoneSegmentator/tools/splitSeg#
image

@OroChippw
Copy link
Collaborator

在哪个服务器上面运行的?这个bug是怎么触发的?之前我更换服务器应该已经解决这个环境问题了,而且流程已经全部走通过一次了

@cgliu2000
Copy link
Collaborator Author

3090那个服务器,没换

@OroChippw
Copy link
Collaborator

3090那个服务器,没换

你输入以下几个指令分别截图以下结果给我们看看
1、pip list ,这个不用全部截,就看看torch 和torchvision的版本就行了
2、nvcc -V
3、nvidia-smi

@cgliu2000
Copy link
Collaborator Author

还要请问labelme怎么调整标注的问题,需要用哪个文件夹(似乎只能打开images)

@cgliu2000
Copy link
Collaborator Author

image
image
Uploading image.png…

@cgliu2000
Copy link
Collaborator Author

image

@OroChippw
Copy link
Collaborator

你中间是否在SAM项目中运行了pip install -r requirements的指令 我给你初始化环境的torch版本是1.11.0 + cu113 ,在你使用SAM的时候里面的requirements会要求使用torch2.0.x以上的版本 ,那个是用于将SAM模型从torch转化为onnx用的,这样子就会引起冲突

@OroChippw
Copy link
Collaborator

image

labelme我许久没用过了 ,如果你是要打开保存标签的文件夹 ,应该是labels,如果不对的话换成json就好了,多试试

@cgliu2000
Copy link
Collaborator Author

你中间是否在SAM项目中运行了pip install -r requirements的指令 我给你初始化环境的torch版本是1.11.0 + cu113 ,在你使用SAM的时候里面的requirements会要求使用torch2.0.x以上的版本 ,那个是用于将SAM模型从torch转化为onnx用的,这样子就会引起冲突

在你最后一次修改代码之后,我自己尝试跑的时候,运行过一次pip install -r requirements

@cgliu2000
Copy link
Collaborator Author

image

labelme我许久没用过了 ,如果你是要打开保存标签的文件夹 ,应该是labels,如果不对的话换成json就好了,多试试

打开jsons文件夹是空的。打开单个json文件是不允许打开的。究竟要怎么打开标注嘛……
image

@OroChippw
Copy link
Collaborator

你运行的requirements.txt内容给我看看

@cgliu2000
Copy link
Collaborator Author

你运行的requirements.txt内容给我看看

现在重新运行requirements.txt吗?

@OroChippw
Copy link
Collaborator

你运行的requirements.txt内容给我看看

现在重新运行requirements.txt吗?

不用 打开requirements.txt里面的内容粘贴给我看看

@cgliu2000
Copy link
Collaborator Author

torch
torchvision
certifi
charset-normalizer
coloredlogs
contourpy
cycler
flatbuffers
fonttools
gitdb
GitPython
humanfriendly
idna
importlib-resources
kiwisolver
matplotlib
mpmath
numpy
onnx
onnxruntime-gpu
opencv-python
packaging
pandas
Pillow
protobuf
psutil
pyparsing
python-dateutil
pytz
PyYAML
requests
scipy
seaborn
six
smmap
sympy
thop
tqdm
typing_extensions
tzdata
urllib3
zipp
labelme
pandas
seaborn

YOLOv5 requirements

Usage: pip install -r requirements.txt

Base ------------------------------------------------------------------------

gitpython>=3.1.30
matplotlib>=3.3
numpy>=1.18.5
opencv-python>=4.1.1
Pillow>=7.1.2
psutil # system resources
PyYAML>=5.3.1
requests>=2.23.0
scipy>=1.4.1
thop>=0.1.1 # FLOPs computation
torch>=1.7.0 # see https://pytorch.org/get-started/locally (recommended)
torchvision>=0.8.1
tqdm>=4.64.0

ultralytics>=8.0.100

protobuf<=3.20.1 # ultralytics/yolov5#8012

Logging ---------------------------------------------------------------------

tensorboard>=2.4.1

clearml>=1.2.0

comet

Plotting --------------------------------------------------------------------

pandas>=1.1.4
seaborn>=0.11.0

Export ----------------------------------------------------------------------

coremltools>=6.0 # CoreML export

onnx>=1.10.0 # ONNX export

onnx-simplifier>=0.4.1 # ONNX simplifier

nvidia-pyindex # TensorRT export

nvidia-tensorrt # TensorRT export

scikit-learn<=1.1.2 # CoreML quantization

tensorflow>=2.4.0 # TF exports (-cpu, -aarch64, -macos)

tensorflowjs>=3.9.0 # TF.js export

openvino-dev # OpenVINO export

Deploy ----------------------------------------------------------------------

setuptools>=65.5.1 # Snyk vulnerability fix

tritonclient[all]~=2.24.0

Extras ----------------------------------------------------------------------

ipython # interactive notebook

mss # screenshots

albumentations>=1.0.3

pycocotools>=2.0.6 # COCO mAP

1 similar comment
@cgliu2000
Copy link
Collaborator Author

torch
torchvision
certifi
charset-normalizer
coloredlogs
contourpy
cycler
flatbuffers
fonttools
gitdb
GitPython
humanfriendly
idna
importlib-resources
kiwisolver
matplotlib
mpmath
numpy
onnx
onnxruntime-gpu
opencv-python
packaging
pandas
Pillow
protobuf
psutil
pyparsing
python-dateutil
pytz
PyYAML
requests
scipy
seaborn
six
smmap
sympy
thop
tqdm
typing_extensions
tzdata
urllib3
zipp
labelme
pandas
seaborn

YOLOv5 requirements

Usage: pip install -r requirements.txt

Base ------------------------------------------------------------------------

gitpython>=3.1.30
matplotlib>=3.3
numpy>=1.18.5
opencv-python>=4.1.1
Pillow>=7.1.2
psutil # system resources
PyYAML>=5.3.1
requests>=2.23.0
scipy>=1.4.1
thop>=0.1.1 # FLOPs computation
torch>=1.7.0 # see https://pytorch.org/get-started/locally (recommended)
torchvision>=0.8.1
tqdm>=4.64.0

ultralytics>=8.0.100

protobuf<=3.20.1 # ultralytics/yolov5#8012

Logging ---------------------------------------------------------------------

tensorboard>=2.4.1

clearml>=1.2.0

comet

Plotting --------------------------------------------------------------------

pandas>=1.1.4
seaborn>=0.11.0

Export ----------------------------------------------------------------------

coremltools>=6.0 # CoreML export

onnx>=1.10.0 # ONNX export

onnx-simplifier>=0.4.1 # ONNX simplifier

nvidia-pyindex # TensorRT export

nvidia-tensorrt # TensorRT export

scikit-learn<=1.1.2 # CoreML quantization

tensorflow>=2.4.0 # TF exports (-cpu, -aarch64, -macos)

tensorflowjs>=3.9.0 # TF.js export

openvino-dev # OpenVINO export

Deploy ----------------------------------------------------------------------

setuptools>=65.5.1 # Snyk vulnerability fix

tritonclient[all]~=2.24.0

Extras ----------------------------------------------------------------------

ipython # interactive notebook

mss # screenshots

albumentations>=1.0.3

pycocotools>=2.0.6 # COCO mAP

@TDIT-haha
Copy link
Owner

TDIT-haha commented May 26, 2023

@lugushaoye labelme的使用我会简单录制一个视频讲解下使用的方式针对我们的项目,这样应该能解决你的问题。至于环境问题,鉴于你的情况,我会重新查看下,目前我建议你在环境中执行pip install torchvision==0.14.0,再试试

@cgliu2000
Copy link
Collaborator Author

image
版本改了。我再试试

@OroChippw
Copy link
Collaborator

image 版本改了。我再试试

试试 如果仍然存在问题 继续反馈给我们

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants