a small tool for image augmentation, including mask files to json/xml files , image augmentation(flip,rotation,noise,...) and so on
Project description
convertmask
Issues and advices wanted.
Introduction
A small tool for image augmentation, including mask files to json/xml files , image augmentation(flip,rotation,noise,...) and so on
HOW TO USE.
Installation.
Try:
pip install -r requestments.txt
IF ERROR, try:
pip install -r requirements.txt --ignore-installed
Use.
Under this version, these tools are provided.
1.augmentation
2.img2xml
3.json2mask
4.json2xml
5.longImgSplit
6.xml2json
7.xml2mask
8.xml2yolo
9.yolo2xml
10.mask2json
CHANGE LOGS
2021.1.14
1.update spliting yolo-like dataset into train and val datasets AUTOMATICLY.See testYoloLike.py. The test dataset can be found in ./test/ , 68 txts totally.
2020.11.25
1. negative sample AUTOMATICLY randomly generate. I am not sure if it is helpful to my face detection cnn.
2. rewrite mosaic.py(without resize the origin images). See here.
2020.11.16
1.support converting widerface annotations to xmls. see here
2020.11.10
1. object-oriented rewrite augumentation optional module. See here. Test script can be found here
2020.10.25
1. bump to 0.5.3
2. code structure change
3. mosiac(yolov4) augumentation supported(auto labeled for labelImg,for labelme will be updated as fast as i can). Script can be found here
2020.10.24
1.image crop supported.(single and multiple crops,rectangle and polygon support. See here)
2.image resize supported (auto labeled). See here and the test script is here
2020.10.23
1.image distortion supported.
see here or test-script for details.
2020.10.13
1.image augumentation support convert yolo txts to xmls(pascal). See here
2.speed up by using multiprocess
2020.10.12
1.image augumentation support generating several annotation/images with single image/annotation(json,xml). See here
2020.9.24
1.inspired by LabelImgTool, convert xmls to jsons is useful. Also ,i forked this repo and add some pyqt5/py3 support,see here.
examples:
script here
2020.8.24
1.support convert xml files to yolo files. see here
examples:
2020.8.19
1. image translation supported.
combination of every augmentation method.
2. besides, a simple way convert json file(labelme) to xml file(labelImg) is provided. see here
2020.8.17
1. bug fix.
2. support image augmentation methods: noise,flip,rotation. try test_imgAug.py !
here are some examples:
flip
noise
rotation
2020.8.14
1. add image augmentation (image flip) test. see test_imgAug.py !
2020.7.14
1.bugfix , test multi objects to xml files, pretty xmls
eg:
2020.7.13
1. convert multi objects to xml files supported (untested)
2020.7.10
1. a lot of things to do ,such as many warnings related to labelme.
2020.6.12
1.support multiple objects mask to json
try test.py !
1.1 multiple objects in different classes
manually_labeled image
auto_labeled image
1.2 multiple objects in same classes
manually_labeled image
auto_labeled image
what to do next
1. support multiple files image augmentation (2020.8.21)
2. support image augmentation without a label/json file (2020.8.21)
3. support image augmentation with a labeled file (just support json file right now) (2020.9)
4. image augmentation supports custom parameters (auto augmented right now)
5. do something more interesting
6. re-write main script (2020.10)
7. solve PyYmal installation error(currently write a script by myself. maybe failure in the end.)
8. image augmentation zoooom (2020.10.14)
9. yolo txts split train/val dataset automaticly.
OTHERS
if you test the json2mask.py script, you should change the path first and make sure the file is valid(maybe i have deleted :) )
Also, this script is just a reverse of mask2json, for a more COOOOOL method, see here , try convert.processor
SHORTCOMING
1.objects connected to each other is not supported yet.
this may happen if you labelling multiple-object-images with only 2 labels .Or some objects are of the same type and are connected to each other(eg. a bunch of grapes,it is hard to split one to the other).
2.Image Binarization issue
Project details
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 convertmask-0.5.3.tar.gz
.
File metadata
- Download URL: convertmask-0.5.3.tar.gz
- Upload date:
- Size: 106.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09036f776506df0e00537737e8750c8f42428d75b565dfba1bc378d17d97589e |
|
MD5 | d8c3c5286f6ffcef02c234a4bc1ac5bb |
|
BLAKE2b-256 | 908396cf8e589cf26307d8306ca1f600b54180dad9ae1481d849b461776cd6be |
File details
Details for the file convertmask-0.5.3-py3-none-any.whl
.
File metadata
- Download URL: convertmask-0.5.3-py3-none-any.whl
- Upload date:
- Size: 143.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8839b89dc7ee37776d7c1cfea184f2e2c068b17fbb92f43aa9619d58ed2f34d |
|
MD5 | 236033823112bee24347d55bc9018165 |
|
BLAKE2b-256 | 0f23737cffa56abd7e50cf390b6bf51c1746e8bfe2a6a7a996527debff2900b5 |