{"id":37866720,"url":"https://github.com/guchengxi1994/mask2json","last_synced_at":"2026-01-16T16:37:47.430Z","repository":{"id":37649506,"uuid":"270944554","full_name":"guchengxi1994/mask2json","owner":"guchengxi1994","description":"a small tool for image augmentation, including mask files to json/xml files , image augmentation(flip,rotation,noise,...) and so on","archived":false,"fork":false,"pushed_at":"2022-12-27T16:39:40.000Z","size":43530,"stargazers_count":60,"open_issues_count":3,"forks_count":12,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-06T17:45:02.170Z","etag":null,"topics":["data-augmentation","labelimg-tool","labelme-tool"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/guchengxi1994.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-09T08:23:11.000Z","updated_at":"2025-07-11T06:53:36.000Z","dependencies_parsed_at":"2022-07-12T16:42:21.617Z","dependency_job_id":null,"html_url":"https://github.com/guchengxi1994/mask2json","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/guchengxi1994/mask2json","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guchengxi1994%2Fmask2json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guchengxi1994%2Fmask2json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guchengxi1994%2Fmask2json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guchengxi1994%2Fmask2json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guchengxi1994","download_url":"https://codeload.github.com/guchengxi1994/mask2json/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guchengxi1994%2Fmask2json/sbom","scorecard":{"id":448078,"data":{"date":"2025-08-11","repo":{"name":"github.com/guchengxi1994/mask2json","commit":"089c5b69cc2cc87c3cea2ce35d130eba10bfbe82"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/8 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":9,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/workflow.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":7,"reason":"binaries present in source code","details":["Warn: binary detected: convertmask/utils/long_img_split/__pycache__/__init__.cpython-37.pyc:1","Warn: binary detected: convertmask/utils/long_img_split/__pycache__/script.cpython-37.pyc:1","Warn: binary detected: convertmask/utils/long_img_split/__pycache__/splitImg.cpython-37.pyc:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact 0.5.2 not signed: https://api.github.com/repos/guchengxi1994/mask2json/releases/32954615","Warn: release artifact 0.4.0 not signed: https://api.github.com/repos/guchengxi1994/mask2json/releases/32397173","Warn: release artifact 0.3.2 not signed: https://api.github.com/repos/guchengxi1994/mask2json/releases/29849076","Warn: release artifact 0.2 not signed: https://api.github.com/repos/guchengxi1994/mask2json/releases/28429270","Warn: release artifact 0.5.2 does not have provenance: https://api.github.com/repos/guchengxi1994/mask2json/releases/32954615","Warn: release artifact 0.4.0 does not have provenance: https://api.github.com/repos/guchengxi1994/mask2json/releases/32397173","Warn: release artifact 0.3.2 does not have provenance: https://api.github.com/repos/guchengxi1994/mask2json/releases/29849076","Warn: release artifact 0.2 does not have provenance: https://api.github.com/repos/guchengxi1994/mask2json/releases/28429270"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/workflow.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/guchengxi1994/mask2json/workflow.yml/master?enable=pin","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'","Warn: branch protection not enabled for branch 'test'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 24 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: GHSA-qr4w-53vh-m672","Warn: Project is vulnerable to: PYSEC-2023-183","Warn: Project is vulnerable to: PYSEC-2023-102","Warn: Project is vulnerable to: PYSEC-2023-114","Warn: Project is vulnerable to: PYSEC-2025-49 / GHSA-5rjg-fvgr-3xxf","Warn: Project is vulnerable to: GHSA-cx63-2mw6-8hw5","Warn: Project is vulnerable to: PYSEC-2022-43012 / GHSA-r9hx-vwmv-q579","Warn: Project is vulnerable to: GHSA-g7vv-2v7x-gj9p"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T07:25:08.993Z","repository_id":37649506,"created_at":"2025-08-19T07:25:08.993Z","updated_at":"2025-08-19T07:25:08.993Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28480000,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-augmentation","labelimg-tool","labelme-tool"],"created_at":"2026-01-16T16:37:47.354Z","updated_at":"2026-01-16T16:37:47.422Z","avatar_url":"https://github.com/guchengxi1994.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\n * @lanhuage: markdown\n * @Descripttion: \n * @version: \n * @Author: xiaoshuyui\n * @Date: 2020-06-09 16:23:03\n * @LastEditors: xiaoshuyui\n * @LastEditTime: 2021-01-12 16:57:40\n--\u003e \n\n# Visit [simple-tools-for-machine-learning](https://github.com/guchengxi1994/simple-tools-for-machine-learning) for a newer tool, which written in `python3.8`,`skimage`,`numpy` and without `opencv-python`. This repo will not be upgraded any more. \n\n\n\n\n\n\u003ch1 align=\"center\"\u003e\n  \u003cimg src=\"convertmask/UI/statics/look.png\"\u003e\u003cbr/\u003econvertmask\n\u003c/h1\u003e\n\n# Issues and advices wanted.\n\n\n[![Build Status](https://travis-ci.org/guchengxi1994/mask2json.svg?branch=master)](https://app.travis-ci.com/guchengxi1994/mask2json.svg?branch=master)\n\n# Introduction\n\n A small tool for image augmentation, including mask files to json/xml files , image augmentation(flip,rotation,noise,...) and so on\n\n ## HOW TO USE.\n\n ### Installation.\n\n Try:\n\n    pip install -r requestments.txt\n\n IF ERROR, try:\n\n    pip install -r requirements.txt --ignore-installed\n\n\n### Use.\n\nUnder this version, these tools are provided.\n\n#### 1.[augmentation](./static/docs/augment.md)\n\n#### 2.[img2xml](./static/docs/img2xml.md)\n\n#### 3.[json2mask](./static/docs/json2mask.md)\n\n#### 4.[json2xml](./static/docs/json2xml.md)\n\n#### 5.[longImgSplit](./static/docs/longImgSplit.md)\n\n#### 6.[xml2json](./static/docs/xml2json.md)\n\n#### 7.[xml2mask](./static/docs/xml2mask.md)\n\n#### 8.[xml2yolo](./static/docs/xml2yolo.md)\n\n#### 9.[yolo2xml](./static/docs/yolo2xml.md)\n\n#### 10.[mask2json](./static/docs/mask2json.md)\n\n\n# CHANGE LOGS\n\n## 2021.10.31\n\n### 1.bump to 0.6.0\n\n### 2. UI update\n\n## 2021.1.14\n\n### 1.update spliting yolo-like dataset into train and val datasets AUTOMATICLY.See [testYoloLike.py](./test_scripts/test_yololike_generate.py). The test dataset can be found in ./test/ , 68 txts totally.\n\n![split-yolo](./backup/splitYolo.gif)\n\n## 2020.11.25\n\n### 1. negative sample AUTOMATICLY randomly generate. I am not sure if it is helpful to my face detection cnn.\n\n![img-negative](./backup/negative.png)\n\n### 2. rewrite [mosaic.py](./convertmask/utils/auglib/optional/mosaic.py)(without resize the origin images). See [here](./test_scripts/test_mosiac.py).\n\n![img-mosiac](./backup/mosiac2.png)\n\n## 2020.11.16\n\n### 1.support converting widerface annotations to xmls. see [here](./test_scripts/test_convert_widerface.py)\n\n## 2020.11.10\n\n### 1. object-oriented rewrite augumentation optional module. See [here](./convertmask/utils/auglib/options_operator_without_label.py). Test script can be found [here](./test_scripts/test_optional_operation.py)\n\n\n## 2020.10.25\n\n### 1. bump to 0.5.3\n\n### 2. code structure change\n\n### 3. mosiac(yolov4) augumentation supported(auto labeled for labelImg,for labelme will be updated as fast as i can). Script can be found [here](./test_scripts/test_mosiac.py)\n\n![img-mosiac](./backup/mosiac.png)\n\n\n## 2020.10.24\n\n### 1.image crop supported.(single and multiple crops,rectangle and polygon support. See [here](./convertmask/utils/auglib/optional/crop.py))\n\n![img-crop](./backup/testCrop.jpg)\n\n### 2.image resize supported (auto labeled). See [here](./convertmask/utils/auglib/optional/resize.py) and the test script is [here](./test_scripts/test_resize.py)\n\n![img-resize](./backup/resize1.png)\n\n\n## 2020.10.23\n\n### 1.image distortion supported.\n\n![img-distort](./backup/multi_objs_distort.jpg)\n\nsee [here](./convertmask/utils/auglib/optional/distort.py) or [test-script](./test_scripts/test_local_wrap.py) for details.\n\n\n## 2020.10.13\n\n### 1.image augumentation support convert yolo txts to xmls(pascal). See [here](./test_scripts/test_yolo2xml.py)\n\n### 2.speed up by using multiprocess\n\n## 2020.10.12\n\n### 1.image augumentation support generating several annotation/images with single image/annotation(json,xml). See [here](./test_scripts/test_multi_augment.py)\n\n\n## 2020.9.24\n\n### 1.inspired by [LabelImgTool](https://github.com/lzx1413/LabelImgTool), convert xmls to jsons is useful. Also ,i forked this repo and add some pyqt5/py3 support,see [here](https://github.com/guchengxi1994/LabelImgTool).\n\nexamples:\n\nscript [here](./test_scripts/test_xml2json.py)\n\n![xml2json](./backup/xml2json.gif)\n\n\n\n## 2020.8.24\n\n### 1.support convert xml files to yolo files. see [here](./test_scripts/test_xml2yolo.py)\n\nexamples:\n\n\n![xml2yolo](./backup/xml2yolo.gif)\n\n\n## 2020.8.19\n\n### 1. image translation supported.\n\n![img-translation](./backup/translation.png)\n\ncombination of every augmentation method.\n\n![img-combination](./backup/combine.png)\n\n### 2. besides, a simple way convert json file(labelme) to xml file(labelImg) is provided. see [here](./test_scripts/test_json2xml.py)\n\n![json2xml](./backup/json2xml.png)\n\n\n## 2020.8.17\n\n### 1. bug fix.\n\n### 2. support image augmentation methods: noise,flip,rotation. try [test_imgAug.py](./test_scripts/test_imgAug.py) !\n\nhere are some examples:\n\n### flip\n\n![img-flip-h](./backup/flip_h.png)\n\n![img-flip-v](./backup/flip_v.png)\n\n![img-flip-v-h](./backup/flip_v_h.png)\n\n### noise\n\n![img-noise](./backup/noise.png)\n\n### rotation\n\n![img-rotation](./backup/rotation.png)\n\n\n## 2020.8.14\n\n### 1. add image augmentation  (image flip) test. see [test_imgAug.py](./test_scripts/test_imgAug.py) !\n\n\n## 2020.7.14\n\n### 1.bugfix , test multi objects to xml files, pretty xmls\n\neg:\n\n![mask2xml](./backup/auto_mask2xml.png)\n\n\n## 2020.7.13\n\n### 1. convert multi objects to xml files supported (untested)\n\n\n## 2020.7.10\n\n### 1. a lot of things to do ,such as many warnings related to labelme.\n\n\n## 2020.6.12\n\n### 1.support multiple objects mask to json\n\ntry [test.py](./test_scripts/test.py) !\n\n#### 1.1 multiple objects in different classes\n\nmanually_labeled image\n\n![manually_labeled_multi_objs](./backup/manually_labeled_multi_objs.png)\n\nauto_labeled image\n\n![auto_labeled_multi_objs](./backup/auto_labeled_multi_objs.png)\n\n#### 1.2 multiple objects in same classes\n\nmanually_labeled image\n\n![manually_labeled_multi_objs_samelabel](./backup/manually_labeled_multi_objs_samelabel.png)\n\nauto_labeled image\n\n![auto_labeled_labeled_multi_objs_samelabel](./backup/auto_labeled_labeled_multi_objs_samelabel.png)\n\n\n\n# what to do next\n\n## 1. ~~support multiple files image augmentation~~ (2020.8.21)\n\n## 2. ~~support image augmentation without a label/json file~~  (2020.8.21)\n\n## 3. ~~support image augmentation with a labeled file (just support json file right now)~~ (2020.9)\n\n## 4. image augmentation supports custom parameters (auto augmented right now)\n\n## 5. do something more interesting\n\n## 6. ~~re-write main [script](./convertmask/main_v_0_3_any.py)~~ (2020.10)\n\n## 7. ~~ solve PyYmal installation error(currently write a [script](./convertmask/utils/methods/yamlUtils.py) by myself. maybe failure in the end.)~~\n\n## 8. ~~image augmentation zoooom~~ (2020.10.14) \n\n## 9. yolo txts split train/val dataset automaticly.\n\n\n\n# OTHERS\n\n1. [issue:json2mask has no output](https://github.com/guchengxi1994/mask2json/issues/3)\n\n\n![json2mask](./backup/json2mask.gif)\n\nif you test the [json2mask.py](./test_scripts/json2mask.py) script, you should change the path first and make sure the file is valid(maybe i have deleted :) )\n\nAlso, this script is just a reverse of mask2json, for a more COOOOOL method, see [here](./convertmask/utils/json2mask/convert.py) , try convert.processor\n\n\n\n\n#  SHORTCOMING\n\n1.~~objects connected to each other is not supported yet.~~\n\nthis 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).\n\n\n2.Image Binarization [issue](https://github.com/guchengxi1994/mask2json/issues/14)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguchengxi1994%2Fmask2json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguchengxi1994%2Fmask2json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguchengxi1994%2Fmask2json/lists"}