Skip to content

Unofficial tensorflow implementation of real-time scene image segmentation model "BiSeNet V2: Bilateral Network with Guided Aggregation for Real-time Semantic Segmentation"

License

Notifications You must be signed in to change notification settings

w-okada/bisenetv2-tensorflow

 
 

Repository files navigation

This repository is forked from https://github.com/MaybeShewill-CV/bisenetv2-tensorflow/

Pourpose of this repository

  • generate arbitrary input size model
  • retrain more easily

generate arbitrary input size model

I strongly recommend this process in docker container.

docker pull tensorflow/tensorflow:1.15.4-gpu-py3
docker run --rm --gpus all -v /home/<path_to_working_folder>/:/work  -ti tensorflow/tensorflow:1.15.4-gpu-py3

CityPass

Not yet

CelebAMask

Downloaded the pretrained model from here into ./checkpoint

(1) create frozen model

$ export PYTHONPATH=$PYTHONPATH:`pwd`
$ pip install PyYAML
$ python3 tools/celebamask_hq/freeze_celebamaskhq_bisenetv2_model.py \
    --weights_path checkpoint/celebamaskhq.ckpt \
    --frozen_pb_file_path ./checkpoint/bisenetv2_celebamask_frozen.pb \
    --optimized_pb_file_path ./checkpoint/bisenetv2_celebamask_optimized.pb

* In my environment, PyYAML version is 5.3.1

(2) convert to tensorflowjs

$ pip install tensorflowjs
$ tensorflowjs_converter --input_format tf_frozen_model \
    --output_node_names final_output \
    checkpoint/bisenetv2_celebamask_optimized.pb \
    webmodel

* In my environment, tensorflowjs version is 2.7.0

Demo

image

https://flect-lab-web.s3-us-west-2.amazonaws.com/P01_wokers/t08_bisenetv2-celebamask/index.html

Demo repository

https://github.com/w-okada/image-analyze-workers

retrain more easily

Not yet ...

About

Unofficial tensorflow implementation of real-time scene image segmentation model "BiSeNet V2: Bilateral Network with Guided Aggregation for Real-time Semantic Segmentation"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.8%
  • Other 0.2%