All Projects → shaohua0116 → NovelViewSynthesis-TensorFlow

shaohua0116 / NovelViewSynthesis-TensorFlow

Licence: MIT license
A TensorFlow implementation of a simple Novel View Synthesis model on ShapeNet (cars and chairs), KITTI, and Synthia.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to NovelViewSynthesis-TensorFlow

geometry-free-view-synthesis
Is a geometric model required to synthesize novel views from a single image?
Stars: ✭ 265 (+463.83%)
Mutual labels:  novel-view-synthesis
external-internal-inpainting
[CVPR 2021] EII: Image Inpainting with External-Internal Learning and Monochromic Bottleneck
Stars: ✭ 95 (+102.13%)
Mutual labels:  image-synthesis
Fundus Review
Official website of our paper: Applications of Deep Learning in Fundus Images: A Review. Newly-released datasets and recently-published papers will be updated regularly.
Stars: ✭ 64 (+36.17%)
Mutual labels:  image-synthesis
New-View-Synthesis
Collecting papers about new view synthesis
Stars: ✭ 437 (+829.79%)
Mutual labels:  view-synthesis
gpuvmem
GPU Framework for Radio Astronomical Image Synthesis
Stars: ✭ 27 (-42.55%)
Mutual labels:  image-synthesis
text-to-image
Text to Image Synthesis using Generative Adversarial Networks
Stars: ✭ 72 (+53.19%)
Mutual labels:  image-synthesis
hypernerf
Code for "HyperNeRF: A Higher-Dimensional Representation for Topologically Varying Neural Radiance Fields".
Stars: ✭ 735 (+1463.83%)
Mutual labels:  novel-view-synthesis
SLE-GAN
Towards Faster and Stabilized GAN Training for High-fidelity Few-shot Image Synthesis
Stars: ✭ 53 (+12.77%)
Mutual labels:  image-synthesis
Sketch2Color-anime-translation
Given a simple anime line-art sketch the model outputs a decent colored anime image using Conditional-Generative Adversarial Networks (C-GANs) concept.
Stars: ✭ 90 (+91.49%)
Mutual labels:  image-synthesis
WGAN-GP-TensorFlow
TensorFlow implementations of Wasserstein GAN with Gradient Penalty (WGAN-GP), Least Squares GAN (LSGAN), GANs with the hinge loss.
Stars: ✭ 42 (-10.64%)
Mutual labels:  image-synthesis
LightFieldReconstruction
High-Dimensional Dense Residual Convolutional Neural Network for Light Field Reconstruction
Stars: ✭ 50 (+6.38%)
Mutual labels:  view-synthesis
Seg2Eye
Official implementation of "Content-Consistent Generation of Realistic Eyes with Style", ICCW 2019
Stars: ✭ 26 (-44.68%)
Mutual labels:  image-synthesis
OpenShapes
A data-driven approach for interactively synthesizing diverse images from semantic label maps.
Stars: ✭ 39 (-17.02%)
Mutual labels:  image-synthesis
3d Photo Inpainting
[CVPR 2020] 3D Photography using Context-aware Layered Depth Inpainting
Stars: ✭ 5,596 (+11806.38%)
Mutual labels:  novel-view-synthesis
Awesome-Text-to-Image
A Survey on Text-to-Image Generation/Synthesis.
Stars: ✭ 251 (+434.04%)
Mutual labels:  image-synthesis
NeuRay
[CVPR2022] Neural Rays for Occlusion-aware Image-based Rendering
Stars: ✭ 291 (+519.15%)
Mutual labels:  novel-view-synthesis
SuperStyleNet
SuperStyleNet: Deep Image Synthesis with Superpixel Based Style Encoder (BMVC 2021)
Stars: ✭ 28 (-40.43%)
Mutual labels:  image-synthesis
gan-ensembling
Invert and perturb GAN images for test-time ensembling
Stars: ✭ 93 (+97.87%)
Mutual labels:  image-synthesis
pytorch clip guided loss
A simple library that implements CLIP guided loss in PyTorch.
Stars: ✭ 67 (+42.55%)
Mutual labels:  image-synthesis
ArtGAN
Tensorflow codes for our ICIP-17 and arXiv-1708.09533 works: "ArtGAN: Artwork Synthesis with Conditional Categorial GAN" & "Learning a Generative Adversarial Network for High Resolution Artwork Synthesis "
Stars: ✭ 16 (-65.96%)
Mutual labels:  image-synthesis

Novel View Synthesis in TensorFlow

Descriptions

This project is a TensorFlow implementation of a simple novel view synthesis model, which aims to synthesize a target view with an arbitrary camera pose from a given source view and its camera pose. An illustration of the task is as follows.

The model implemented in the repo is a simple conv-deconv network with skip connections. To allow you to focus on building your own model and see how well it can work, all the data loaders/downloading scripts, the training code, as well as the training and testing splits are well-configured based on the setting used in this paper: Multi-view to Novel view: Synthesizing Novel Views with Self-Learned Confidence published in ECCV 2018. All you need to do is play with the model code: synthesizer.py.

The model can be trained on images rendered from 3D object models (ShapeNet) as well as real and synthesized scenes (KITTI and Synthia). All datasets are stored as HDF5 files, they will be downloaded once you run the training code.

  • ShapeNet: cars (150GB) and chairs (14GB)

  • KITTI (4.3GB)

  • Synthia (3.3GB)

Prerequisites

Usage

After downloading the datasets, we can start to train and test models using the following commands

Train

Train a model from scratch

$ python trainer.py --batch_size 32 --dataset car

Fine-tune a model from a checkpoint

$ python trainer.py --batch_size 32 --dataset car --checkpoint /path/to/model/model-XXX
  • Selected arguments (see the trainer.py for more details)
    • --prefix: a nickname for the training
    • --dataset: choose among car, chair, kitti, and synthia. You can also add your own datasets.
    • Checkpoints: specify the path to a pre-trained checkpoint
      • --checkpoint: load all the parameters including the flow and pixel modules and the discriminator.
    • Logging
      • --log_setp: the frequency of outputing log info ([train step 681] Loss: 0.51319 (1.896 sec/batch, 16.878 instances/sec))
      • --ckpt_save_step: the frequency of saving a checkpoint
      • --test_sample_step: the frequency of performing testing inference during training (default 100)
      • --write_summary_step: the frequency of writing TensorBoard summaries (default 100)
    • Hyperparameters
      • --batch_size: the mini-batch size (default 8)
      • --max_steps: the max training iterations

Interpret TensorBoard

Launch Tensorboard and go to the specified port, you can see differernt losses in the scalars tab and plotted images in the images tab. The scalars include L1 loss and SSIM. The plotted images show (from top to bottom): source view, target view, and the predicted target view.

Test

Evaluate trained models

$ python evaler.py --dataset car --loss True --plot_image True --output_dir car_image --write_summary True --summary_file log_car.txt --train_dir train_dir/default-car-bs_16_lr_0.0001-num_input-1-20190430-014454 --data_id_list ./testing_tuple_lists/id_car_random_elevation.txt
  • Selected arguments (see the evaler.py for more details)

    • Id list
      • --data_id_list: specify a list of data point that you want to evaluate
    • Task
      • --loss: report the loss
      • --write_summary: write the summary of this evaluation as a text file
      • --plot_image: render synthesized images
    • Output
      • --quiet: only display the final report
      • --summary_file: the path to the summary file
      • --output_dir: the output dir of plotted images
  • Synthesized images After plotting the synthesized images at the specified output_dir, we can see the results like this

  • Loss summary The overall L1 loss and SSIM can be found at log_car.txt
Checkpoint: train_dir/default-car-bs_16_lr_0.0001-20190430-014454/model-160000
Dataset: car
Id list: ./testing_tuple_lists/id_car_elevation_0.txt
[Final Avg Report] Total datapoint: 10000 from ./testing_tuple_lists/id_car_elevation_0.txt
[Loss]
l1_loss: 0.13343
ssim: 0.90811
[Time] (63.128 sec)

Related work

The code is mainly borrowed from this paper

Check out some other work in novel view synthesis

Cite the paper

If you find this useful, please cite

@inproceedings{sun2018multiview,
  title={Multi-view to Novel View: Synthesizing Novel Views with Self-Learned Confidence},
  author={Sun, Shao-Hua and Huh, Minyoung and Liao, Yuan-Hong and Zhang, Ning and Lim, Joseph J},
  booktitle={European Conference on Computer Vision},
  year={2018},
}

Authors

Shao-Hua Sun

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].