ctlearn-project / ctlearn

Deep Learning for IACT Event Reconstruction
BSD 3-Clause "New" or "Revised" License
52 stars 43 forks source link

DL full event reconstruction #132

Closed TjarkMiener closed 3 years ago

TjarkMiener commented 4 years ago

This PR includes three major features:

  1. Energy and arrival direction regression (Impact parameter and shower maximum opitonal)

    • The regression tasks have been added to CTLearn. Full event reconstruction can be performed in both modes (Singletask Learning and Multitask Learning). However, in the MTL approach the protons are not excluded in the loss calculation and the task weights are fix constant from the config file. This will be solved in a follow-up PR.
  2. Residual blocks

  3. Attention mechanisms

Some minor features:

TjarkMiener commented 4 years ago

This PR would be ready for a code review! Thank you, @nietootein @aribrill!

TjarkMiener commented 4 years ago

Thanks @LucaRomanato for reporting a bug occur in the subfolder structure. 6733ed0 should fix this!

aribrill commented 3 years ago

I am in the process of testing the PR on shevek and will have more comments soon. One issue I came across so far is the installation. I followed the installation instructions in the README. Are they still up to date, e.g. regarding installing DL1DH with pip? I had to run the following commands after setup to get things working:

source activate ctlearn
conda install -c cta-observatory ctapipe-extra
pip uninstall numpy
pip install numpy
TjarkMiener commented 3 years ago

Thanks for the comments @aribrill! I resolved most of them. Regarding the installation, can you specify the ctapipe and dl1dh version you used please? ctapipe-extra should not be required though. The multi-stereo mode is still present in the DL1DH version, which are used for this PR.

Also thanks for fixing the number of examples of DL1DH. I will have a look into it now.

aribrill commented 3 years ago

I used DL1DH v0.8.2, which requires ctapipe 0.8.0.

On Tue, Mar 2, 2021 at 9:54 AM Tjark Miener notifications@github.com wrote:

Thanks for the comments @aribrill https://github.com/aribrill! I resolved most of them. Regarding the installation, can you specify the ctapipe and dl1dh version you used please? ctapipe-extra should not be required though.

Also thanks for fixing the number of examples of DL1DH. I will have a look into it now.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ctlearn-project/ctlearn/pull/132#issuecomment-788965481, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEWJLHIWMHUX3XEZGAMPTR3TBT3ZBANCNFSM4PEPLJWA .

TjarkMiener commented 3 years ago

The versions are correct. I think pip is messing up the dependencies. The correct versions of DL1DH and ctapipe should be installed automatically by conda, when the environment is created. There is no need to git clone the DL1DH repo and installed DL1DH from source. The latest commits should fix the installation and I updated the README. Can you please check, if the correct versions with the correct dependencies are installed on shevek? I also added a commit to make ctlearn a command line tool to avoid pointing to the run_model script. This should work: $ ctlearn myconfig.yml

aribrill commented 3 years ago

Actually, I have a question. I replicated one of the benchmark models (arr_lowcut_TRN) and would like to plot the predictions for diffuse gammas. I have a predictions file in h5 format. I see that none of the plotting scripts have been updated to be compatible with this new format, however. Are there new scripts that replicate the old functionality or at least some instructions for what to do with this file?

I also see that ctaplot has been added as a dependency, but I can't find where it's used. Is that related in some way?

TjarkMiener commented 3 years ago

Thanks for the fixes! Everything worked fine for the compatibility PR. I uploaded the visualisation notebook. Anything missing?

TjarkMiener commented 3 years ago

Thanks for updating the plotting scripts!