Skip to content

End-to-end weakly-supervised semantic alignment homography implementation

License

Notifications You must be signed in to change notification settings

MashiPe/weakalign

 
 

Repository files navigation

About

This is an extesion that adds support for the homography transformation for the model proposed in "End-to-end weakly-supervised semantic alignment" by I. Rocco, R. Arandjelović and J. Sivic.

Credit for the authors. For more information check out the original project [website] and the paper on [arXiv].

Getting started

VScode dev-container

A dev docker container is provided for easy reproduction. To use it open the project in VSCode and open the project in a dev-container using the Dockerfile located at the root of the project.

Training

The code includes scripts for pre-training the homography model with strong supervision (train_strong_hom.py) as well as to fine-tune the model using weak supervision (train_weak_hom.py).

Training scripts can be found in the scripts/ folder.

Evaluation

Evaluation is implemented in the eval_hom.py file. It can evaluate a homography model (with the --model-hom parameters). No evaluation for combined models is provided

The evaluation dataset is passed with the --eval-dataset parameter.

Trained models

Trained models for the baseline method using only strong supervision and the proposed method using additional weak supervision are provided below. You can store them in the trained_models/ folder.

CNNGeometric with ResNet-101 baseline: [hom model]

python eval_hom.py --feature-extraction-cnn resnet101 --model-hom trained_models/cnngeo_resnet101_hom.pth.tar --eval-dataset pf-pascal

Proposed method: [hom model]

python eval_hom.py --feature-extraction-cnn resnet101 --model-hom trained_models/weakalign_resnet101_hom.pth.tar --eval-dataset pf-pascal

Credits

If you want a more in depth view of the method check the original work.

About

End-to-end weakly-supervised semantic alignment homography implementation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 93.5%
  • Jupyter Notebook 4.9%
  • Shell 1.1%
  • Dockerfile 0.5%