pytorch-UNet
pytorch-UNet copied to clipboard
Error in dataset.py after running training cmd
I ran:
python train.py --train_dataset images_folder/ --device 'cuda:0' --epochs 10 --save_freq 1 --save_model 1 --model_name round1 --crop 2560 --learning_rate 0.0001 --checkpoint_path checkpoint
Error output:
Traceback (most recent call last):
File "train.py", line 40, in <module>
val_dataset = ImageToImage2D(args.val_dataset, tf_val)
File "/unet/pytorch-UNet/unet/dataset.py", line 122, in __init__
self.input_path = os.path.join(dataset_path, 'images')
File "/anaconda3/lib/python3.7/posixpath.py", line 80, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
Having same issue , in python 3.7 and 2.7
@getcontrol just use mine, it actually works: https://github.com/joehoeller/legendary-palm-tree
@joehoeller @getcontrol The path of val dataset is required, change the command as follow:
python train.py
--train_dataset images_folder/
--val_dataset images_folder_2/ . # Added Line
--device 'cuda:0' --epochs 10
--save_freq 1 --save_model 1
--model_name round1 --crop 256
--learning_rate 0.0001
--checkpoint_path checkpoint