output_dir = "../work_dirs/ZihaoDataset-PSPNet/图表" os.makedirs(output_dir, exist_ok=True) for each_class in class_list: each_class_metrics = np.array(metrics_json[each_class]['metrics']) plt.figure(figsize=(16, 8)) for idx, each_metric in enumerate(['IoU', 'Acc', 'Dice', ...
!python tools/train.py configs/teeth_seg/baseline.py --work-dir work_dir/baseline 测试代码: !python tools/test.py configs/teeth_seg/baseline.py work_dir/baseline/iter_40000.pth --out test_result/baseline/iter_40000.pkl --show-dir test_result/baseline 这里为了快,只训练了40000轮,按照上述流...
例如,可以设置data_root为数据集所在目录,work_dir为训练结果保存目录等。 开始训练:使用tools/train.py脚本开始训练。例如,可以使用python tools/train.py ${CONFIG_FILE} ${WORK_DIR} --gpus ${GPU_NUM}命令进行训练,其中${CONFIG_FILE}为配置文件路径,${WORK_DIR}为训练结果保存目录,${GPU_NUM}为使用的G...
GPUS=8 sh tools/slurm_train.sh dev mae_thermal configs/mae/upernet_mae-base_fp16_512×512_160k_thermal.py --work-dir work_dirs/thermal_res/
# 模型 decode/auxiliary 输出头,指定为类别个数 cfg.model.decode_head.num_classes = NUM_CLASS cfg.model.auxiliary_head.num_classes = NUM_CLASS # 训练 Batch Size cfg.train_dataloader.batch_size = 4 # 结果保存目录 cfg.work_dir = './work_dirs/WHUDataset_PSPNet/' ...
work_dir = './work_dirs/swin_tiny_patch4_window7_224' gpu_ids = range(0, 1) auto_resume = False 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26.
file_path:./base/models/upernet_swin.py 训练的python命令 python ./tools/train.py configs/swin/swin-small-patch4-window7-in1k-pre_upernet_8xb2-160k_ade20k-512x512.py --work-dir /VisualGroup/share/qian/save_model/shang_gong_zhuang/chatou/2310201 --amp...
visualization=dict(type='SegVisualizationHook')) 训练 mim train mmsegmentation configs/stdc2_512x1024_10k_xiaofang.py --work-dir logs/stdc2 测试结果:MIoU=0.9225,下面分别是RGB图像、真实Label、STDC模型输出 👏本文参与了SegmentFault 思否写作挑战赛,欢迎正在阅读的你也加入。
weight_decay=0.0005) optimizer_config = dict() lr_config = dict(policy='poly', power=0.9, min_lr=0.0001, by_epoch=False) total_iters = 200 checkpoint_config = dict(by_epoch=False, interval=200) evaluation = dict(interval=200, metric='mIoU') work_dir = './work_dirs/tutorial' seed ...
pythontools/train.py<config_file>[--gpus<num_gpus>] [--work-dir<work_dir>] 其中,<config_file>是配置文件的路径,--gpus指定使用的 GPU 数量,--work-dir指定保存训练结果的目录。 3.5 模型测试 可以使用以下命令进行模型测试: pythontools/test.py<config_file><checkpoint_file>[--gpus<num_gpus>] ...