resize-image resizes the image and associated shapes in a JSON:

tool_resize_image.png

Why you want to use this tool

Labelme keeps original image resolution when you annotate an image no matter how large it is.

But you might notice you didn’t needed that high resolution.

This is easy when it is before you annotate the shapes, since you can just use an image resizing tools that are built in your computer.

However, if it is after annotating shapes, you need to resize shapes along with the image.

This is when resize-image comes in.

Usage

As the argument, you can pass either a JSON file or directory of JSON files.

labelmetk resize-image [OPTIONS] FILE_OR_DIR...

--scale [SCALE]

Scale to which the tool resizes the image. Typically 0 < SCALE < 1.

It works with SCALE >= 1, but the image quality would be the same as the input image, so not recommended.

Examples