Skip to content

Commit

Permalink
Homography example (#242)
Browse files Browse the repository at this point in the history
* add homography files

* fixed some minor bugs

* No bugs for homography_estimation.py

* isorted homography_estimation.py

* added copyright notice

* removed some comments

* added some comments describing the fns

* Moved third_party code to a separate folder.

* Updated README with homography dependencies.

* moved layer init to top, fixed visualisation bug

- removed tensorboard loggin
- put theseus layer init outside of loop
- fixed bug with visualisation using state history

* Changed viz directory.

* added description in examples readme

Co-authored-by: Daniel DeTone <4764838+ddetone@users.noreply.github.com>
Co-authored-by: Joseph Ortiz <20665119+joeaortiz@users.noreply.github.com>
Co-authored-by: Luis Pineda <luisen.p@gmail.com>
  • Loading branch information
4 people committed Jul 19, 2022
1 parent 48c6dec commit 982c250
Show file tree
Hide file tree
Showing 6 changed files with 1,284 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ datasets/
data/
temp/
scripts/
docs_build/
docs_build/
viz/
12 changes: 11 additions & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ problem with loop closure outliers.
- pose_graph/pose_graph_benchmark: Is an example of using Theseus to solve pose graph optimization problems.
- pose_graph/pose_graph_g2o: Is an example of using Theseus to solve pose graph optimization problems in the
g2o format.
- homography_estimation.py: Is an example of using Theseus to learn CNN image features for homography estimation.
The features are trained to minimize the four corner distance between the warped and target image.

These can be run from your root `theseus` directory by doing

Expand All @@ -27,11 +29,19 @@ These can be run from your root `theseus` directory by doing
python examples/pose_graph/pose_graph_cube
python examples/pose_graph/pose_graph_benchmark
python examples/pose_graph/pose_graph_g2o
python examples/homography_estimation.py

The motion planning and tactile estimation examples require `hydra` installation which you can obtain
The motion planning and tactile estimation examples require `hydra` installation, which you can obtain
by running.

pip install hydra-core

The homography example requires `kornia` and `OpenCV`, which you can install with

```bash
pip install kornia
pip install opencv-python
```

Any outputs generated by these scripts will be saved under `examples/outputs`. You can
change this directory by passing the CLI option `hydra.run.dir=<your_directory>`
Loading

0 comments on commit 982c250

Please sign in to comment.