Python Forum

Full Version: Dogs Vs Cats Clean Datasets and Corruprtion
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I seem to have an issue with the data set for the dogs vs cats scenario. Does anyone know where I can download a data set other than this 1? kagglecatsanddogs_5340.zip, the 1 on the Microsoft page?

Also, how can you find the corrupted ones? Model.fit occurs out of sight so I don't know how to trace it.

Thanks

{relevant code that worked with my original dataset}

Quote:trainRescale = ImageDataGenerator(rescale=1./255.0)

traindata = trainRescale.flow_from_directory('dogs-vs-cats/train', class_mode = 'binary', batch_size = 64, target_size = (200,200))

model.fit(traindata, steps_per_epoch = 16, epochs = 66)
Try google
(Nov-13-2023, 03:54 PM)Larz60+ Wrote: [ -> ]Try google

Yes, of course I tried that. First thing I did. Can't find various other options than the 1 I found, besides a light version with too few images.

Any idea how to find which ones are corrupt? .
Hi,
I have downloaded the 'cats only' dataset from kaggle some time ago. (125.000 images)
I think there is also a dogs only dataset.
For me, the imgs are too small (pixelwise), but i did not observe any corrupted ones.
Depending on how many you need foryour project, you could write a python
program using PIL, Image, and img.show each one. (Corrupted ones don't show)
Or better, with a try...except.
Alternatively you could open , say 500 at once in Photoshop (elements), Lightroom, or even GIMP.
Corrupted ones should raise a mesaage.
Paul
Thanks. Will give it a go.