在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):thangtran480/hair-segmentation开源软件地址(OpenSource Url):https://github.com/thangtran480/hair-segmentation开源编程语言(OpenSource Language):Jupyter Notebook 76.5%开源软件介绍(OpenSource Introduction):Hair Segmentation Realtime using KerasThe architecture was inspired by Real-time deep hair matting on mobile devices Prerequisitespython 3.6 tensorflow-gpu==1.13.1, opencv-python==4.1.0.25, Keras==2.2.4, numpy==1.16.4, scikit-image==0.15.0 install environment in conda:
Dataset
Download data CelebAMask-HQ and use preprocess in ./data/pre-process-data-CelebAMask-HQ.ipynb to create dataset Data structure training
Train modelpython train.py [--datadir PATH_FOLDER] [--batch_size BATCH_SIZE] [epochs EPOCHS] [--lr LEARNING_RATE] []
optional arguments:
--datadir: path to folder dataset, default ./data
--batch_size: batch size training, default 4
--epochs: number of eposchs, default 5
--lr: learning rate, default 1e-4
--image_size: size image input, default (224, 224)
--use_pretrained: use pretrained, default false
--path_model: directory is saved checkpoint, default ./checkpoints
--device: device training model, default 0 (GPU:0), 1(GPU:1), -1(CPU) Evaluate modelpython evaluate.py Run pretrain model# Run test.py
python demo.py You will see the predicted results of test image in test/data ResultConvert to Tensorflow Lite
# Convert Model to Mobile
python convert_to_tflite.py
# Shape input and output shape model tflite
python shape_input_output_tflite.py About KerasKeras is a minimalist, highly modular neural networks library, written in Python and capable of running on top of either TensorFlow or Theano. It was developed with a focus on enabling fast experimentation. Being able to go from idea to result with the least possible delay is key to doing good research. Use Keras if you need a deep learning library that: allows for easy and fast prototyping (through total modularity, minimalism, and extensibility). supports both convolutional networks and recurrent networks, as well as combinations of the two. supports arbitrary connectivity schemes (including multi-input and multi-output training). runs seamlessly on CPU and GPU. Read the documentation Keras.io Keras is compatible with: Python 3.6. TODO
LicenseCopyright (c) 2019 Thang Tran Van Licensed under the MIT License. You may not use this file except in compliance with the License |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论