{"id":16916530,"url":"https://github.com/ternaus/people_segmentation","last_synced_at":"2025-04-10T04:58:42.182Z","repository":{"id":50595857,"uuid":"297527447","full_name":"ternaus/people_segmentation","owner":"ternaus","description":"Code for the model to segment people at the image","archived":false,"fork":false,"pushed_at":"2023-03-08T15:03:17.000Z","size":34,"stargazers_count":132,"open_issues_count":2,"forks_count":22,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-03T00:08:36.139Z","etag":null,"topics":["computer-vision","deep-learning","image-segmentation","people-segmentation","python","semantic-segmentation"],"latest_commit_sha":null,"homepage":"https://peoplesegmentation.herokuapp.com/","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":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":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-09-22T03:43:05.000Z","updated_at":"2025-03-08T09:20:12.000Z","dependencies_parsed_at":"2022-09-14T07:31:51.377Z","dependency_job_id":null,"html_url":"https://github.com/ternaus/people_segmentation","commit_stats":{"total_commits":18,"total_committers":2,"mean_commits":9.0,"dds":"0.16666666666666663","last_synced_commit":"35150076dbf3712f8a9f8381bb956842be899393"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ternaus%2Fpeople_segmentation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ternaus%2Fpeople_segmentation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ternaus%2Fpeople_segmentation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ternaus%2Fpeople_segmentation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ternaus","download_url":"https://codeload.github.com/ternaus/people_segmentation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248161265,"owners_count":21057554,"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","people-segmentation","python","semantic-segmentation"],"created_at":"2024-10-13T19:28:18.892Z","updated_at":"2025-04-10T04:58:42.155Z","avatar_url":"https://github.com/ternaus.png","language":"Python","funding_links":["https://patreon.com/ternaus"],"categories":[],"sub_categories":[],"readme":"# Binary segmentation of people\n\n![](https://habrastorage.org/webt/bc/eg/g8/bcegg8zdgd-co-lip6hxn976jdm.jpeg)\n\n## Installation\n\n`pip install -U people_segmentation`\n\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/1ZHQ3beJP-7Pbq4I5Jsc8Co2dIkK31ALi?usp=sharing)\n\n## Data\n### Train set:\n\n* Mapillary Vistas Commercial 1.2 (train)\n* COCO (train)\n* Pascal VOC (train)\n* [Human Matting](https://www.kaggle.com/laurentmih/aisegmentcom-matting-human-datasets/)\n\n### Validation set:\n* Mapillary Vistas Commercial 1.2 (val)\n* COCO (val)\n* Pascal VOC (val)\n* Supervisely\n\nTo convert datasets to the format:\n\n```\ntraining\n    coco\n    matting_humans\n    pascal_voc\n    vistas\n\nvalidation\n    coco\n    pascal_voc\n    supervisely\n    vistas\n```\nuse this set of [scipts](https://github.com/ternaus/iglovikov_helper_functions/tree/master/iglovikov_helper_functions/data_processing/prepare_people_segmentation).\n\n## Training\n\n### Define the config.\nExample at [people_segmentation/configs](people_segmentation/configs)\n\nYou can enable / disable datasets that are used for training and validation.\n\n### Define the environmental variable `TRAIN_PATH` that points to the folder with train dataset.\nExample:\n```bash\nexport TRAIN_PATH=\u003cpath to the tranining folder\u003e\n```\n\n### Define the environmental variable `VAL_PATH` that points to the folder with validation dataset.\nExample:\n```bash\nexport VAL_PATH=\u003cpath to the validation folder\u003e\n```\n\n### Training\n```\npython -m people_segmentation.train -c \u003cpath to config\u003e\n```\n\nYou can check the loss and validation curves for the configs from [people_segmentation/configs](people_segmentation/configs)\nat [W\u0026B dashboard](https://wandb.ai/ternaus/people_segmentation-people_segmentation)\n\n### Inference\n\n```bash\npython -m torch.distributed.launch --nproc_per_node=\u003cnum_gpu\u003e people_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```\n\n## Web App\nhttps://peoplesegmentation.herokuapp.com/\n\nCode for the web app: https://github.com/ternaus/people_segmentation_demo\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fternaus%2Fpeople_segmentation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fternaus%2Fpeople_segmentation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fternaus%2Fpeople_segmentation/lists"}