{"id":16916546,"url":"https://github.com/ternaus/cloths_segmentation","last_synced_at":"2025-04-06T12:10:51.450Z","repository":{"id":41282335,"uuid":"308462506","full_name":"ternaus/cloths_segmentation","owner":"ternaus","description":"Code for binary segmentation of cloths","archived":false,"fork":false,"pushed_at":"2020-11-09T00:21:26.000Z","size":21,"stargazers_count":234,"open_issues_count":7,"forks_count":40,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-30T11:06:57.921Z","etag":null,"topics":["computer-vision","deep-learning","image-segmentation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ternaus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":"ternaus","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-10-29T22:16:13.000Z","updated_at":"2025-03-25T16:28:42.000Z","dependencies_parsed_at":"2022-07-06T11:21:36.917Z","dependency_job_id":null,"html_url":"https://github.com/ternaus/cloths_segmentation","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ternaus%2Fcloths_segmentation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ternaus%2Fcloths_segmentation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ternaus%2Fcloths_segmentation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ternaus%2Fcloths_segmentation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ternaus","download_url":"https://codeload.github.com/ternaus/cloths_segmentation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247478324,"owners_count":20945266,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["computer-vision","deep-learning","image-segmentation"],"created_at":"2024-10-13T19:28:23.353Z","updated_at":"2025-04-06T12:10:51.427Z","avatar_url":"https://github.com/ternaus.png","language":"Python","funding_links":["https://patreon.com/ternaus"],"categories":[],"sub_categories":[],"readme":"![](https://habrastorage.org/webt/gu/wi/lq/guwilqwsfru7hc5rkxhxsj_nl_u.jpeg)\n\n# Code for binary segmentation of various cloths\n\n## Installation\n\n`pip install -U cloths_segmentation`\n\n### Example inference\n\nJupyter notebook with the example: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/18RenTYhuPVip9SHdMLn-vnK0K57B--um#scrollTo=D0h2Y-oOCnXJ)\n\n### WebApp\n\n[https://clothssegmentation.herokuapp.com/](https://clothssegmentation.herokuapp.com/)\n\n## Data Preparation\n\nDownload the dataset from [https://www.kaggle.com/c/imaterialist-fashion-2019-FGVC6](https://www.kaggle.com/c/imaterialist-fashion-2019-FGVC6)\n\nProcess the data using [script](https://github.com/ternaus/iglovikov_helper_functions/tree/master/iglovikov_helper_functions/data_processing/prepare_cloths_segmentation)\n\nThe script will create process the data and store images to folder `images` and binary masks to folder `labels`.\n\n## Training\n\n### Define the config.\nExample at [cloths_segmentation/configs](cloths_segmentation/configs)\n\nYou can enable / disable datasets that are used for training and validation.\n\n### Define the environmental variable `IMAGE_PATH` that points to the folder with images.\nExample:\n```bash\nexport IMAGE_PATH=\u003cpath to the the folder with images\u003e\n```\n\n### Define the environmental variable `LABEL_PATH` that points to the folder with masks.\nExample:\n```bash\nexport MASK_PATH=\u003cpath to the folder with masks\u003e\n```\n\n### Training\n```\npython -m cloths_segmentation.train -c \u003cpath to config\u003e\n```\n\n### Inference\n\n```bash\npython -m torch.distributed.launch --nproc_per_node=\u003cnum_gpu\u003e cloths_segmentation/inference.py \\\n                                   -i \u003cpath to images\u003e \\\n                                   -c \u003cpath to config\u003e \\\n                                   -w \u003cpath to weights\u003e \\\n                                   -o \u003coutput-path\u003e \\\n                                   --fp16\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fternaus%2Fcloths_segmentation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fternaus%2Fcloths_segmentation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fternaus%2Fcloths_segmentation/lists"}