diff --git a/PyTorch/contrib/cv/semantic_segmentation/MedSAM_for_PyTorch/README.md b/PyTorch/contrib/cv/semantic_segmentation/MedSAM_for_PyTorch/README.md index dedf12cb46d7bb884553c74fa7926b3046587825..ca1c2f02a924a3f849d8c0617eace69d76b206d4 100644 --- a/PyTorch/contrib/cv/semantic_segmentation/MedSAM_for_PyTorch/README.md +++ b/PyTorch/contrib/cv/semantic_segmentation/MedSAM_for_PyTorch/README.md @@ -28,7 +28,7 @@ ``` url=https://gitee.com/ascend/ModelZoo-PyTorch.git - code_path=PyTorch/contrib/cv/semantic_segmentation/ + code_path=PyTorch/contrib/cv/semantic_segmentation/MedSAM_for_PyTorch ``` # 准备训练环境 @@ -155,11 +155,11 @@ ```shell # 原始的SAM模型权重路径 - sam_ckpt_path = "../models/sam_vit_l_0b3195.pth" + sam_ckpt_path = "./models/sam_vit_l_0b3195.pth" # 训练好的MedSAM模型权重路径 medsam_ckpt_path = "workdir/MedSAM-ViT-L-20230912-1734/medsam_model_latest.pth" # 转换后输出的模型权重路径 - save_path = "../models/medsam_vit_l_train.pth" + save_path = "./models/medsam_vit_l_train.pth" ``` 然后执行转换脚本得到转换后的模型: ```shell diff --git a/PyTorch/contrib/cv/semantic_segmentation/MedSAM_for_PyTorch/eval_multi_npus.sh b/PyTorch/contrib/cv/semantic_segmentation/MedSAM_for_PyTorch/eval_multi_npus.sh index 375e3c3e47beb5884b53e1447e0499eba7102302..c259804e33c56a70aa7d287f220f17a74b910032 100644 --- a/PyTorch/contrib/cv/semantic_segmentation/MedSAM_for_PyTorch/eval_multi_npus.sh +++ b/PyTorch/contrib/cv/semantic_segmentation/MedSAM_for_PyTorch/eval_multi_npus.sh @@ -11,8 +11,8 @@ MASTER_PORT=6789 python eval_multi_npus.py \ --task_name "${TASK}" \ --model_type vit_b \ - --data_path ../datasets/npy/CT_Abd \ - --checkpoint ../models/sam_vit_b_01ec64.pth \ + --data_path ./datasets/npy/CT_Abd \ + --checkpoint ./models/sam_vit_b_01ec64.pth \ --work_dir ./work_dir \ --num_workers 8 \ --nnodes "${NNODES}" \ diff --git a/PyTorch/contrib/cv/semantic_segmentation/MedSAM_for_PyTorch/requirements.txt b/PyTorch/contrib/cv/semantic_segmentation/MedSAM_for_PyTorch/requirements.txt index dc1088606a87380e9e55aaa7d729a2bd8957d2b5..229342c8deae518c27dbc7525a3623b712c7eda8 100644 --- a/PyTorch/contrib/cv/semantic_segmentation/MedSAM_for_PyTorch/requirements.txt +++ b/PyTorch/contrib/cv/semantic_segmentation/MedSAM_for_PyTorch/requirements.txt @@ -1,4 +1,4 @@ -torchvision +torchvision==0.15.2 opencv-python pycocotools matplotlib diff --git a/PyTorch/contrib/cv/semantic_segmentation/MedSAM_for_PyTorch/train_multi_npus.sh b/PyTorch/contrib/cv/semantic_segmentation/MedSAM_for_PyTorch/train_multi_npus.sh index 6e7fe29fccaa0911617a85544fa22254cb31b8ac..f2c6c08112ca1752ef1e7cb116d9de29dd250b46 100644 --- a/PyTorch/contrib/cv/semantic_segmentation/MedSAM_for_PyTorch/train_multi_npus.sh +++ b/PyTorch/contrib/cv/semantic_segmentation/MedSAM_for_PyTorch/train_multi_npus.sh @@ -11,8 +11,8 @@ MASTER_PORT=6789 python train_multi_npus.py \ --task_name "${TASK}" \ --model_type vit_b \ - --tr_npy_path ../datasets/npy/CT_Abd \ - --checkpoint ../models/sam_vit_b_01ec64.pth \ + --tr_npy_path ./data/npy/CT_Abd \ + --checkpoint ./models/sam_vit_b_01ec64.pth \ --work_dir ./work_dir \ --num_epochs 100 \ --batch_size 4 \