This commit is contained in:
louiscklaw
2025-01-31 22:57:47 +08:00
parent b1cd1d4662
commit b3cc8e8323
764 changed files with 722101 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
from icrawler.builtin import BingImageCrawler
from icrawler.builtin import FlickrImageCrawler
# we are building cats image detection that's why we put cat here
# if you want some other images then put that name in classes list
classes = [
'dish',
'dish over the world',
'dish in hong kong',
'dish in china',
'dish in england',
'dish in us',
'dish in australia',
'dish in brazil',
'dish in india',
'dish in japan',
'dish in russia',
'dish in south africa',
'dish in argentina',
'dish in mexico',
'dish in italy',
'dish in france',
'dish in spain',
'dish in germany',
'dish in thailand',
'dish in vietnam',
'dish in indonesia',
'dish in philippines',
'dish in malaysia',
'dish in singapore',
'dish in egypt',
'dish in turkey',
'dish in greece',
'dish in portugal',
'dish in netherlands',
'dish in belgium',
'dish in sweden',
'dish in norway',
'dish in denmark',
'dish in finland',
'dish in poland',
'dish in ukraine',
]
number = 999
# here root directory is find your root directory there u will find
# new file name data in which all images are saved.
for i in range(99):
for c in classes:
bing_crawler = BingImageCrawler(storage={"root_dir": f'p/dish/{c.replace(" ",".")}'})
bing_crawler.crawl(keyword=c, filters=None, max_num=number, offset=0)