Extracting Quantitative Streamline Information from Surface Flow Visualization Images in a Linear Cascade using Convolutional Neural Networks.
These files contain the code for Paper Extracting Quantitative Streamline Information from Surface Flow Visualization Images in a Linear Cascade using Convolutional Neural Networks.
I developed it on Linux, so it might be a bit problematic on Windows. Don't try to train without a GPU
The files are provided in the hope that they will be useful to other researchers but we provide the software ``AS IS'' WITHOUT WARRANTY OF ANY KIND. The code is meant to be a demonstration of the techniques used in the paper. I think my idea might be good but my coding skill is really terrible. Thus, do some modification according you task, and hopefully it might work.
- Python 3.7
- Pytorch >=1.4 (Last test 1.9)
- OpenCV
- Matplotlib
- Kornia
- Other package like Numpy, h5py, PIL, json, skimage.
Camera Lens Calibration -> contains the calibration images and the python code for the lens correction and coordinate detection.
train.py -> train the egde detection neural networks
test.py -> test the egde detection neural networks
preprocessing.py -> including calibrated visualization image, division into cells, grayscale conversion, image smoothing, and exposing intensity gradients.
postprocessing.py -> get your flow direction result
Before to start please check dataset.py, from the first line of code you can see the datasets used for training/testing. Before you generate your own result, please check again.
Edge detection datasets
- After completing the setup, use
preprocessing.py
to preprocess the images to be processed. - Download the dataset and check the Parser settings, then run
train.py
. - Choose the appropriate stride and neighborhood size (they need to match the size of the images), then run
postprocessing.py
.
Tips: If you do not want to train a neural network from scratch, or if your device does not have sufficient performance, you can also use the results of Canny edge detection to run postprocessing.py
.
- We like to thanks to the previous repo: LDC
If you like this work please cite these papers if you find helpful in your academic/scientific publication,
@ARTICLE{xsoria2022ldc,
author={Soria, Xavier and Pomboza-Junez, Gonzalo and Sappa, Angel Domingo},
journal={IEEE Access},
title={LDC: Lightweight Dense CNN for Edge Detection},
year={2022},
volume={10},
number={},
pages={68281-68290},
doi={10.1109/ACCESS.2022.3186344}}
@article{abdelsalam2017exploiting,
title={Exploiting Modern Image Processing In Surface Flow Visualisation},
author={Abdelsalam, Tarek Ihab and Williams, Richard and Ingram, Grant},
year={2017}
}