/TF2DeepFloorplan

TF2 Deep FloorPlan Recognition using a Multi-task Network with Room-boundary-Guided Attention. Enable tensorboard, quantization, flask, tflite, docker, github actions and google colab.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

TF2DeepFloorplan [License: GPL v3]

This repo contains a basic procedure to train and deploy the DNN model suggested by the paper 'Deep Floor Plan Recognition using a Multi-task Network with Room-boundary-Guided Attention'. It rewrites the original codes from zlzeng/DeepFloorplan into newer versions of Tensorflow and Python.

Furniture Predictions

Requirements

Depends on different applications, the following installation methods can

OS Hardware Application Command
Ubuntu CPU Model Development pip install -e .[tfcpu,dev,testing,linting]
Ubuntu GPU Model Development pip install -e .[tfgpu,dev,testing,linting]

How to run?

  1. Install packages.
# Option 1
python -m venv venv
source venv/bin/activate
pip install --upgrade pip setuptools wheel

# Option 2 (Preferred)
conda create -n venv python=3.8 cudatoolkit=10.1 cudnn=7.6.5
conda activate venv

# common install
pip install -e .[tfgpu,api,dev,testing,linting]
  1. Create a Structured3D dataset and transform it to tfrecords tf2deep.tfrecords.
  2. Run the train_furn.py file to initiate the training, model checkpoint is stored as log/store/G and weight is in model/store,
python -m dfp.train_furn [--batchsize 1][--lr 1e-4][--epochs 100]
[--logdir 'log/store'][--modeldir 'model/store']
[--save-tensor-interval 10][--save-model-interval 20]
[--tfmodel 'subclass'/'func'][--feature-channels 256 128 64 32]
[--backbone 'vgg16'/'mobilenetv1'/'mobilenetv2'/'resnet50']
[--feature-names block1_pool block2_pool block3_pool block4_pool block5_pool]
  • for example,
python -m dfp.train_furn --batchsize=1 --lr=5e-4 --epochs=100
--logdir=log/store --modeldir=model/store
  1. Run Tensorboard to view the progress of loss and images via,
tensorboard --logdir=log/store