Image Curator is a web app designed to quickly sort and edit image datasets. I created it after being frustrated with curating a large dataset for training a GAN. With my limited testing, I have been able to process 300+ images per hour, including setting custom crop regions for every image.
- Approve/reject images
- Set crop region
- Set mode to fill in empty space in non-square images
- Preview cropped region
- Skip to first unprocessed image
- Everything can be controlled with hotkeys, no mouse needed
- Script to output final dataset, including crops
- Run
python web_server.py --imgdir <directory to your images> --dbpath <path to JSON file to use as a database>
- Edit
apiUrl
inImageCurator.elm
to match the URL thatweb_server.py
is running on - Compile the app with
elm make ./src/ImageCurator.elm --output app.js
- Host
index.html
,app.js
,dist/
,css/
, andimg/
on a web server. I am just hosting mine locally with an extension for VS Code. - Navigate to the hosted site and start curating your images!
- Everything is saved to the JSON database file. Tool to use this data to output a final dataset coming soon.
Hotkeys are a major feature of Image Curator. They allow you to process images very quickly as you don't have to fiddle with a mouse. The keys I have picked for each function are rather arbitrary, so please adjust them for yourself. All you have to do to change a hotkey is change the strings for the KeyDown
events in the update
function (and recompile/reload).
Keys | Function |
---|---|
Arrows | Move crop region |
+/- | Grow/shrink crop region |
A/D | Previous/next image. Also auto-saves changes |
W/S | Previous/next crop extend mode |
Space | Toggle processed flag |
Q | Toggle approved flag |
E | Set crop region to full square (including extended region) |
R | Set crop region to center of original image |
Enter | Save changes |
- Drag to set crop region
- Image tagging
- Tag regions on image
- Stretch extend mode doesn't display correctly in the preview
- Dataset generator doesn't handle mirror & stretch extend modes
I am still very new to Elm. I wrote this app in a single weekend after only reading the first 4 chapters of "Elm in Action". I only barely know what I'm doing. I am confident that there are parts of this app that are very poorly designed, I just don't have experience yet to know what those parts are. Feel free to file issues or pull requests if you want to critique anything.