Beckschen / 3D-TransUNet

This is the official repository for the paper "3D TransUNet: Advancing Medical Image Segmentation through Vision Transformers"
Apache License 2.0
182 stars 10 forks source link

我在运行train脚本文件时出错 #4

Open usst-changbo opened 10 months ago

usst-changbo commented 10 months ago

run on fold: 0 /train.py: line 14: import: command not found /train.py: line 15: import: command not found /train.py: line 16: import: command not found /train.py: line 17: import: command not found /train.py: line 18: import: command not found /train.py: line 19: import: command not found /train.py: line 20: from: command not found /train.py: line 21: from: command not found /train.py: line 22: from: command not found /train.py: line 24: syntax error near unexpected token (' /train.py: line 24:def main():' 我已经安装好各种包,为什么会这样报错,我进一步该如何解决

Beckschen commented 10 months ago

Hello,

Thanks for your interests. May you kindly provide your input command (how you run the project)?

Best Jieneng

usst-changbo commented 10 months ago

./train.py

usst-changbo commented 10 months ago

export nnUNet_N_proc_DA=36 export nnUNet_codebase="/home/changbo/Segmentation/nnUNet_V1" export nnUNet_raw_data_base="/home/changbo/Segmentation/3D-TransUNet-main/nnUNet_raw_data_base/" export nnUNet_preprocessed="/home/changbo/Segmentation/3D-TransUNet-main/nnUNet_preprocessed" export RESULTS_FOLDER="/home/changbo/Segmentation/3D-TransUNet-main/results/"

CONFIG=$1

echo $CONFIG

unit test

fold=0 echo "run on fold: ${fold}" nnunet_use_progress_bar=1 CUDA_VISIBLE_DEVICES=0\ ../train.py --fold='0' --config='/home/changbo/Segmentation/3D-TransUNet-main/configs/Synapse/decoder_only.yaml' --resume=''

I modified part of the code in the train.sh file, as shown above, and then ran the strain.sh file directly with the mouse. The following problem occurred, what happened?

(nnunetTransunet3d) [changbo@localhost scripts]$ /bin/bash /home/changbo/Segmentation/3D-TransUNet-main/scripts/train.sh

run on fold: 0 ../train.py: line 14: import: command not found ../train.py: line 15: import: command not found ../train.py: line 16: import: command not found ../train.py: line 17: import: command not found ../train.py: line 18: import: command not found ../train.py: line 19: import: command not found ../train.py: line 20: from: command not found ../train.py: line 21: from: command not found ../train.py: line 22: from: command not found ../train.py: line 24: syntax error near unexpected token (' ../train.py: line 24:def main():'

usst-changbo commented 10 months ago

export nnUNet_N_proc_DA=36 WhaWhat is the purpose of this codet is the purpose of this code