Skip to content
Snippets Groups Projects

Added function to aggregate attention maps

Merged Thibault Lavigne requested to merge 35-new-functon-to-aggregate-attention-maps-2 into main
All threads resolved!

Closes #35 (closed)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Please mark the MR as ready if it is, and add a demo exec of the teklia-dan predict command with attention plots (gifs)

  • added 1 commit

    Compare with previous version

    By Tristan Faine on 2023-03-08T10:23:59 (imported from GitLab)

  • Thibault Lavigne resolved all threads

    resolved all threads

    By Tristan Faine on 2023-03-08T10:24:10 (imported from GitLab)

  • added 1 commit

    Compare with previous version

    By Tristan Faine on 2023-03-08T10:24:10 (imported from GitLab)

  • Just in case there are any issues I'd be unaware of, here is the command used to test the library locally:

    teklia-dan predict \
        --image ~/Stage/gitlab_projects/NP_models_and_stuff/popp_single_page_htr_ner/example.jpg \
        --model ~/Stage/gitlab_projects/NP_models_and_stuff/popp_single_page_htr_ner/model.pt \
        --parameters ~/Stage/gitlab_projects/NP_models_and_stuff/popp_single_page_htr_ner/parameters.yml \
        --charset ~/Stage/gitlab_projects/NP_models_and_stuff/popp_single_page_htr_ner/charset.pkl \
        --output ~/Stage/gitlab_projects/NP_models_and_stuff/popp_single_page_htr_ner/predict_issue35/ \
        --scale 0.5 \
        --confidence-score \
        --attention-map \
        --attention-map-level line \
        --attention-map-scale 0.5

    The example image and model files used come from the dan worker itself, for popp_single_page_htr_ner example

    The proposed commits do not change the output as can be seen on these json and gifs, first one shown is the original code, then the modified code.

    before_example.json

    before_example_line

    after_example.json

    after_example_line

    By Tristan Faine on 2023-03-08T10:30:12 (imported from GitLab)

    Edited by Yoann Schneider
  • Yoann Schneider marked this merge request as ready

    marked this merge request as ready

  • Please register or sign in to reply
    Loading