Spaces:
Sleeping
Sleeping
Download datacollection.py from kshitiz14/breedclassification: direct link, hf CLI and curl.
- Browser
- Download file 420 Bytes
-
https://huggingface.co/spaces/kshitiz14/breedclassification/resolve/main/datacollection.py
- Command line
-
hf download hf://spaces/kshitiz14/breedclassification/datacollection.py
-
curl -L -o datacollection.py https://huggingface.co/spaces/kshitiz14/breedclassification/resolve/main/datacollection.py
420 Bytes
| from icrawler.builtin import GoogleImageCrawler | |
| breeds = [ | |
| "banni buffalo", | |
| "bhadwari buffalo", | |
| "dharwadi buffalo", | |
| "jafarabadi buffalo", | |
| "amritmahal cow", | |
| ] | |
| for breed in breeds: | |
| folder = f'images/{breed.replace(" ", "_")}' | |
| google_crawler = GoogleImageCrawler(storage={'root_dir': folder}) | |
| google_crawler.crawl(keyword=breed, max_num=200) | |
| print(f"Downloaded 200 images of {breed}") | |