Papich23691 / Hair-Detection

Hair Mask RCNN using matterport model

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hair-Detection

Hair Mask RCNN using matterport model example

Set-Up

Download requirments:

$ pip install -r requirements.txt

Download and extract dataset and weights directly to repository folder:

Dataset
Weights

Folder path should look like

.
|
|── dataset
│               |── train
│               |── val
|── mask_rcnn_hair_0200.h5
|── run.py

Usage

Training:

To train run

$ python3 run.py train --dataset=path/to/dataset --weights=path/to/weights

For example to start training from the coco model

$ python3 run.py train --dataset=./data/dataset --weights=coco

Or to continue training from custom weights(for example project weights)

$ python3 run.py train --dataset=./data/dataset --weights=~/proj/Hair-Detection/data/weights/mask_rcnn_hair_0200.h5

Run:

Run this command on an image

$ python3 run.py mask --image=path/to/image --weights=path/to/weights

The image is saved into the project directory

Dataset

Figaro-1k: It contains 1050 unconstrained view images with persons, subdivided into seven different hairstyles classes (straight, wavy, curly, kinky, braids, dreadlocks, short), where each image is provided with the related manually segmented hair mask.

About

Hair Mask RCNN using matterport model

License:MIT License


Languages

Language:Python 100.0%