Skip to content

naturesh/image_dataset_maker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Image Dataset Maker

  • The easiest way to build an image dataset

Desc

  • We make one reference vector by normalizing the vector of the reference image, text, and compare the cosine similarity, where the vector embedding uses the ViT-B-32 model.
  • Use all images from query's Google Image search results.
  • Too many image search results may cause errors.

Result

Reference Image

After crawl & classify

How to use

if __name__ == '__main__':

    # create Classfication Class based on ViT-32
    cf = Classfication(
        ['https://{The program automatically crawls only images that are similar to the input image.}'],
        ['frog']
    )

    # create Firefox client
    client = Client(path='geckodriver path')

    # get images from google
    images = client.get_images(query='pepe') # Query are required

    # classify all images
    result = cf.classify_all(images)

    # save images
    for idx, img in enumerate(result):
        cf.save_base64_image(img, f'./{idx}.png')

About

Image Dataset Maker based on ViT-B-32, Google, Firefox

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages