Skip to main content

High quality model for people segmentation.

Project description

Binary segmentation of people

Data

Train set:

  • Mapillary Vistas Commercial 1.2 (train)
  • COCO (train)
  • Pascal VOC (train)
  • Human Matting

Validation set:

  • Mapillary Vistas Commercial 1.2 (val)
  • COCO (val)
  • Pascal VOC (val)
  • Supervisely

To convert datasets to the format:

training
    coco
    matting_humans
    pascal_voc
    vistas

validation
    coco
    pascal_voc
    supervisely
    vistas

use this set of scipts.

Training

Define the config.

Example at people_segmentation/configs

You can enable / disable datasets that are used for training and validation.

Define the environmental variable TRAIN_PATH that points to the folder with train dataset.

Example:

export TRAIN_PATH=<path to the tranining folder>

Define the environmental variable VAL_PATH that points to the folder with validation dataset.

Example:

export VAL_PATH=<path to the validation folder>

Run training

python -m people_segmentation.train -c <path to config>

You can check the loss and validation curves for the configs from people_segmentation/configs at W&B dashboard

Run Inference

python -m torch.distributed.launch --nproc_per_node=<num_gpu> people_segmentation/inference.py \
                                   -i <path to images> \
                                   -c <path to config> \
                                   -w <path to weights> \
                                   -o <output-path> \
                                   --fp16

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

people_segmentation-0.0.4.tar.gz (7.9 kB view hashes)

Uploaded Source

Built Distribution

people_segmentation-0.0.4-py2.py3-none-any.whl (9.7 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page