Skip to content

Model for automatic portrait segmentation model (aka image matting) to celebrity face(CelebAMask-HQ) dataset.

License

Notifications You must be signed in to change notification settings

rahatsantosh/autoportrait_seg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

auto-portrait-segmentation

Apply an automatic portrait segmentation model (aka image matting) to celebrity face dataset.

Download Data

To download dataset visit above link or
cd src/data
python make_dataset.py

Get pretrained weights

./models/get_pretrained.sh
or
Google Drive Link : https://drive.google.com/drive/folders/1cF8D21yGyqogenu3DCY5fZLpAnuYvtlq?usp=sharing

Model

DeepLabv3 model has been used here, with input of 224x224x3 and output 224x224x1 mask.

Notebooks

Notebooks folder contains a basic and in-depth EDA notebooks, as well as model inspection(model_select.ipynb).
notebooks/demo.ipynb -> contains an implementation of the pretrained model.
notebooks/model_performance.ipynb -> Gives an overview of the model training loss and validation metrics stats.

Training Model

Run main.py script.
To get argument details : python src/main.py -h

Performance Metrics

Training Loss

Loss Plot

F1 Score

F1 Metric Plot

Area Under ROC Curve

AUROC Metric Plot

Project Organization

├── LICENSE
├── README.md                               <- The top-level README for developers using this project.
├── data
│   ├── processed                           <- The final, canonical data sets for modeling.
│   ├── interim                             <- Partially processed data.
│   └── raw                                 <- The original, immutable data dump.
│
├── models                                  <- Trained and serialized models, model predictions, or model summaries
│
├── notebooks                               <- Jupyter notebooks.
|   |
|   ├── raw_data_eda.ipynb                  <- Basic EDA, on raw dataset size, image size, format etc.
|   |
|   ├── advanced_eda.ipynb                  <- Advanced EDA performed on masks and mask averages.
|   |
|   ├── model_select.ipynb                  <- Possible model architectures and known metrics.
|   |
|   ├── model_performance.ipynb             <- Performance metrics of refitted, pretrained model.
|   |
|   └── demo.ipynb                          <- Implementation of pretrained model, post training, on sample image.
│
├── references                              <- Data dictionaries, manuals, and all other explanatory materials.
│
├── requirements.txt                        <- The requirements file for reproducing the analysis environment
│
├── src           				          <- Source code for use in this project.
│   │
│   ├── data                                <- Scripts to download or generate data
│   │
│   ├── utils                                <- Scripts utilities used during data generation or training
│   │
│   └── training                            <- Scripts to train models

Acknowledgements

MIT License

All code in the repo is under MIT license, external code and data are under respective licenses.
License: MIT
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

About

Model for automatic portrait segmentation model (aka image matting) to celebrity face(CelebAMask-HQ) dataset.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages