Giter VIP home page Giter VIP logo

deepvel's Introduction

DeepVel

DeepVel is an end-to-end deep neural network to estimate horizontal velocity fields from pairs of solar granulation images separated in time. The velocities returned by DeepVel are computed assuming that the images are separated by 30 seconds. It is described in the paper, that you can find in https://arxiv.org/abs/1703.05128.

Abstract

Many phenomena taking place in the solar photosphere are controlled by plasma motions. Although the line-of-sight component of the velocity can be estimated using the Doppler effect, we do not have direct spectroscopic access to the components that are perpendicular to the line-of-sight. These components are typically estimated using methods based on local correlation tracking. We have designed DeepVel, an end-to-end deep neural network that produces an estimation of the velocity at every single pixel and at every time step and at three different heights in the atmosphere from just two consecutive continuum images. We have confronted DeepVel with local correlation tracking, pointing out that they give very similar results in the time- and spatially-averaged cases. We use the network to study the evolution in height of the horizontal velocity field in fragmenting granules, supporting the buoyancy-braking mechanism for the formation of integranular lanes in these granules. We also show that DeepVel can capture very small vortices, so that we can potentially expand the scaling cascade of vortices to very small sizes and durations.

Dependencies

train_deepvel.py and deepvel.py depend on the following set of non-standard packages:

  • Keras (tested with v1.2.2 and v2): used for the neural network definition and computations
  • Tensorflow (tested with v1.0.0): used to do the real GPU calculations

Using DeepVel for prediction

We provide DeepVel trained as described in the paper. You can use it straightforward from the command line if you have Keras and Tensorflow installed. The script we provide reads the observations from a FITS file, but you can modify the script to provide the observations from any other file. It is used as:

python deepvel.py -i samples/sample.fits -o output/output.fits -b 100    

We provide the sample file containing two frames from the IMaX observations for testing. The output file is a FITS file containing an array of size (n_frames x nx_new x ny_new x 6). The first dimension is the number of frames of the outpu (which is always one less than the input). The second and third dimensions are the size of the output image (which takes into account the removed borders). Finally, the last dimension contains the vx and vy velocity maps for the three optical depths considered: 1, 0.1 and 0.01.

We provide scripts for Keras 2 (deepvel_k2.py) and, as legacy, for Keras 1 (deepvel.py).

Using DeepVel for training

If you want to train DeepVel with your own images, we provide the script train_deepvel.py to this aim.

python train_deepvel.py -a start -e 30 -o networks/model1 -n 1e-3

The parameters for train_deepvel.py are:

- The action (indicated with `-a`) can be `start` to start the training of the network or `continue`, to continue a previous training.
- The output (indicated with `-o`) gives the path to the output files. Some extensions will be added to save weights, plots, etc.
- The number of epochs for training is indicated with `-e`.
- The noise added during the training is indicated with `-n`.

The training phase is hardwired with some paths for our training data. We do not provide them in this repository, so you will have to work with the script to adapt it to your training data.

deepvel's People

Contributors

aasensio avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

deepvel's Issues

A small mistake in code

Dear DeepVel-Team,
Thanks for sharing your fantastic work.
I think maybe I find a small mistake in your code: line 145 in train_deepvel.py (x = self.residual(conv))
According to the description in your paper about DeepVel, I think this step should be ReLU instead of Residual.
It's just what puzzles me, maybe I am wrong.

Best regards
Quan

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.