gpt2ent / wacky-cropper

Tkinter app for cropping images to square resolution for datasets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wacky Cropper šŸ„“

showcase

Installation (Ubuntu)

sudo apt install python3-tk python3-pil python3-pil.imagetk

Hasn't been tested on Windows, but should probably work with Pillow package installed.

Hotkeys

  • Space: go to next picture
  • S: snap (save cropped picture)
  • Q: go to previous picture

How to use

  1. python3 main.py
  2. In the window, click "input folder" to select an input folder with your images and "output folder" where the cropped images will be saved.
  3. The first image will appear and you may begin working with dataset.
  4. Drag the image with your mouse and press "Snap" or S when you're ready. The cropped image will be saved in output folder and the next image will be shown in the editor.

Cropping to other resolutions

The 512x512 resolution is hardcoded for now, but it is easy to fix -- look for TARGET_SIZE=512 constant in main.py and change it. Will add argparse in the future I promise

Can I use this code?

MIT License or whaterver

About

Tkinter app for cropping images to square resolution for datasets


Languages

Language:Python 100.0%