Remove image background and label object in yolo format
Project description
Automatic YOLO Labeler
Note: Tool works for single object per image only. Please use images with single object for accurate results. You can verify labels by checking png images. If the background is correctly removed from image then it is labelled correctly.
YOLO Labeler is a tool to remove images background and label object in YOLO format.
Examples
Installation
pip3 install yolo-labeler
Usage as a library
In test.py
from yolo_labeler import yolo_labeler
yolo_labeler.run(args)
run command
python3 test.py --input_path /path/to/input/image or image_folder --output_image_path /path/to/output/images --output_text_path /path/to/output/text --yolo_label class_num
Advance usage
To not resize images provide --resize flag to 1
python3 test.py --input_path /path/to/input/image or image_folder --output_image_path /path/to/output/images --output_text_path /path/to/output/text --yolo_label class_num --size 1
To save output png images provide --png_path
python3 test.py --input_path /path/to/input/image or image_folder --output_image_path /path/to/output/images --output_text_path /path/to/output/text --yolo_label class_num --size 1 --png_path /path/to/output/png
To resize images of custom width x height provide --width and --height. Default is 416x416
python3 test.py --input_path /path/to/input/image or image_folder --output_image_path /path/to/output/images --output_text_path /path/to/output/text --yolo_label class_num --png_path /path/to/output/png --width 416 --height 416
To change background behind object provide --background_image
python3 test.py --input_path /path/to/input/image or image_folder --output_image_path /path/to/output/images --output_text_path /path/to/output/text --yolo_label class_num --png_path /path/to/output/png --width 1000 --height 1000 --background_image /path/to/background/image
To save changed background images provide --background_out
python3 test.py --input_path /path/to/input/image or image_folder --output_image_path /path/to/output/images --output_text_path /path/to/output/text --yolo_label class_num --png_path /path/to/output/png --width 416 --height 416 --background_image /path/to/background/image --background_out /path/to/output/changed/background/images
References
License
Copyright (c) 2020-present Abhi Panchal
Licensed under MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file yolo_labeler-0.0.3.tar.gz
.
File metadata
- Download URL: yolo_labeler-0.0.3.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdfc4c52e87e0f6e433c865e3096f89ea9f95d82e90d67ce2bed4722f958c322 |
|
MD5 | b4a2386c8d3dac5ac89f0153e15046d5 |
|
BLAKE2b-256 | 356ac12884875ed22c1cb265ca4d5f9a3149f952c113e9604e984289dfbbb0bd |
File details
Details for the file yolo_labeler-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: yolo_labeler-0.0.3-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5e75d3d2837044aa58043cf64644b47aaa4935401e52554a865041f7834e3c9 |
|
MD5 | 59ad5fc63fe1bbf69bd76e84051ad66a |
|
BLAKE2b-256 | 711e6fca5d6a6ee0ed3dc46af671d4ce6d3e1a7c12ba22736719bca063250a9f |