srcnn icon indicating copy to clipboard operation
srcnn copied to clipboard

ValueError: With n_samples=0, test_size=0.2 and train_size=0.8, the resulting train set will be empty. Adjust any of the aforementioned parameters.

Open Ying-Jung opened this issue 3 years ago • 12 comments

ValueError: With n_samples=0, test_size=0.2 and train_size=0.8, the resulting train set will be empty. Adjust any of the aforementioned parameters.

Can someone tell me how can I fix it? Thanks for everything .

Ying-Jung avatar Mar 26 '21 08:03 Ying-Jung

in preprocess.py file generate_samples function doen not generate 400*400 dimension images.

give proper path

sagar1899 avatar Apr 26 '21 04:04 sagar1899

in preprocess.py file generate_samples function doen not generate 400*400 dimension images.

give proper path

Hi @sagar1899, cud u able to run this in ur system.....if yes can u pls share the code & the places u modified fr the sme.......

Sinnovate avatar Nov 21 '21 14:11 Sinnovate

in preprocess.py file generate_samples function doen not generate 400*400 dimension images. give proper path

Hi @sagar1899, cud u able to run this in ur system.....if yes can u pls share the code & the places u modified fr the sme.......

yes i'm able to run this code in my system.

in preprocess.py file first it will generate smaller size multiple images in "raw" directory. then it will generate train and test data in "train" and "test" directory. then it will generate data in "train_labels" and "test_labels". provide proper paths in functions in preprocess.py.

sagar1899 avatar Dec 01 '21 04:12 sagar1899

I believe the problem is that in the util.py file, it only adds to y if the y_path is None.

emmajreid avatar Jan 27 '22 17:01 emmajreid

I believe the problem is that in the util.py file, it only adds to y if the y_path is None.

Yes you have to change code "y path is not none in util.py"

sagar1899 avatar Jan 29 '22 04:01 sagar1899

in preprocess.py file generate_samples function doen not generate 400*400 dimension images. give proper path

Hi @sagar1899, cud u able to run this in ur system.....if yes can u pls share the code & the places u modified fr the sme.......

yes i'm able to run this code in my system.

in preprocess.py file first it will generate smaller size multiple images in "raw" directory. then it will generate train and test data in "train" and "test" directory. then it will generate data in "train_labels" and "test_labels". provide proper paths in functions in preprocess.py.

Thanks Sagar. How much does this software need RAM for training? Because I faced memory errors (having about 20Gb). did this also happen to you? I used the sample image provided by the author. I also reduced the extent to 25% of the original image, but still facing memory error. I would be grateful to have your comments.

Sadrim-71 avatar Apr 12 '22 20:04 Sadrim-71

in preprocess.py file generate_samples function doen not generate 400*400 dimension images. give proper path

Hi @sagar1899, cud u able to run this in ur system.....if yes can u pls share the code & the places u modified fr the sme.......

yes i'm able to run this code in my system. in preprocess.py file first it will generate smaller size multiple images in "raw" directory. then it will generate train and test data in "train" and "test" directory. then it will generate data in "train_labels" and "test_labels". provide proper paths in functions in preprocess.py.

Thanks Sagar. How much does this software need RAM for training? Because I faced memory errors (having about 20Gb). did this also happen to you? I used the sample image provided by the author. I also reduced the extent to 25% of the original image, but still facing memory error. I would be grateful to have your comments.

Yes I already face this problem, I have 8 gb ram in my pc and i can train upto 800-1000 images in training dataset. So make small dataset and train on it.

sagar1899 avatar Apr 16 '22 08:04 sagar1899

in preprocess.py file generate_samples function doen not generate 400*400 dimension images. give proper path

Hi @sagar1899, cud u able to run this in ur system.....if yes can u pls share the code & the places u modified fr the sme.......

yes i'm able to run this code in my system. in preprocess.py file first it will generate smaller size multiple images in "raw" directory. then it will generate train and test data in "train" and "test" directory. then it will generate data in "train_labels" and "test_labels". provide proper paths in functions in preprocess.py.

Thanks Sagar. How much does this software need RAM for training? Because I faced memory errors (having about 20Gb). did this also happen to you? I used the sample image provided by the author. I also reduced the extent to 25% of the original image, but still facing memory error. I would be grateful to have your comments.

Yes I already face this problem, I have 8 gb ram in my pc and i can train upto 800-1000 images in training dataset. So make small dataset and train on it.

thanks. you are right. it worked.

Sadrim-71 avatar Apr 18 '22 17:04 Sadrim-71

in preprocess.py file generate_samples function doen not generate 400*400 dimension images. give proper path

Hi @sagar1899, cud u able to run this in ur system.....if yes can u pls share the code & the places u modified fr the sme.......

yes i'm able to run this code in my system. in preprocess.py file first it will generate smaller size multiple images in "raw" directory. then it will generate train and test data in "train" and "test" directory. then it will generate data in "train_labels" and "test_labels". provide proper paths in functions in preprocess.py.

Thanks Sagar. How much does this software need RAM for training? Because I faced memory errors (having about 20Gb). did this also happen to you? I used the sample image provided by the author. I also reduced the extent to 25% of the original image, but still facing memory error. I would be grateful to have your comments.

Yes I already face this problem, I have 8 gb ram in my pc and i can train upto 800-1000 images in training dataset. So make small dataset and train on it.

thanks. you are right. it worked.

Hi @Sadrim-71 can please share the full code, i got multiple errors related to path. Iam unable to clear the error. I would be thankful to have answer from you.

Thank you.

VJdroid avatar Dec 22 '22 13:12 VJdroid

mycrnn_v2.zip Hello @VJdroid take a look at it. i hope it helps. best wishes

Sadrim-71 avatar Dec 24 '22 15:12 Sadrim-71

Hi, Find the attached file that contains code.

Thanks, Sagar Khimani

On Sat, Dec 24, 2022, 9:23 PM sadra imanyfar @.***> wrote:

mycrnn_v2.zip https://github.com/WarrenGreen/srcnn/files/10298841/mycrnn_v2.zip Hello @VJdroid https://github.com/VJdroid take a look at it. i hope it helps. best wishes

— Reply to this email directly, view it on GitHub https://github.com/WarrenGreen/srcnn/issues/6#issuecomment-1364548258, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASDXI23UG27MMKXEXFFF67DWO4L5ZANCNFSM4Z25IQ3Q . You are receiving this because you were mentioned.Message ID: @.***>

sagar1899 avatar Dec 24 '22 15:12 sagar1899

I have the same error, trying to perform super resolution on satellite images using a convolutional neural network (CNN). Can someone help please?

PuieMarian avatar Dec 18 '23 07:12 PuieMarian