Built using fast.ai library.
This is model is traied with a dataset which built by my own from google images.
Uploading inthe google drive and then extracting data from that google drive.
Open google images and enter teddy bears in the url same process is to be followed for all the three kinds, that we are going to classify now.
1.Teddy bears
2.Grizzles
3.Black Bear
When you open each url for particular set of images above. You need to press ctrl+shft+J
then it will pop up a small window.
Then paste this follwing jason command in that.
urls = Array.from(document.querySelectorAll('.rg_di .rg_meta')).map(el=>JSON.parse(el.textContent).ou); window.open('data:text/csv;charset=utf-8,' + escape(urls.join('\n')));
and press Enter
.
It will download a file called download
containing urls of all the images in that particular page. We need to add an extension of .txt
to that.
After that, create a seperate folder in Google drive for each file and uplaod each file seprately in each folder as shown in the ipnd notbook.
My .txt
files:
1.Teddies
2.Grizzles
3.Black Bears
Now using a the path of the folder and the .txt file path as:
Example:
folder = 'black'
file = 'blackbears.txt'
Downloading:
download_images(path/folder/file, path/folder, max_pics=400);
We need to follow the same process according for all the 3 kinds of bears.
Now our own dataset is ready for training
We will start training the model on our dataset.