Giter Site home page Giter Site logo

jqtangust / filmremoval Goto Github PK

View Code? Open in Web Editor NEW
26.0 4.0 0.0 3.1 MB

[CVPR 2024] Official Implementation of Learning to Remove Wrinkled Transparent Film with Polarized Prior

Home Page: https://jqt.me/_FilmRemoval_/

License: MIT License

Python 100.00%
image-reconstruction material-removal restoration computational-photography industry low-level-vison film-removal

filmremoval's Introduction

[CVPR 2024] Film Removal

Problem of Film Removal

This is the official repository for Learning to Remove Wrinkled Transparent Film with Polarized Prior (CVPR 2024)

Jiaqi Tang, Ruizheng Wu, Xiaogang Xu, Sixing Hu and Ying-Cong Chen*

*: Corresponding Author

GitHub license made-for-VSCode Visits Badge

Here is our Project Page !

πŸ” New Problem in Low-level Vision: Film Removal

  • 🚩 Goal: Film Removal (FR) aims to remove the interference of wrinkled transparent films and reconstruct the original information under the films.
  • 🚩This technique is used in industrial recognition systems.
Problem of Film Removal

πŸ“’ News and Updates

  • βœ… May 28, 2024. We release the pre-trained model of Film Removal in K-ford. Check this Google Cloud link for DOWNLOAD.
  • βœ… May 06, 2024. We release the code of Film Removal.
  • βœ… May 06, 2024. We release the dataset of Film Removal. Check this Google Cloud link for DOWNLOAD.

▢️ Getting Started

πŸͺ’ Installation

  • Python >= 3.8.2
  • PyTorch >= 1.8.1
  • Install Polanalyser for processing polarization image
    pip install git+https://github.com/elerac/polanalyser
    
  • Install other dependencies by
    pip install -r requirements.txt
    

πŸ’Ύ Dataset Preparation

  • Google Drive Link for DOWNLOAD dataset.

  • Data Structure: each K* directory contains the data for one fold of the dataset. The GT directory contains the ground truth images, and the input directory contains the input images at different polarized angles.

  • The dataset is organized as follows:

    β”œβ”€β”€ K1
    β”‚   β”œβ”€β”€ GT
    β”‚   β”‚   └── 2DCode
    β”‚   β”‚       └── 1_gt_I.bmp
    β”‚   └── input
    β”‚       └── 2DCode
    β”‚           β”œβ”€β”€ 1_input_0.bmp
    β”‚           β”œβ”€β”€ 1_input_45.bmp
    β”‚           β”œβ”€β”€ 1_input_90.bmp
    β”‚           └── 1_input_135.bmp
    β”œβ”€β”€ K2
    β”‚   β”œβ”€β”€ ...
    β”œβ”€β”€ ...
    └── K10
        β”œβ”€β”€ ...
    

🏰 Pretrained Model

πŸ”¨ Configuration

  • The configuration files for testing and training.

  • The Test_K_ford option specifies the number of folds for K-fold cross-validation during testing. The dataroot option specifies the root directory for the dataset, which is set to Dataset. Other configuration settings include learning rate schemes, loss functions, and logger options.

    datasets:
      train:
        name: Reconstruction
        mode: LQGT_condition
        Test_K_ford: K10 # remove from training
        dataroot: /remote-home/share/jiaqi2/Dataset
        dataroot_ratio: ./
        use_shuffle: true
        n_workers: 0
        batch_size: 1
        GT_size: 0
        use_flip: true
        use_rot: true
        condition: image
      val:
        name: Reconstruction
        mode: LQGT_condition_Val
        Test_K_ford: K10 # for testing
        dataroot: /remote-home/share/jiaqi2/Dataset
        dataroot_ratio: ./
        condition: image
    

⏳ Testing

  • Modify dataroot, Test_K_ford and pretrain_model_G in testing configuration, then run
    python test.py -opt ./codes/options/test/test.yml
    
  • The test results will be saved to ./results/testset_name, including Restored Image and Prior.

πŸ–₯️ Training

  • Modify dataroot and Test_K_ford in training configuration, then run

    python train.py -opt ./codes/options/train/train.yml
    
  • The logs, models and training states will be saved to ./experiments/name. You can also use tensorboard for monitoring for the ./tb_logger/name.

  • Restart Training (To add checkpoint in training configuration)

    path:
      root: ./
      pretrain_model_G: .../experiments/K1/models/XX.pth
      strict_load: false
      resume_state: .../experiments/K1/training_state/XX.state
    

⚑ Performance

Compared with other baselines, our model achieves state-of-the-art performance:

⭐ [Table 1] Quantitative evaluation in image reconstruction with 10-fold cross-validation.

Methods PSNR SSIM
SHIQ 21.58 0.7499
Polar-HR 22.19 0.7176
Uformer 31.68 0.9426
Restormer 34.32 0.9731
Ours 36.48 0.9824

⭐ [Figure 1] Qualitative Evaluation in image reconstruction.

⭐ [Figure 2-3] Qualitative Evaluation in Industrial Environment. (QR Reading & Text OCR)

🌐 Citations

The following is a BibTeX reference:

@inproceedings{tang2024learning,
  title = {Learning to Remove Wrinkled Transparent Film with Polarized Prior},
  author = {Tang, Jiaqi and Wu, Ruizheng and Xu, Xiaogang and Hu, Sixing and Chen, Ying-Cong},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
  year = {2024}
}

πŸ“§ Connecting with Us?

If you have any questions, please feel free to send email to [email protected].

πŸ“œ Acknowledgment

This work is supported by the National Natural Science Foundation of China (No. 62206068) and the Natural Science Foundation of Zhejiang Province, China under No. LD24F020002.

filmremoval's People

Contributors

jqtangust avatar

Stargazers

Cheng Fang avatar  avatar Paolo Manchisi avatar AndrΓ© Afonso avatar  avatar Luozhou Wang avatar Di Wang avatar Ryota Maeda avatar Feng Wu avatar  avatar Rosine avatar  avatar  avatar Xiaojie Xu avatar  avatar  avatar Tao Hu avatar RemHero avatar Xu CAO avatar  avatar  avatar  avatar WU Jinfeng avatar  avatar Yixun Liang avatar Hao Lu avatar

Watchers

 avatar Kostas Georgiou avatar  avatar  avatar

filmremoval's Issues

Waiting for code release

A very interesting work. I can not wait to see and run the code to produce results using one step. :)

About training time

Hi author, when I trained with the 3090, I realized that the training time is expected to reach about 20 days, and I would like to know how long your training time is.Thanks!

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.