saksham789 / dog-breed-classification-stanford-dog-dataset Goto Github PK
View Code? Open in Web Editor NEWAn example of using CNN for classification of dogs
License: MIT License
An example of using CNN for classification of dogs
License: MIT License
Hello and thank you for sharing this code!
I am running into a ValueError when running the following from the 'directory_setup' notebook:
valid_dataset, valid_labels, train_dataset, train_labels = merge_datasets(
train_datasets, train_size, valid_size)
which outputs this error:
Unable to process data from train/n02105855-Shetland_sheepdog.pickle : could not broadcast input array from shape (79,224,224,3) into shape (80,224,224,3)
ValueError Traceback (most recent call last)
in ()
4
5 valid_dataset, valid_labels, train_dataset, train_labels = merge_datasets(
----> 6 train_datasets, train_size, valid_size)
7
8 print('Training:', train_dataset.shape, train_labels.shape)
in merge_datasets(pickle_files, train_size, valid_size, even_size)
29
30 train_breed = breed_set[vsize_per_class:end_l, :, :, :]
---> 31 train_dataset[start_t:end_t, :, :, :] = train_breed
32 train_labels[start_t:end_t] = label
33 start_t += tsize_per_class
ValueError: could not broadcast input array from shape (79,224,224,3) into shape (80,224,224,3)
Can you advise? Thanks!
Hi, saksham789!
Yesterday, i stared your repository DOG-BREED-CLASSIFICATION-STANFORD-DOG-DATASET
Then i try to run the Directory_setup.ipynb. The data files which include images/annotation/lists.tar were put into the “DOG-BREED-CLASSIFICATION-STANFORD-DOG-DATASET” folder. When i run the code:
test_folders = move_data_files(test_list, 'test')
train_folders = move_data_files(train_list, 'train'),
the errors comes..
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
/anaconda3/envs/py36/lib/python3.6/shutil.py in move(src, dst, copy_function)
543 try:
--> 544 os.rename(src, real_dst)
545 except OSError:
FileNotFoundError: [Errno 2] No such file or directory: 'Images/n02085620-Chihuahua/n02085620_2650.jpg' -> 'test/n02085620-Chihuahua/n02085620_2650.jpg'
During handling of the above exception, another exception occurred:
FileNotFoundError Traceback (most recent call last)
<ipython-input-15-0a57ebf1d01c> in <module>()
----> 1 test_folders = move_data_files(test_list, 'test')
2 train_folders = move_data_files(train_list, 'train')
<ipython-input-14-0bb84a7b6ce9> in move_data_files(image_list, new_folder)
2 for file in image_list:
3 if os.path.exists('Images/'+file[0][0]):
----> 4 shutil.move('Images/'+file[0][0],new_folder+'/'+file[0][0])
5 elif not os.path.exists(new_folder+'/'+file[0][0]):
6 print('%s does not exist, it may be missing' % os.path.exists('./images/'+file[0][0]))
/anaconda3/envs/py36/lib/python3.6/shutil.py in move(src, dst, copy_function)
556 rmtree(src)
557 else:
--> 558 copy_function(src, real_dst)
559 os.unlink(src)
560 return real_dst
/anaconda3/envs/py36/lib/python3.6/shutil.py in copy2(src, dst, follow_symlinks)
255 if os.path.isdir(dst):
256 dst = os.path.join(dst, os.path.basename(src))
--> 257 copyfile(src, dst, follow_symlinks=follow_symlinks)
258 copystat(src, dst, follow_symlinks=follow_symlinks)
259 return dst
/anaconda3/envs/py36/lib/python3.6/shutil.py in copyfile(src, dst, follow_symlinks)
119 else:
120 with open(src, 'rb') as fsrc:
--> 121 with open(dst, 'wb') as fdst:
122 copyfileobj(fsrc, fdst)
123 return dst
FileNotFoundError: [Errno 2] No such file or directory: 'test/n02085620-Chihuahua/n02085620_2650.jpg'
Does it mean the dataset is incomplete?
Or other reasons may occur it?
Would you mind giving me some advices, thanks!
Hi,
May I obtain a link for downloading the weights file: vgg_model_weights.h5
Thanks in advance,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.