Giter Club home page Giter Club logo

hmdremoval's Introduction

Generative RGB-D Face Completion for Head-Mounted Display Removal

An open source framework for generative HMD removal in RGB-D images as described in the paper "Generative RGB-D Face Completion for Head-Mounted Display Removal". This framework builds on the RGB image inpainting framework proposed in "Free-Form Image Inpainting with Gated Convolution" by Yu et al.

The source code of this framework is based on the source code by Yu et al.

Qualitative result summary Qualitative results summary. Shown for color (RGB), depth (D), and estimated surface normals (SN). For visualization, D is normalized to [0, 1] and displayed with the inferno colormap from the matplotlib package. The normal vectors (x, y, z) for each pixel in SN are estimated based on D and are visualized with RGB values.

Run

  1. Requirements:
    • Install Python (v3.6).
    • Install the requirements listed in requirements.txt.
      • Run pip install -r requirements.txt to install with pip.
  2. Training:
    • Prepare training images file list with create_flist.py (needs modification based on file name structure).
    • Modify inpaint.yml to set DATA_FLIST, LOG_DIR, IMG_SHAPES and other parameters.
    • Run python train.py.
  3. Resume training:
    • Modify MODEL_RESTORE flag in inpaint.yml. E.g., MODEL_RESTORE: hmdRemoval_341953.
    • Run python train.py.
  4. Testing:
    • Run python test.py --image data/input.png --mask data/mask.png --reference data/reference.png --output examples/output.png --checkpoint logs/hmdRemoval_341953.
  5. Batch testing:
    • Download facenet_keras.h5 and place in repo directory.
    • Run python batch_test.py --summary 1 --flist data/rgbd_faces/data_flist/test_face_mask_ref.flist --image_height 224 --image_width 224 --output_dir output --checkpoint_dir /logs/hmdRemoval_341953
  6. Evaluation:
    • Run batch test (see point 4).
    • Run python evaluate.py --pred_folder output --flist data/rgbd_faces/data_flist/test_face_mask.flist
  7. Still have questions?

TensorBoard

Visualization on TensorBoard for training and validation is supported. Run tensorboard --logdir model_logs --port 6006 to view training progress.

License

CC 4.0 Attribution-NonCommercial International

The software is for educational and academic research purpose only.

Citing

@inproceedings{numan2021generative,
  title={Generative RGB-D Face Completion for Head-Mounted Display Removal},
  author={Numan, Nels and ter Haar, Frank and Cesar, Pablo},
  booktitle={2021 IEEE Conference on Virtual Reality and 3D User Interfaces Abstracts and Workshops (VRW)},
  pages={109--116},
  year={2021},
  organization={IEEE}
}

hmdremoval's People

Contributors

nsalminen avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hmdremoval's Issues

Input Data Generation

@nsalminen Great work ! Thanks for releasing the code.
How did you manage to generate the input data, along with HMD? Can you suggest? Is input data generation code available?

error running your train.py

tensorflow 1.7.0 (recommended in the repo homepage, but in your paper, you said 1.15.0 confused which one I should use. Could you give me a conda list the env packages for me to replicate?)

Traceback (most recent call last):
  File "train.py", line 76, in <module>
    tf_checkpoint_path = tf.train.Saver(vggface_weights).save(sess, f.name)
  File "C:\Users\Anaconda3\envs\oldertensor\lib\site-packages\tensorflow\python\training\saver.py", line 1311, in __init__
    self.build()
  File "C:\Users\Anaconda3\envs\oldertensor\lib\site-packages\tensorflow\python\training\saver.py", line 1320, in build
    self._build(self._filename, build_save=True, build_restore=True)
  File "C:\Users\Anaconda3\envs\oldertensor\lib\site-packages\tensorflow\python\training\saver.py", line 1345, in _build
    raise ValueError("No variables to save")
ValueError: No variables to save

also

tf.set_random_seed(int(slurm_id)) wrong. slurm_id is nonetype

I have to add

  if slurm_id is None: #added
	     slurm_id = 256  #added

p.s. is there a way to reduce your data size/scale( like can I just half of the data but is there a pair or relation among the input, ref and mask in term of name or something?) or set the parameters properly(reduce to 1 gpu or just cpu) to a smaller one so that I can just run it shorter rather than 2.5 days that you mentioned in your paper?

@nsalminen

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.