Skip to content

TowhidKashem/image-dataset-prepper

Repository files navigation

Image Classification Dataset Prepper

video2.mp4

When preparing datasets for training image classification models it's a real pain to manually sift through thousands of images to weed out the inaccurate, duplicate and broken ones. This cross-platform app aims to make the process a little more tolerable by allowing you to use keyboard shortcuts to quickly cycle through all the images in a folder and delete the ones you don't want.

Installation

First install the dependencies:

> yarn install or npm install

then build the executable:

> yarn package or npm run package

The resultant launch file can be found in the release/build/* folder e.g. on a mac it's release/build/mac/ImageReviewer.app. You can move this anywhere like to your desktop and run it as a standalone app going forward.

Development

> yarn start or npm start

This will spin up a dev server which auto-reloads on file changes.

Files

  • Electron backend - src/main/*
  • React frontend - src/renderer/*

Usage

  • - next image
  • - prev image
  • Space - delete image
  • CMD / CTRL + Z - undo delete
  • a - pick image (this moves the image into a subfolder called _picked)
  • CMD / CTRL + R - refresh the app
  • click the "↻" icon on the top right of the screen to reset history (visited folders whose contents were looped through at least once appear at a lower opacity for tracking purposes)
  • ♫ pop noise sounds each time a full loop completes when cycling through a directory

Folder structure

This is a common folder structure for image classification datasets:

dog-breeds/
- doberman/
  - a.jpg
  - b.png
- german-shepherd/
  - c.jpg
  - d.webp
- miniature-poodle/
  - e.png
  - f.jpg

In other words you have a root folder with sub-folders for each class, and inside those sub-folders are the images. You can browse such a root folder using this app, same for individual folders with images.

Just make sure that the selected folder contains either only images or only sub-folders. This app isn't a full fledged file explorer and can't handle anything else at the moment.

Roadmap

  • Automate deleting duplicate images
  • Automate deleting broken images
  • Crop and keep only part of an image
  • Convert all images to a particular format

Credits

About

A desktop file explorer with keyboard shortcuts to quickly prep images when collecting datasets for training image classification models

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published