Giter VIP home page Giter VIP logo

dataset-builder's Introduction

Dataset Builder

A script to help you quickly build custom computer vision datasets for classification and detection.

It allows you to define your classes and then fetches images from Flickr. It then organizes the folders and clean the file names. If you're preparing the dataset for a detection or a segmentation task, the script opens up makesense.ai, uploads the images with the corresponding label list so that you can start annotating.

Once the annotation is done, your labels can be exported and you'll be ready to train your awesome models.

Requirements:

  • Install Flick Scraper dependencies:
    • git clone https://github.com/ultralytics/flickr_scraper
    • cd flickr_scraper
    • pip install -U -r requirements.txt
    • Request a Flickr API key and secret: https://www.flickr.com/services/apps/create/apply
    • create a config.yaml file inside src/ that looks like this
      key: "XXXXXXXXXXXXXXX"
      secret: "XXXXXXXXXXXXXXX"
  • Selenium: pip install -U selenium
  • ChromeDriver 77.0.3865.40

In case you wish to run Maskesense locally:

# clone repository
git clone https://github.com/SkalskiP/make-sense.git

# navigate to main dir
cd make-sense

# install dependencies
npm install

# serve with hot reload at localhost:3000
npm start

Example:

When you run the script, you can specify the following arguments:

  • output-directory: the root folder when images are downloaded
  • limit: the maximum number of downloaded images per category
  • delete-history: whether you choose to erase previous downloads or not
  • task: classification, detection or segmentation
  • driver: path to chrome driver
python dataset_builder.py --limit 20 --delete-history yes

Once the script runs, you'll be asked to define your classes (or queries)

Here's what the output looks like after the download:

Object detection with make-sense:

This only works if you choose a detection or segmentation task

Make Sense is an awesome open source webapp that lets you easily label your image dataset for tasks such as localization.

You can check it out here: https://www.makesense.ai/ You can also clone it and run it locally (for better performance): https://github.com/SkalskiP/make-sense

In order to use this tool, I'll be running it locally and interface with it using Selenium: Once the dataset is downloaded, Selenium opens up a Chrome browser, upload the images to the app and fill in the label list: this ultimately allows you to annotate.

Demo [Youtube video]

TODO ๐Ÿ˜

Please feel free to contribute ! Report any bugs in the issue section, or request any feature you'd like to see shipped:

  • Accelerate the download of images via multiprocessing
  • Apply a quality check on the images
  • Integrate automatic tagging using pre-trained networks

LICENSE

Please be aware that this code is under the GPL3 license. You must report each utilisation of this code to the author of this code (ahmedbesbes). Please push your code using this API on a forked Github repo public.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.