EDSR-Tensorflow icon indicating copy to clipboard operation
EDSR-Tensorflow copied to clipboard

Issue about training my own dataset

Open kennylovesfree opened this issue 8 years ago • 2 comments

Thanks for your sharing, it helps a lot. But when I use my own images to train, it always show like below:

Traceback (most recent call last): File "train.py", line 20, in network.train(args.iterations,args.savedir) File "/home/zhangyao/kenny/SR/EDSR-Tensorflow/model.py", line 206, in train test_x,test_y = self.test_data(*self.test_args) File "/home/zhangyao/kenny/SR/EDSR-Tensorflow/data.py", line 41, in get_test_set img = crop_center(img,original_size,original_size) File "/home/zhangyao/kenny/SR/EDSR-Tensorflow/data.py", line 81, in crop_center y,x,_ = img.shape ValueError: need more than 2 values to unpack

I was wondering whether it happens because about too small image size. Look forward for your help~

kennylovesfree avatar Oct 20 '17 13:10 kennylovesfree

Seen some confusion with this before. It looks like this is happening because you're using black and white images. I'll make a fix for this, because it seems to be counter-intuitive to people.

Hoping to fix this tonight, actually. I'll keep you posted

jmiller656 avatar Oct 20 '17 14:10 jmiller656

Thanks for your help! I have not checked whether I use black and white images. But when I use larger(>500*500)jpg images, it works. So maybe it caused by too small iamge?

kennylovesfree avatar Oct 22 '17 06:10 kennylovesfree