Giter Site home page Giter Site logo

weitingchen83 / jstasr-desnownet-eccv-2020 Goto Github PK

View Code? Open in Web Editor NEW
26.0 1.0 10.0 7.53 MB

This is the project page of our paper which has been published in ECCV 2020.

Home Page: https://github.com/weitingchen83/JSTASR-DesnowNet-ECCV-2020

License: MIT License

Python 100.00%
snow-removal snow-model snow-images paper-download transparency image-restoration dehazing dehazing-algorithm desnowing desnowing-algorithm

jstasr-desnownet-eccv-2020's Introduction

JSTASR: Joint Size and Transparency-AwareSnow Removal Algorithm Based on ModifiedPartial Convolution and Veiling Effect Removal (Accepted by ECCV-2020)

Wei-Ting Chen, Hao-Yu Feng, Jian-Jiun Ding, Chen-Che Tsai and Sy-Yen Kuo

  • Wei-Ting Chen and Hao-Yu Feng share the equal contribution in this paper.

[Paper Download] [Code Download]

image

We also develop a large-scale snow dataset which contains the veiling effect called "Snow Removal in Realistic Scenario (SRRS)". You can download from this link


You can also refer our related works on dehazing:

1."PMS-Net: Robust Haze Removal Based on Patch Map for Single Images" which has been published in CVPR 2019.

[Paper Download] [Code Download]

and

2."PMHLD: Patch Map Based Hybrid Learning DehazeNet for Single Image Haze Removal" which has been published in TIP 2020.

[Paper Download] [Code Download]

Abstract:

Snow removal usually affects the performance of computer vision. Comparing with other atmospheric phenomenon (e.g., haze and rain), snow is more complicated due to its transparency, various size, and accumulation of veiling effect, which make single image de-snowing more challenging. In this paper, first, we reformulate the snow model. Different from that in the previous works, in the proposed snow model, the veiling effect is included. Second, a novel joint size and transparency-aware snow removal algorithm called JSTASR is proposed. It can classify snow particles according to their sizes and conduct snow removal in different scales. Moreover, to remove the snow with different transparency, the transparency-aware snow removal is developed. It can address both transparent and non-transparent snow particles by applying the modified partial convolution. Experiments show that the proposed method achieves significant improvement on both synthetic and real-world datasets and is very helpful for object detection on snow images.

Setup and environment

To generate the recovered result you need:

  1. Python 3
  2. CPU or NVIDIA GPU + CUDA CuDNN (CUDA 9.0)
  3. tensorflow 1.6.0
  4. keras 2.2.0
  5. cv2 3.4.4

Testing

$ python ./predict.py -dataroot ./your_dataroot -datatype datatype -predictpath ./output_path -batch_size batchsize

*datatype default: tif, jpg ,png

Example:

$ python ./predict.py -dataroot ./testImg -predictpath ./p -batch_size 3
$ python ./predict.py -dataroot ./testImg -datatype tif -predictpath ./p -batch_size 3

The pre-trained model can be found at this website. Please download three pre-trained models to the folder "modelParam".

Citations

Please cite this paper in your publications if it helps your research.

Bibtex:

@inproceedings{JSTASRChen,
  title={JSTASR: Joint Size and Transparency-Aware Snow Removal Algorithm Based on Modified Partial Convolution and Veiling Effect Removal},
  author={Chen, Wei-Ting and Fang, Hao-Yu and Ding, Jian-Jiun and Tsai, Chen-Che and Kuo, Sy-Yen},
  booktitle={European Conference on Computer Vision},
  year={2020}
}

jstasr-desnownet-eccv-2020's People

Contributors

weitingchen83 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

jstasr-desnownet-eccv-2020's Issues

Question about dataset-construction😀

Thank you for your sharing!
As you mentioned in your paper JSTASR that "for each snow image, various types of snow are synthesized by Photoshop and the corresponding snow information is labeled", I want to know how did you use Photoshop to achieve such a large number of non-repetitive mask generation work.
Did you rely on manual operation, or writing scripts to achieve automatic batch processing?
Could you please tell me some related operations or scripts tutorials? Thans a lot!

PSNR Question

Hello, I have some questions.
I tested your pre-trained model (my environment -> windows 10, Cuda 9.0, Python 3.6, tensorflow 1.6.0, keras 2.2.0) with [SRRS_15004 dataset's Syn] 1000 random samples.
but I have some problems..😥
In my case, i got the very low PSNR results.. (roughly 19.5)
Image was loaded normally. <- I already checked!
Please check if there is anything I need to do to get the right PSNR values.
Thank u.
Have a good day! 😊

ValueError: A `Concatenate` layer should be called on a list of at least 1 input. Received: input_shape=[[(None, 480, 640, 1)], (None, 480, 640, 3)]

Command - python predict.py -dataroot testImg -datatype tif -predictpath output -batch_size 3

import end
Read img from: testImg
Len of the file: 3
[||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||] 100.0% ...Loading data...
(3, 480, 640, 3) data shape
2022-01-25 10:51:29.790963: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0.
Build TR
Traceback (most recent call last):
File "predict.py", line 95, in
modelRecoverCombine = model.model.build_combine_model()
File "/content/JSTASR-DesnowNet-ECCV-2020/model/model.py", line 181, in build_combine_model
TRinp=Concatenate(axis=3)([pmrc,inp])
File "/usr/local/lib/python3.7/dist-packages/keras/utils/traceback_utils.py", line 67, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/usr/local/lib/python3.7/dist-packages/keras/layers/merge.py", line 499, in build
'A Concatenate layer should be called on a list of '
ValueError: A Concatenate layer should be called on a list of at least 1 input. Received: input_shape=[[(None, 480, 640, 1)], (None, 480, 640, 3)]

Facing this issue when trying to use the pretrained model and running predict.py

Model's trained weight not found

Hi! I tried to download the A.h5 weight for modelparam folder but the 2 google-drive web links you provided cannot be found (i.e., open). Please can you provide a new link containing the trained weight. Thanks

ValueError: axes don't match array

File "./predict.py", line 95, in
modelRecoverCombine = model.model.build_combine_model()
File "/home/zhila/Project/Research_Journal/JSTASR-DesnowNet-ECCV-2020/model/model.py", line 192, in build_combine_model
modelSnow.load_weights('./modelParam/snowmodel.h5',by_name=False)
File "/home/zhila/.local/lib/python3.6/site-packages/keras/engine/saving.py", line 492, in load_wrapper
return load_function(*args, **kwargs)
File "/home/zhila/.local/lib/python3.6/site-packages/keras/engine/network.py", line 1230, in load_weights
f, self.layers, reshape=reshape)
File "/home/zhila/.local/lib/python3.6/site-packages/keras/engine/saving.py", line 1224, in load_weights_from_hdf5_group
reshape=reshape)
File "/home/zhila/.local/lib/python3.6/site-packages/keras/engine/saving.py", line 861, in preprocess_weights_for_loading
weights = convert_nested_model(weights)
File "/home/zhila/.local/lib/python3.6/site-packages/keras/engine/saving.py", line 836, in convert_nested_model
original_backend=original_backend))
File "/home/zhila/.local/lib/python3.6/site-packages/keras/engine/saving.py", line 980, in preprocess_weights_for_loading
weights[0] = np.transpose(weights[0], (3, 2, 0, 1))
File "<array_function internals>", line 6, in transpose
File "/home/zhila/.local/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 653, in transpose
return _wrapfunc(a, 'transpose', axes)
File "/home/zhila/.local/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 58, in _wrapfunc
return bound(*args, **kwds)
ValueError: axes don't match array

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.