Disclaimer: this blog has done the code test share, please refer to;

This article is excerpted from the image repair column

  • 🍊 column: image repair – code environment construction – knowledge summary
  • 🍊 thanks to every reader for your support and recognition

Image repair new creative ideas: CVPR 2021, code evaluation


📘 Basic Information


  • Restoring Extremely Dark Images in Real Time
  • Restore extremely dark images in real time
  • Github.com/MohitLamba9…
  • Lamba_Restoring_Extremely_Dark_Images_in_Real_Time_CVPR_2021_paper.pdf

This paper is devoted to solving the problem

  • Very dark image to light image (image repair)
  • Thus improve (solve) the object detection problem of extremely dark image


📘 Download code


Method 1 (Limited network, possible download failure)

git clone https://github.com/MohitLamba94/Restoring-Extremely-Dark-Images-In-Real-Time.git
Copy the code

Mode 2 (Download it manually, copy it to the server, and decompress it)

  • Decompress the command, for example
unzip Restoring-Extremely-Dark-Images-In-Real-Time-main.zip 
Copy the code


📘 Environment Construction


Activate an existing PyTorch 1.4 environment (my blog post has installed many versions and won’t repeat them here)

  • If you are not familiar with it, you can read my blog
  • Install Pytorch and Torchvision in Cuda10.0 for Linux — you can install any version
conda activate torch14

Install some missing libraries where my environment runs this code

pip install rawpy
pip install ptflops

Copy the code

📘 Demo test run


cd Restoring-Extremely-Dark-Images-In-Real-Time

python demo.py
Copy the code
  • Run the following output
python demo.py

# GPU usage will not be high. Loading all files to CPU RAM Image No.: 1, Amplification_m= 1:53.080570220947266 Image No.: 2, Amplification_m=1: 22.907602310180664 Image No.: 3, Amplification_m=1: 45.878238677978516 Files Loaded to CPU RAM...... Network parameters : 784768 Device on GPU: True Restored images savedin DEMO_RESTORED_IMAGES directory

Copy the code


📘 Time memory complexity evaluation


Measure Time-Memory Complexity

  • python time_complexity.py
  • Run as follows
 python time_complexity.py

---Our Model parameters : 784768


---SID model parameters : 7760748

Computational complexity of Our model forA 8MP Image: 41.38 GMac Computational complexity of SID ModelforA 8MP Image: 440.46 GMac Beginning Warmup... Time taken by our model on CPUfor8MP image: 1.0671975135803222 seconds Time taken by SID Model on CPUfor8MP image: 8.417949628829955 secondsCopy the code

📘 training


For training, please refer to train_test_ours/train.py


Do not expand it temporarily. If it is used in the project in the future, it can be supplemented if necessary


📕 attached source + paper


It’s actually pretty easy to download, the code doesn’t change this time, and it runs smoothly

Link: https://pan.baidu.com/s/129MAPqMJtNp1v57gHZDMCA extraction code: moliCopy the code

📕 This article can bring us thinking


Translation section, reference link

  • zhuanlan.zhihu.com/p/437764659

features

  • lightweight
  • Image repair + target detection combination
  • Highlight the difficulties in solving the actual model deployment:
  • Repair network, single image reasoning speed is slow
  • Dark image target detection is difficult

This is a solution of image repair + target detection combined with practical difficulties in actual landing, which may become the inspiration foundation for our friends to write a Paper


🚀🚀 Mexic AI


  • 🎉 as one of the bloggers with the most dry goods in the field of AI, ❤️ lives up to his time and qing ❤️
  • ❤️ If the article is helpful to you, like, comment encourage bloggers every minute to seriously create
  • Happy learning AI, deep learning environment building: an article to read

    • 🍊# Give me a new server, how will I arrange CUDA

    • 🍊 # Ubuntu install CUDa11.2 for current users

    • 🍊 # Linux and Windows setup PIP image source – the most practical machine learning library download acceleration setup

    • 🍊# Anaconda conda switch to domestic source, Windows and Linux configuration method, add tsinghua source —

    • 🍊 # Specify the GPU to run and train Python programs, deep learning single card, multi-card training GPU Settings

    • 🍊 # Install Pytorch and Torchvision in Cuda10.0 for Linux

    • 🍊 # Article read tensorflow-GPU installation, testing

    • 🍊 # Read SSH password login, public key authentication login

    • Install JDK 11: configure the JAVA_HOME environment variable

    Profile of the blogger: Master of Software Engineering, graduated, 5W readers and fans in total

    • 🍊 Computer vision: some knowledge in superresolution reconstruction, image restoration, object detection, style transfer and other fields
    • 🍊 AI engineering: Ncnn, MNN, TensorRT are learning
    • 🍊 C++, Python, Java

    Please pay attention to moneo-ai and its namesake public number Moneo-AI

    On the way to learn lessons, let mohli AI accompany you to enjoy more interesting AI