Skip to content

Papich23691/Hair-Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Releases

No releases published

Packages

No packages published

Languages