diff --git a/.gitignore b/.gitignore index 501d3d8..0d5817b 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,9 @@ __pycache__/ # C extensions *.so +# IntelliJ Idea +*.idea + # Distribution / packaging .Python env/ diff --git a/.idea/Vision-Rat-Brain.iml b/.idea/Vision-Rat-Brain.iml deleted file mode 100644 index e8baac3..0000000 --- a/.idea/Vision-Rat-Brain.iml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml deleted file mode 100644 index 0eefe32..0000000 --- a/.idea/inspectionProfiles/profiles_settings.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 28cad29..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index e61280b..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index d26e51d..0000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - 1509931484125 - - - - - - - - - - \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..f9cb6a8 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,92 @@ +# Contributing + +When contributing to this repository, please first discuss the change you wish to make via issue, +email, or any other method with the owners of this repository before making a change. + +Please note we have a code of conduct, please follow it in all your interactions with the project. + +## Pull Request Process + +1. Ensure any install or build dependencies are removed before the end of the layer when doing a + build. +2. Update the README.md with details of changes to the interface, this includes new environment + variables, exposed ports, useful file locations and container parameters. +3. Increase the version numbers in any examples files and the README.md to the new version that this + Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/). +4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you + do not have permission to do that, you may request the second reviewer to merge it for you. + +## Code of Conduct + +### Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +### Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or +advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +### Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +### Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +### Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at [INSERT EMAIL ADDRESS]. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +### Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ \ No newline at end of file diff --git a/LICENSE b/LICENSE.md similarity index 96% rename from LICENSE rename to LICENSE.md index e5cc1f6..4f5f882 100644 --- a/LICENSE +++ b/LICENSE.md @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2016 Aditya Phan +Copyright (c) 2018 Jose G. Perez Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..099ded1 --- /dev/null +++ b/README.md @@ -0,0 +1,49 @@ +# Vision Rat Brain +This repository contains the supporting code for publications and projects done by Jose G. Perez + +It is not ready for public use yet. +Expect it to be complete by the end of May 2018 with an installation guide and explanations. + +Any questions may be directed to me via pull requests. + +## Getting Started + +Here's a breakdown of all the projects included in this repository + +### Main projects +* dataset/ + * Used to preprocess (crop, resize, compress) atlas images into NPZ files for use in other projects +* feature_matching_v1/ + * Proof of concept used for region matching using SIFT and RANSAC + * http://www.abstractsonline.com/pp8/#!/4376/presentation/4332 +* feature_matching_v2/ + * Region matching improved with custom RANSAC algorithm +* feature_matching_v3/ + * Whole image matching using SIFT and dynamic programming to derive plate correspondences + * https://www.frontiersin.org/articles/10.3389/fnsys.2018.00007/abstract +### Side projects +* auto_encoder/ + * Deriving atlas correspondences using AE +* matching_networks/ + * Deriving atlas correspondences through image similarities using matching networks +* siamese_networks/ + * Deriving atlas correspondences through image similarities using matching networks + +### Prerequisites + +### Installing + +## Contributing + +Please read [CONTRIBUTING.md](http://github.com/DeveloperJose/Vision-Rat-Brain) for details on our code of conduct, and the process for submitting pull requests to us. + +## Versioning + +We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/DeveloperJose/Vision-Rat-Brain/tags). + +## License + +This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details + +## Acknowledgments + diff --git a/Vision-Rat-Brain-F/atlas_pw.npz b/Vision-Rat-Brain-F/atlas_pw.npz deleted file mode 100644 index 5b28315..0000000 Binary files a/Vision-Rat-Brain-F/atlas_pw.npz and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_sw.npz b/Vision-Rat-Brain-F/atlas_sw.npz deleted file mode 100644 index cd8ebe0..0000000 Binary files a/Vision-Rat-Brain-F/atlas_sw.npz and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-03.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-03.jpg deleted file mode 100644 index 0adab12..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-03.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-04.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-04.jpg deleted file mode 100644 index 87ca2db..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-04.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-05.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-05.jpg deleted file mode 100644 index 9321f2f..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-05.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-06.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-06.jpg deleted file mode 100644 index 95ed789..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-06.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-07.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-07.jpg deleted file mode 100644 index dfa5ad9..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-07.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-08.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-08.jpg deleted file mode 100644 index 8a48226..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-08.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-09.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-09.jpg deleted file mode 100644 index 2ae3850..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-09.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-10.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-10.jpg deleted file mode 100644 index 8992b65..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-10.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-11.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-11.jpg deleted file mode 100644 index 3b14f6b..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-11.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-12.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-12.jpg deleted file mode 100644 index bf4a421..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-12.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-13.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-13.jpg deleted file mode 100644 index bade6c7..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-13.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-14.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-14.jpg deleted file mode 100644 index b0f6530..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-14.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-15.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-15.jpg deleted file mode 100644 index 61bd9cc..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-15.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-16.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-16.jpg deleted file mode 100644 index be141b2..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-16.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-17.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-17.jpg deleted file mode 100644 index 3d854ad..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-17.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-18.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-18.jpg deleted file mode 100644 index 8eb2ccc..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-18.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-19.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-19.jpg deleted file mode 100644 index d641904..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-19.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-20.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-20.jpg deleted file mode 100644 index c803212..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-20.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-21.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-21.jpg deleted file mode 100644 index c620acb..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-21.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-22.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-22.jpg deleted file mode 100644 index d12207c..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-22.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-23.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-23.jpg deleted file mode 100644 index dc5a2d4..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-23.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-24.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-24.jpg deleted file mode 100644 index 83f3dbe..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-24.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-25.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-25.jpg deleted file mode 100644 index fff76d1..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-25.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-26.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-26.jpg deleted file mode 100644 index 0819aaa..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-26.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-27.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-27.jpg deleted file mode 100644 index 9b0af62..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-27.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-28.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-28.jpg deleted file mode 100644 index f177816..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-28.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-29.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-29.jpg deleted file mode 100644 index 2dba8ee..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-29.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-30.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-30.jpg deleted file mode 100644 index 505b0c4..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-30.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-31.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-31.jpg deleted file mode 100644 index c1a04ee..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-31.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-32.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-32.jpg deleted file mode 100644 index c0b46f4..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-32.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-33.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-33.jpg deleted file mode 100644 index dd7c5ba..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-33.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-34.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-34.jpg deleted file mode 100644 index 3597005..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-34.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-35.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-35.jpg deleted file mode 100644 index 065d9dd..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-35.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-36.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-36.jpg deleted file mode 100644 index 00d1aa7..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-36.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-37.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-37.jpg deleted file mode 100644 index 8585bd8..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-37.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-38.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-38.jpg deleted file mode 100644 index 3d5ee8d..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-38.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-39.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-39.jpg deleted file mode 100644 index c544669..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-39.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-40.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-40.jpg deleted file mode 100644 index e20e9e2..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-40.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-41.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-41.jpg deleted file mode 100644 index 6e4f35b..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-41.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-42.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-42.jpg deleted file mode 100644 index 6932314..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-42.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-43.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-43.jpg deleted file mode 100644 index 8d045a4..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-43.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-44.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-44.jpg deleted file mode 100644 index 9ee2c7c..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-44.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-45.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-45.jpg deleted file mode 100644 index 43a9fe1..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-45.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-46.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-46.jpg deleted file mode 100644 index e60fc79..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-46.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-47.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-47.jpg deleted file mode 100644 index f06abbb..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-47.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-48.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-48.jpg deleted file mode 100644 index 9cb7279..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-48.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-49.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-49.jpg deleted file mode 100644 index 5bddb9a..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-49.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-50.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-50.jpg deleted file mode 100644 index 2e5aaa8..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-50.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-51.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-51.jpg deleted file mode 100644 index a622cbb..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-51.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-52.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-52.jpg deleted file mode 100644 index 1c9923a..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-52.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-53.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-53.jpg deleted file mode 100644 index c698afa..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-53.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-54.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-54.jpg deleted file mode 100644 index f7ff9e6..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-54.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-55.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-55.jpg deleted file mode 100644 index cabd6f7..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-55.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-56.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-56.jpg deleted file mode 100644 index b00ed25..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-56.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-57.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-57.jpg deleted file mode 100644 index c112077..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-57.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-58.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-58.jpg deleted file mode 100644 index d5b6db7..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-58.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-59.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-59.jpg deleted file mode 100644 index 8be2311..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-59.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-60.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-60.jpg deleted file mode 100644 index dbe8518..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-60.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-61.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-61.jpg deleted file mode 100644 index 298e63f..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-61.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-62.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-62.jpg deleted file mode 100644 index 40f1361..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-62.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-63.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-63.jpg deleted file mode 100644 index 02e510d..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-63.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-64.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-64.jpg deleted file mode 100644 index c7bc858..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-64.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-65.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-65.jpg deleted file mode 100644 index c6d9535..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-65.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-66.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-66.jpg deleted file mode 100644 index 10d9032..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-66.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-67.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-67.jpg deleted file mode 100644 index 80d2dd3..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-67.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-68.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-68.jpg deleted file mode 100644 index 6ac589d..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-68.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-69.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-69.jpg deleted file mode 100644 index ef53e00..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-69.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-70.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-70.jpg deleted file mode 100644 index 148410f..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-70.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-71.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-71.jpg deleted file mode 100644 index 973854b..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-71.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-72.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-72.jpg deleted file mode 100644 index b632cc9..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-72.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-73.jpg b/Vision-Rat-Brain-F/atlas_swanson/Level-73.jpg deleted file mode 100644 index f55f4f4..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson/Level-73.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson_regions/Level-34-Region.jpg b/Vision-Rat-Brain-F/atlas_swanson_regions/Level-34-Region.jpg deleted file mode 100644 index 8dc6681..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson_regions/Level-34-Region.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson_regions/Level-38-Region.jpg b/Vision-Rat-Brain-F/atlas_swanson_regions/Level-38-Region.jpg deleted file mode 100644 index 0effee3..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson_regions/Level-38-Region.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/atlas_swanson_regions/Level-44-Region.jpg b/Vision-Rat-Brain-F/atlas_swanson_regions/Level-44-Region.jpg deleted file mode 100644 index 5f50f84..0000000 Binary files a/Vision-Rat-Brain-F/atlas_swanson_regions/Level-44-Region.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/data/clip.png b/Vision-Rat-Brain-F/data/clip.png deleted file mode 100644 index cfa7f60..0000000 Binary files a/Vision-Rat-Brain-F/data/clip.png and /dev/null differ diff --git a/Vision-Rat-Brain-F/data/example1.png b/Vision-Rat-Brain-F/data/example1.png deleted file mode 100644 index 2f8c5f2..0000000 Binary files a/Vision-Rat-Brain-F/data/example1.png and /dev/null differ diff --git a/Vision-Rat-Brain-F/data/example2.png b/Vision-Rat-Brain-F/data/example2.png deleted file mode 100644 index 2d264f8..0000000 Binary files a/Vision-Rat-Brain-F/data/example2.png and /dev/null differ diff --git a/Vision-Rat-Brain-F/data/example3.png b/Vision-Rat-Brain-F/data/example3.png deleted file mode 100644 index ffbb6fe..0000000 Binary files a/Vision-Rat-Brain-F/data/example3.png and /dev/null differ diff --git a/Vision-Rat-Brain-F/data/face.jpg b/Vision-Rat-Brain-F/data/face.jpg deleted file mode 100644 index a3c8d68..0000000 Binary files a/Vision-Rat-Brain-F/data/face.jpg and /dev/null differ diff --git a/Vision-Rat-Brain-F/data/filmstrip.png b/Vision-Rat-Brain-F/data/filmstrip.png deleted file mode 100644 index f5be6dc..0000000 Binary files a/Vision-Rat-Brain-F/data/filmstrip.png and /dev/null differ diff --git a/Vision-Rat-Brain-F/data/qrangeslider.ui b/Vision-Rat-Brain-F/data/qrangeslider.ui deleted file mode 100644 index a449a51..0000000 --- a/Vision-Rat-Brain-F/data/qrangeslider.ui +++ /dev/null @@ -1,84 +0,0 @@ - - - Form - - - - 0 - 0 - 500 - 16 - - - - Form - - - QGroupBox { - background: #111; /*qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #111, stop:1 #333);*/ - border: 0px; - padding: 0px; -} -#_handle { - border: 0px; - background: #393; /*qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #4a4, stop:1 #151);*/ -} -QSplitter::handle { - border: 0px solid #5c5c5c; - background: #393; /*qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #4a4, stop:1 #151);*/ -} -QSplitter::handle:vertical { - height: 4px; -} -QSplitter::handle:pressed { - background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #ccaa45, stop:1 #886623); -} - - - - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - Qt::Horizontal - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Vision-Rat-Brain-F/data/sin.png b/Vision-Rat-Brain-F/data/sin.png deleted file mode 100644 index b0a019d..0000000 Binary files a/Vision-Rat-Brain-F/data/sin.png and /dev/null differ diff --git a/Vision-Rat-Brain-F/new.png b/Vision-Rat-Brain-F/new.png deleted file mode 100644 index 612984c..0000000 Binary files a/Vision-Rat-Brain-F/new.png and /dev/null differ diff --git a/Vision-Rat-Brain-F/region.png b/Vision-Rat-Brain-F/region.png deleted file mode 100644 index bc5369a..0000000 Binary files a/Vision-Rat-Brain-F/region.png and /dev/null differ diff --git a/Vision-Rat-Brain-F/results/Warp_Results.xlsx b/Vision-Rat-Brain-F/results/Warp_Results.xlsx deleted file mode 100644 index 6b320c2..0000000 Binary files a/Vision-Rat-Brain-F/results/Warp_Results.xlsx and /dev/null differ diff --git a/Vision-Rat-Brain-F/results/csv/Level-34-range2-30pts.csv b/Vision-Rat-Brain-F/results/csv/Level-34-range2-30pts.csv deleted file mode 100644 index 057f700..0000000 --- a/Vision-Rat-Brain-F/results/csv/Level-34-range2-30pts.csv +++ /dev/null @@ -1,21 +0,0 @@ -warp_points,warp_disp,plate,matches,inliers -30,30,34,83,35 -30,31,34,44,14 -30,32,34,26,11 -30,33,69,34,12 -30,34,34,27,10 -30,35,34,26,12 -30,36,34,59,18 -30,37,34,66,21 -30,38,34,52,24 -30,39,34,60,22 -30,40,34,33,12 -30,41,34,34,10 -30,42,34,35,14 -30,43,13,20,14 -30,44,34,36,10 -30,45,20,22,11 -30,46,49,22,10 -30,47,2,24,12 -30,48,58,23,13 -30,49,72,16,9 diff --git a/Vision-Rat-Brain-F/results/csv/level-34-15pts.csv b/Vision-Rat-Brain-F/results/csv/level-34-15pts.csv deleted file mode 100644 index 7cb7356..0000000 --- a/Vision-Rat-Brain-F/results/csv/level-34-15pts.csv +++ /dev/null @@ -1,31 +0,0 @@ -warp_points,warp_disp,plate,matches,inliers -15,0,34,587,577 -15,1,34,422,410 -15,2,34,456,417 -15,3,34,405,392 -15,4,34,369,343 -15,5,34,333,269 -15,6,34,349,293 -15,7,34,337,271 -15,8,34,272,172 -15,9,34,306,155 -15,10,34,232,140 -15,11,34,265,167 -15,12,34,204,101 -15,13,34,154,82 -15,14,34,125,54 -15,15,34,193,93 -15,16,34,139,72 -15,17,34,160,98 -15,18,34,167,88 -15,19,34,109,38 -15,20,34,154,72 -15,21,34,105,65 -15,22,34,96,48 -15,23,34,132,47 -15,24,34,150,87 -15,25,34,58,28 -15,26,34,33,12 -15,27,34,52,15 -15,28,34,82,31 -15,29,34,92,33 diff --git a/Vision-Rat-Brain-F/results/csv/level-34-30pts.csv b/Vision-Rat-Brain-F/results/csv/level-34-30pts.csv deleted file mode 100644 index 0f85fee..0000000 --- a/Vision-Rat-Brain-F/results/csv/level-34-30pts.csv +++ /dev/null @@ -1,31 +0,0 @@ -warp_points,warp_disp,plate,matches,inliers -30,0,34,575,558 -30,1,34,459,431 -30,2,34,398,388 -30,3,34,378,345 -30,4,34,365,253 -30,5,34,296,243 -30,6,34,279,195 -30,7,34,229,135 -30,8,34,217,124 -30,9,34,240,122 -30,10,34,224,121 -30,11,34,109,70 -30,12,34,158,95 -30,13,34,86,36 -30,14,34,131,73 -30,15,34,116,52 -30,16,34,75,33 -30,17,34,68,30 -30,18,34,81,27 -30,19,34,90,41 -30,20,34,48,16 -30,21,34,119,80 -30,22,34,42,23 -30,23,34,68,27 -30,24,3,31,13 -30,25,34,63,43 -30,26,34,25,13 -30,27,34,44,15 -30,28,34,41,15 -30,29,34,54,15 diff --git a/Vision-Rat-Brain-F/sm_regular.npz b/Vision-Rat-Brain-F/sm_regular.npz deleted file mode 100644 index b6225cc..0000000 Binary files a/Vision-Rat-Brain-F/sm_regular.npz and /dev/null differ diff --git a/Vision-Rat-Brain-F/sm_valid.npz b/Vision-Rat-Brain-F/sm_valid.npz deleted file mode 100644 index fee44a6..0000000 Binary files a/Vision-Rat-Brain-F/sm_valid.npz and /dev/null differ diff --git a/atlas_pw.npz b/atlas_pw.npz deleted file mode 100644 index 41cb051..0000000 Binary files a/atlas_pw.npz and /dev/null differ diff --git a/atlas_sw.npz b/atlas_sw.npz deleted file mode 100644 index 520367b..0000000 Binary files a/atlas_sw.npz and /dev/null differ diff --git a/auto_encoder/README.md b/auto_encoder/README.md deleted file mode 100644 index 7ff29ef..0000000 --- a/auto_encoder/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Unsupervised image retrieval - -This code is related to this [blog post](https://medium.com/p/867a671b7e65/edit) on using convolutional denoising -autoencoder for content based image retrieval. - -We use [keras]() machine learning python library and [mnist dataset](http://yann.lecun.com/exdb/mnist/). - diff --git a/auto_encoder/atlas_pw.npz b/auto_encoder/atlas_pw.npz deleted file mode 100644 index 4ae0c9b..0000000 Binary files a/auto_encoder/atlas_pw.npz and /dev/null differ diff --git a/auto_encoder/atlas_sw.npz b/auto_encoder/atlas_sw.npz deleted file mode 100644 index cd47397..0000000 Binary files a/auto_encoder/atlas_sw.npz and /dev/null differ diff --git a/auto_encoder/computed_data/out_distances_10.npy b/auto_encoder/computed_data/out_distances_10.npy deleted file mode 100644 index 1597111..0000000 Binary files a/auto_encoder/computed_data/out_distances_10.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_distances_100.npy b/auto_encoder/computed_data/out_distances_100.npy deleted file mode 100644 index 7fa6959..0000000 Binary files a/auto_encoder/computed_data/out_distances_100.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_distances_1000.npy b/auto_encoder/computed_data/out_distances_1000.npy deleted file mode 100644 index 14e851a..0000000 Binary files a/auto_encoder/computed_data/out_distances_1000.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_distances_10000.npy b/auto_encoder/computed_data/out_distances_10000.npy deleted file mode 100644 index 7cc66ac..0000000 Binary files a/auto_encoder/computed_data/out_distances_10000.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_distances_200.npy b/auto_encoder/computed_data/out_distances_200.npy deleted file mode 100644 index f806d30..0000000 Binary files a/auto_encoder/computed_data/out_distances_200.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_distances_2000.npy b/auto_encoder/computed_data/out_distances_2000.npy deleted file mode 100644 index 11aca6b..0000000 Binary files a/auto_encoder/computed_data/out_distances_2000.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_distances_20000.npy b/auto_encoder/computed_data/out_distances_20000.npy deleted file mode 100644 index f806d30..0000000 Binary files a/auto_encoder/computed_data/out_distances_20000.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_distances_300.npy b/auto_encoder/computed_data/out_distances_300.npy deleted file mode 100644 index 451f88e..0000000 Binary files a/auto_encoder/computed_data/out_distances_300.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_distances_3000.npy b/auto_encoder/computed_data/out_distances_3000.npy deleted file mode 100644 index ca810fc..0000000 Binary files a/auto_encoder/computed_data/out_distances_3000.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_distances_30000.npy b/auto_encoder/computed_data/out_distances_30000.npy deleted file mode 100644 index 2f69110..0000000 Binary files a/auto_encoder/computed_data/out_distances_30000.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_distances_400.npy b/auto_encoder/computed_data/out_distances_400.npy deleted file mode 100644 index fc30f21..0000000 Binary files a/auto_encoder/computed_data/out_distances_400.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_distances_4000.npy b/auto_encoder/computed_data/out_distances_4000.npy deleted file mode 100644 index 742502d..0000000 Binary files a/auto_encoder/computed_data/out_distances_4000.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_distances_40000.npy b/auto_encoder/computed_data/out_distances_40000.npy deleted file mode 100644 index 7605fa0..0000000 Binary files a/auto_encoder/computed_data/out_distances_40000.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_distances_50.npy b/auto_encoder/computed_data/out_distances_50.npy deleted file mode 100644 index 1c5a29c..0000000 Binary files a/auto_encoder/computed_data/out_distances_50.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_distances_500.npy b/auto_encoder/computed_data/out_distances_500.npy deleted file mode 100644 index 25cc96d..0000000 Binary files a/auto_encoder/computed_data/out_distances_500.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_distances_5000.npy b/auto_encoder/computed_data/out_distances_5000.npy deleted file mode 100644 index cd213ec..0000000 Binary files a/auto_encoder/computed_data/out_distances_5000.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_distances_50000.npy b/auto_encoder/computed_data/out_distances_50000.npy deleted file mode 100644 index 11aca6b..0000000 Binary files a/auto_encoder/computed_data/out_distances_50000.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_distances_6000.npy b/auto_encoder/computed_data/out_distances_6000.npy deleted file mode 100644 index 7fa6959..0000000 Binary files a/auto_encoder/computed_data/out_distances_6000.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_distances_60000.npy b/auto_encoder/computed_data/out_distances_60000.npy deleted file mode 100644 index 7605fa0..0000000 Binary files a/auto_encoder/computed_data/out_distances_60000.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_distances_7000.npy b/auto_encoder/computed_data/out_distances_7000.npy deleted file mode 100644 index fc30f21..0000000 Binary files a/auto_encoder/computed_data/out_distances_7000.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_distances_750.npy b/auto_encoder/computed_data/out_distances_750.npy deleted file mode 100644 index fc30f21..0000000 Binary files a/auto_encoder/computed_data/out_distances_750.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_distances_8000.npy b/auto_encoder/computed_data/out_distances_8000.npy deleted file mode 100644 index 25cc96d..0000000 Binary files a/auto_encoder/computed_data/out_distances_8000.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_distances_9000.npy b/auto_encoder/computed_data/out_distances_9000.npy deleted file mode 100644 index 2f69110..0000000 Binary files a/auto_encoder/computed_data/out_distances_9000.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_labels_10.npy b/auto_encoder/computed_data/out_labels_10.npy deleted file mode 100644 index 6dd2af5..0000000 Binary files a/auto_encoder/computed_data/out_labels_10.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_labels_100.npy b/auto_encoder/computed_data/out_labels_100.npy deleted file mode 100644 index 8d49f73..0000000 Binary files a/auto_encoder/computed_data/out_labels_100.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_labels_1000.npy b/auto_encoder/computed_data/out_labels_1000.npy deleted file mode 100644 index ea8dc91..0000000 Binary files a/auto_encoder/computed_data/out_labels_1000.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_labels_10000.npy b/auto_encoder/computed_data/out_labels_10000.npy deleted file mode 100644 index 1d3ca04..0000000 Binary files a/auto_encoder/computed_data/out_labels_10000.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_labels_200.npy b/auto_encoder/computed_data/out_labels_200.npy deleted file mode 100644 index 5e83838..0000000 Binary files a/auto_encoder/computed_data/out_labels_200.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_labels_2000.npy b/auto_encoder/computed_data/out_labels_2000.npy deleted file mode 100644 index bf05a10..0000000 Binary files a/auto_encoder/computed_data/out_labels_2000.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_labels_20000.npy b/auto_encoder/computed_data/out_labels_20000.npy deleted file mode 100644 index 5e83838..0000000 Binary files a/auto_encoder/computed_data/out_labels_20000.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_labels_300.npy b/auto_encoder/computed_data/out_labels_300.npy deleted file mode 100644 index c4c01b5..0000000 Binary files a/auto_encoder/computed_data/out_labels_300.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_labels_3000.npy b/auto_encoder/computed_data/out_labels_3000.npy deleted file mode 100644 index be8e2fc..0000000 Binary files a/auto_encoder/computed_data/out_labels_3000.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_labels_30000.npy b/auto_encoder/computed_data/out_labels_30000.npy deleted file mode 100644 index 4d85244..0000000 Binary files a/auto_encoder/computed_data/out_labels_30000.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_labels_400.npy b/auto_encoder/computed_data/out_labels_400.npy deleted file mode 100644 index d3db7b5..0000000 Binary files a/auto_encoder/computed_data/out_labels_400.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_labels_4000.npy b/auto_encoder/computed_data/out_labels_4000.npy deleted file mode 100644 index 214b77d..0000000 Binary files a/auto_encoder/computed_data/out_labels_4000.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_labels_40000.npy b/auto_encoder/computed_data/out_labels_40000.npy deleted file mode 100644 index ec8f036..0000000 Binary files a/auto_encoder/computed_data/out_labels_40000.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_labels_50.npy b/auto_encoder/computed_data/out_labels_50.npy deleted file mode 100644 index bb46e2e..0000000 Binary files a/auto_encoder/computed_data/out_labels_50.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_labels_500.npy b/auto_encoder/computed_data/out_labels_500.npy deleted file mode 100644 index 87781cf..0000000 Binary files a/auto_encoder/computed_data/out_labels_500.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_labels_5000.npy b/auto_encoder/computed_data/out_labels_5000.npy deleted file mode 100644 index cee77f2..0000000 Binary files a/auto_encoder/computed_data/out_labels_5000.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_labels_50000.npy b/auto_encoder/computed_data/out_labels_50000.npy deleted file mode 100644 index bf05a10..0000000 Binary files a/auto_encoder/computed_data/out_labels_50000.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_labels_6000.npy b/auto_encoder/computed_data/out_labels_6000.npy deleted file mode 100644 index 8d49f73..0000000 Binary files a/auto_encoder/computed_data/out_labels_6000.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_labels_60000.npy b/auto_encoder/computed_data/out_labels_60000.npy deleted file mode 100644 index ec8f036..0000000 Binary files a/auto_encoder/computed_data/out_labels_60000.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_labels_7000.npy b/auto_encoder/computed_data/out_labels_7000.npy deleted file mode 100644 index d3db7b5..0000000 Binary files a/auto_encoder/computed_data/out_labels_7000.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_labels_750.npy b/auto_encoder/computed_data/out_labels_750.npy deleted file mode 100644 index d3db7b5..0000000 Binary files a/auto_encoder/computed_data/out_labels_750.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_labels_8000.npy b/auto_encoder/computed_data/out_labels_8000.npy deleted file mode 100644 index 87781cf..0000000 Binary files a/auto_encoder/computed_data/out_labels_8000.npy and /dev/null differ diff --git a/auto_encoder/computed_data/out_labels_9000.npy b/auto_encoder/computed_data/out_labels_9000.npy deleted file mode 100644 index 4d85244..0000000 Binary files a/auto_encoder/computed_data/out_labels_9000.npy and /dev/null differ diff --git a/auto_encoder/computed_data/scores.npy b/auto_encoder/computed_data/scores.npy deleted file mode 100644 index 57254b9..0000000 Binary files a/auto_encoder/computed_data/scores.npy and /dev/null differ diff --git a/auto_encoder/requirements.txt b/auto_encoder/requirements.txt deleted file mode 100644 index f138007..0000000 --- a/auto_encoder/requirements.txt +++ /dev/null @@ -1,17 +0,0 @@ -bleach==1.5.0 -cycler==0.10.0 -html5lib==0.9999999 -Keras==2.0.8 -Markdown==2.6.9 -matplotlib==2.0.2 -numpy==1.13.1 -protobuf==3.4.0 -pyparsing==2.2.0 -python-dateutil==2.6.1 -pytz==2017.2 -PyYAML==3.12 -scipy==0.19.1 -six==1.10.0 -tensorflow==1.3.0 -tensorflow-tensorboard==0.1.5 -Werkzeug==0.12.2 diff --git a/auto_encoder/results.png b/auto_encoder/results.png deleted file mode 100644 index ccb94a3..0000000 Binary files a/auto_encoder/results.png and /dev/null differ diff --git a/auto_encoder/results1.png b/auto_encoder/results1.png deleted file mode 100644 index e54ac71..0000000 Binary files a/auto_encoder/results1.png and /dev/null differ diff --git a/auto_encoder/test_results/.gitkeep b/auto_encoder/test_results/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/auto_encoder/test_results/plate_1.jpg b/auto_encoder/test_results/plate_1.jpg deleted file mode 100644 index 4a1a22d..0000000 Binary files a/auto_encoder/test_results/plate_1.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_10.jpg b/auto_encoder/test_results/plate_10.jpg deleted file mode 100644 index 841c26b..0000000 Binary files a/auto_encoder/test_results/plate_10.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_100.jpg b/auto_encoder/test_results/plate_100.jpg deleted file mode 100644 index 594b83f..0000000 Binary files a/auto_encoder/test_results/plate_100.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_102.jpg b/auto_encoder/test_results/plate_102.jpg deleted file mode 100644 index 901e188..0000000 Binary files a/auto_encoder/test_results/plate_102.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_104.jpg b/auto_encoder/test_results/plate_104.jpg deleted file mode 100644 index 82f756e..0000000 Binary files a/auto_encoder/test_results/plate_104.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_106.jpg b/auto_encoder/test_results/plate_106.jpg deleted file mode 100644 index 77965cd..0000000 Binary files a/auto_encoder/test_results/plate_106.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_108.jpg b/auto_encoder/test_results/plate_108.jpg deleted file mode 100644 index 875365c..0000000 Binary files a/auto_encoder/test_results/plate_108.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_11.jpg b/auto_encoder/test_results/plate_11.jpg deleted file mode 100644 index 5d4f623..0000000 Binary files a/auto_encoder/test_results/plate_11.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_110.jpg b/auto_encoder/test_results/plate_110.jpg deleted file mode 100644 index 21022e4..0000000 Binary files a/auto_encoder/test_results/plate_110.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_112.jpg b/auto_encoder/test_results/plate_112.jpg deleted file mode 100644 index 4a3695b..0000000 Binary files a/auto_encoder/test_results/plate_112.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_114.jpg b/auto_encoder/test_results/plate_114.jpg deleted file mode 100644 index 8d5a67e..0000000 Binary files a/auto_encoder/test_results/plate_114.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_116.jpg b/auto_encoder/test_results/plate_116.jpg deleted file mode 100644 index 4c41136..0000000 Binary files a/auto_encoder/test_results/plate_116.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_118.jpg b/auto_encoder/test_results/plate_118.jpg deleted file mode 100644 index 9682829..0000000 Binary files a/auto_encoder/test_results/plate_118.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_12.jpg b/auto_encoder/test_results/plate_12.jpg deleted file mode 100644 index 251150e..0000000 Binary files a/auto_encoder/test_results/plate_12.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_120.jpg b/auto_encoder/test_results/plate_120.jpg deleted file mode 100644 index 46276ce..0000000 Binary files a/auto_encoder/test_results/plate_120.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_122.jpg b/auto_encoder/test_results/plate_122.jpg deleted file mode 100644 index d521e1a..0000000 Binary files a/auto_encoder/test_results/plate_122.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_124.jpg b/auto_encoder/test_results/plate_124.jpg deleted file mode 100644 index 82839e3..0000000 Binary files a/auto_encoder/test_results/plate_124.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_126.jpg b/auto_encoder/test_results/plate_126.jpg deleted file mode 100644 index b56a00d..0000000 Binary files a/auto_encoder/test_results/plate_126.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_128.jpg b/auto_encoder/test_results/plate_128.jpg deleted file mode 100644 index 79cc7d0..0000000 Binary files a/auto_encoder/test_results/plate_128.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_13.jpg b/auto_encoder/test_results/plate_13.jpg deleted file mode 100644 index 923f1b5..0000000 Binary files a/auto_encoder/test_results/plate_13.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_130.jpg b/auto_encoder/test_results/plate_130.jpg deleted file mode 100644 index 72d6d7b..0000000 Binary files a/auto_encoder/test_results/plate_130.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_132.jpg b/auto_encoder/test_results/plate_132.jpg deleted file mode 100644 index ffedd16..0000000 Binary files a/auto_encoder/test_results/plate_132.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_134.jpg b/auto_encoder/test_results/plate_134.jpg deleted file mode 100644 index 0103c48..0000000 Binary files a/auto_encoder/test_results/plate_134.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_136.jpg b/auto_encoder/test_results/plate_136.jpg deleted file mode 100644 index cfd175e..0000000 Binary files a/auto_encoder/test_results/plate_136.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_138.jpg b/auto_encoder/test_results/plate_138.jpg deleted file mode 100644 index 72570a5..0000000 Binary files a/auto_encoder/test_results/plate_138.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_14.jpg b/auto_encoder/test_results/plate_14.jpg deleted file mode 100644 index 9ff4754..0000000 Binary files a/auto_encoder/test_results/plate_14.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_140.jpg b/auto_encoder/test_results/plate_140.jpg deleted file mode 100644 index e4e95f7..0000000 Binary files a/auto_encoder/test_results/plate_140.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_142.jpg b/auto_encoder/test_results/plate_142.jpg deleted file mode 100644 index b805d15..0000000 Binary files a/auto_encoder/test_results/plate_142.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_146.jpg b/auto_encoder/test_results/plate_146.jpg deleted file mode 100644 index 8fcf1b0..0000000 Binary files a/auto_encoder/test_results/plate_146.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_148.jpg b/auto_encoder/test_results/plate_148.jpg deleted file mode 100644 index 035b4ae..0000000 Binary files a/auto_encoder/test_results/plate_148.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_150.jpg b/auto_encoder/test_results/plate_150.jpg deleted file mode 100644 index d61a109..0000000 Binary files a/auto_encoder/test_results/plate_150.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_152.jpg b/auto_encoder/test_results/plate_152.jpg deleted file mode 100644 index 7832528..0000000 Binary files a/auto_encoder/test_results/plate_152.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_154.jpg b/auto_encoder/test_results/plate_154.jpg deleted file mode 100644 index d735526..0000000 Binary files a/auto_encoder/test_results/plate_154.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_156.jpg b/auto_encoder/test_results/plate_156.jpg deleted file mode 100644 index 8b1b7ab..0000000 Binary files a/auto_encoder/test_results/plate_156.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_157.jpg b/auto_encoder/test_results/plate_157.jpg deleted file mode 100644 index 906c525..0000000 Binary files a/auto_encoder/test_results/plate_157.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_158.jpg b/auto_encoder/test_results/plate_158.jpg deleted file mode 100644 index 76d6296..0000000 Binary files a/auto_encoder/test_results/plate_158.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_159.jpg b/auto_encoder/test_results/plate_159.jpg deleted file mode 100644 index 1be2dde..0000000 Binary files a/auto_encoder/test_results/plate_159.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_16.jpg b/auto_encoder/test_results/plate_16.jpg deleted file mode 100644 index 56762f9..0000000 Binary files a/auto_encoder/test_results/plate_16.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_160.jpg b/auto_encoder/test_results/plate_160.jpg deleted file mode 100644 index 9998549..0000000 Binary files a/auto_encoder/test_results/plate_160.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_161.jpg b/auto_encoder/test_results/plate_161.jpg deleted file mode 100644 index 15b51a7..0000000 Binary files a/auto_encoder/test_results/plate_161.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_18.jpg b/auto_encoder/test_results/plate_18.jpg deleted file mode 100644 index 1faf800..0000000 Binary files a/auto_encoder/test_results/plate_18.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_2.jpg b/auto_encoder/test_results/plate_2.jpg deleted file mode 100644 index 1ebcd2d..0000000 Binary files a/auto_encoder/test_results/plate_2.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_20.jpg b/auto_encoder/test_results/plate_20.jpg deleted file mode 100644 index e22088f..0000000 Binary files a/auto_encoder/test_results/plate_20.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_24.jpg b/auto_encoder/test_results/plate_24.jpg deleted file mode 100644 index a528b9a..0000000 Binary files a/auto_encoder/test_results/plate_24.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_26.jpg b/auto_encoder/test_results/plate_26.jpg deleted file mode 100644 index 192b396..0000000 Binary files a/auto_encoder/test_results/plate_26.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_28.jpg b/auto_encoder/test_results/plate_28.jpg deleted file mode 100644 index bf5f58f..0000000 Binary files a/auto_encoder/test_results/plate_28.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_3.jpg b/auto_encoder/test_results/plate_3.jpg deleted file mode 100644 index fb2ab0c..0000000 Binary files a/auto_encoder/test_results/plate_3.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_30.jpg b/auto_encoder/test_results/plate_30.jpg deleted file mode 100644 index 563aeb7..0000000 Binary files a/auto_encoder/test_results/plate_30.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_32.jpg b/auto_encoder/test_results/plate_32.jpg deleted file mode 100644 index abb4aa0..0000000 Binary files a/auto_encoder/test_results/plate_32.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_34.jpg b/auto_encoder/test_results/plate_34.jpg deleted file mode 100644 index ba8e226..0000000 Binary files a/auto_encoder/test_results/plate_34.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_36.jpg b/auto_encoder/test_results/plate_36.jpg deleted file mode 100644 index d98ec50..0000000 Binary files a/auto_encoder/test_results/plate_36.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_38.jpg b/auto_encoder/test_results/plate_38.jpg deleted file mode 100644 index f2f5351..0000000 Binary files a/auto_encoder/test_results/plate_38.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_4.jpg b/auto_encoder/test_results/plate_4.jpg deleted file mode 100644 index 01565a3..0000000 Binary files a/auto_encoder/test_results/plate_4.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_40.jpg b/auto_encoder/test_results/plate_40.jpg deleted file mode 100644 index dd773d2..0000000 Binary files a/auto_encoder/test_results/plate_40.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_42.jpg b/auto_encoder/test_results/plate_42.jpg deleted file mode 100644 index 825285f..0000000 Binary files a/auto_encoder/test_results/plate_42.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_44.jpg b/auto_encoder/test_results/plate_44.jpg deleted file mode 100644 index 5f5f8a2..0000000 Binary files a/auto_encoder/test_results/plate_44.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_46.jpg b/auto_encoder/test_results/plate_46.jpg deleted file mode 100644 index 32cc96e..0000000 Binary files a/auto_encoder/test_results/plate_46.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_48.jpg b/auto_encoder/test_results/plate_48.jpg deleted file mode 100644 index e65b1c2..0000000 Binary files a/auto_encoder/test_results/plate_48.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_5.jpg b/auto_encoder/test_results/plate_5.jpg deleted file mode 100644 index 3e36150..0000000 Binary files a/auto_encoder/test_results/plate_5.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_50.jpg b/auto_encoder/test_results/plate_50.jpg deleted file mode 100644 index fd8266a..0000000 Binary files a/auto_encoder/test_results/plate_50.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_52.jpg b/auto_encoder/test_results/plate_52.jpg deleted file mode 100644 index 98fa24e..0000000 Binary files a/auto_encoder/test_results/plate_52.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_54.jpg b/auto_encoder/test_results/plate_54.jpg deleted file mode 100644 index 4cb2cdc..0000000 Binary files a/auto_encoder/test_results/plate_54.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_56.jpg b/auto_encoder/test_results/plate_56.jpg deleted file mode 100644 index f2855c7..0000000 Binary files a/auto_encoder/test_results/plate_56.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_58.jpg b/auto_encoder/test_results/plate_58.jpg deleted file mode 100644 index ac5482f..0000000 Binary files a/auto_encoder/test_results/plate_58.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_6.jpg b/auto_encoder/test_results/plate_6.jpg deleted file mode 100644 index 6727865..0000000 Binary files a/auto_encoder/test_results/plate_6.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_60.jpg b/auto_encoder/test_results/plate_60.jpg deleted file mode 100644 index c70dd05..0000000 Binary files a/auto_encoder/test_results/plate_60.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_62.jpg b/auto_encoder/test_results/plate_62.jpg deleted file mode 100644 index 7f63cf9..0000000 Binary files a/auto_encoder/test_results/plate_62.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_64.jpg b/auto_encoder/test_results/plate_64.jpg deleted file mode 100644 index 2c1ac7c..0000000 Binary files a/auto_encoder/test_results/plate_64.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_66.jpg b/auto_encoder/test_results/plate_66.jpg deleted file mode 100644 index 51be147..0000000 Binary files a/auto_encoder/test_results/plate_66.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_68.jpg b/auto_encoder/test_results/plate_68.jpg deleted file mode 100644 index 8e81144..0000000 Binary files a/auto_encoder/test_results/plate_68.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_69.jpg b/auto_encoder/test_results/plate_69.jpg deleted file mode 100644 index 7d7918a..0000000 Binary files a/auto_encoder/test_results/plate_69.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_7.jpg b/auto_encoder/test_results/plate_7.jpg deleted file mode 100644 index 5875e91..0000000 Binary files a/auto_encoder/test_results/plate_7.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_70.jpg b/auto_encoder/test_results/plate_70.jpg deleted file mode 100644 index 0165d5b..0000000 Binary files a/auto_encoder/test_results/plate_70.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_72.jpg b/auto_encoder/test_results/plate_72.jpg deleted file mode 100644 index 88c1f62..0000000 Binary files a/auto_encoder/test_results/plate_72.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_74.jpg b/auto_encoder/test_results/plate_74.jpg deleted file mode 100644 index ad8889d..0000000 Binary files a/auto_encoder/test_results/plate_74.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_76.jpg b/auto_encoder/test_results/plate_76.jpg deleted file mode 100644 index eb617f4..0000000 Binary files a/auto_encoder/test_results/plate_76.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_78.jpg b/auto_encoder/test_results/plate_78.jpg deleted file mode 100644 index 4935f51..0000000 Binary files a/auto_encoder/test_results/plate_78.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_8.jpg b/auto_encoder/test_results/plate_8.jpg deleted file mode 100644 index 22aaa03..0000000 Binary files a/auto_encoder/test_results/plate_8.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_80.jpg b/auto_encoder/test_results/plate_80.jpg deleted file mode 100644 index 5f61ea8..0000000 Binary files a/auto_encoder/test_results/plate_80.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_82.jpg b/auto_encoder/test_results/plate_82.jpg deleted file mode 100644 index 9a7c72b..0000000 Binary files a/auto_encoder/test_results/plate_82.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_84.jpg b/auto_encoder/test_results/plate_84.jpg deleted file mode 100644 index d03ad04..0000000 Binary files a/auto_encoder/test_results/plate_84.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_86.jpg b/auto_encoder/test_results/plate_86.jpg deleted file mode 100644 index ed00670..0000000 Binary files a/auto_encoder/test_results/plate_86.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_88.jpg b/auto_encoder/test_results/plate_88.jpg deleted file mode 100644 index 97be616..0000000 Binary files a/auto_encoder/test_results/plate_88.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_9.jpg b/auto_encoder/test_results/plate_9.jpg deleted file mode 100644 index 19c1a0a..0000000 Binary files a/auto_encoder/test_results/plate_9.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_90.jpg b/auto_encoder/test_results/plate_90.jpg deleted file mode 100644 index 1f30a9c..0000000 Binary files a/auto_encoder/test_results/plate_90.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_92.jpg b/auto_encoder/test_results/plate_92.jpg deleted file mode 100644 index 287eb1b..0000000 Binary files a/auto_encoder/test_results/plate_92.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_94.jpg b/auto_encoder/test_results/plate_94.jpg deleted file mode 100644 index f3b1aac..0000000 Binary files a/auto_encoder/test_results/plate_94.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_96.jpg b/auto_encoder/test_results/plate_96.jpg deleted file mode 100644 index 7fdfb91..0000000 Binary files a/auto_encoder/test_results/plate_96.jpg and /dev/null differ diff --git a/auto_encoder/test_results/plate_98.jpg b/auto_encoder/test_results/plate_98.jpg deleted file mode 100644 index 56d53c3..0000000 Binary files a/auto_encoder/test_results/plate_98.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results1.jpg b/auto_encoder/test_results/results1.jpg deleted file mode 100644 index aefea0d..0000000 Binary files a/auto_encoder/test_results/results1.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results10.jpg b/auto_encoder/test_results/results10.jpg deleted file mode 100644 index a3b9ca1..0000000 Binary files a/auto_encoder/test_results/results10.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results100.jpg b/auto_encoder/test_results/results100.jpg deleted file mode 100644 index 4cebbe4..0000000 Binary files a/auto_encoder/test_results/results100.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results102.jpg b/auto_encoder/test_results/results102.jpg deleted file mode 100644 index ccb0fd9..0000000 Binary files a/auto_encoder/test_results/results102.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results104.jpg b/auto_encoder/test_results/results104.jpg deleted file mode 100644 index 77029c7..0000000 Binary files a/auto_encoder/test_results/results104.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results106.jpg b/auto_encoder/test_results/results106.jpg deleted file mode 100644 index e854809..0000000 Binary files a/auto_encoder/test_results/results106.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results108.jpg b/auto_encoder/test_results/results108.jpg deleted file mode 100644 index 6e9aeba..0000000 Binary files a/auto_encoder/test_results/results108.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results11.jpg b/auto_encoder/test_results/results11.jpg deleted file mode 100644 index 88d4d1c..0000000 Binary files a/auto_encoder/test_results/results11.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results110.jpg b/auto_encoder/test_results/results110.jpg deleted file mode 100644 index cc75905..0000000 Binary files a/auto_encoder/test_results/results110.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results112.jpg b/auto_encoder/test_results/results112.jpg deleted file mode 100644 index 5a7a14d..0000000 Binary files a/auto_encoder/test_results/results112.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results114.jpg b/auto_encoder/test_results/results114.jpg deleted file mode 100644 index db3e1ae..0000000 Binary files a/auto_encoder/test_results/results114.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results116.jpg b/auto_encoder/test_results/results116.jpg deleted file mode 100644 index 9633bc4..0000000 Binary files a/auto_encoder/test_results/results116.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results118.jpg b/auto_encoder/test_results/results118.jpg deleted file mode 100644 index d1f18c4..0000000 Binary files a/auto_encoder/test_results/results118.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results12.jpg b/auto_encoder/test_results/results12.jpg deleted file mode 100644 index 39a7ba5..0000000 Binary files a/auto_encoder/test_results/results12.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results120.jpg b/auto_encoder/test_results/results120.jpg deleted file mode 100644 index 5d9b42f..0000000 Binary files a/auto_encoder/test_results/results120.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results122.jpg b/auto_encoder/test_results/results122.jpg deleted file mode 100644 index b69dea4..0000000 Binary files a/auto_encoder/test_results/results122.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results124.jpg b/auto_encoder/test_results/results124.jpg deleted file mode 100644 index 76e2c86..0000000 Binary files a/auto_encoder/test_results/results124.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results126.jpg b/auto_encoder/test_results/results126.jpg deleted file mode 100644 index df0b0d0..0000000 Binary files a/auto_encoder/test_results/results126.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results128.jpg b/auto_encoder/test_results/results128.jpg deleted file mode 100644 index 3f5d77c..0000000 Binary files a/auto_encoder/test_results/results128.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results13.jpg b/auto_encoder/test_results/results13.jpg deleted file mode 100644 index ac09dde..0000000 Binary files a/auto_encoder/test_results/results13.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results130.jpg b/auto_encoder/test_results/results130.jpg deleted file mode 100644 index 155795e..0000000 Binary files a/auto_encoder/test_results/results130.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results132.jpg b/auto_encoder/test_results/results132.jpg deleted file mode 100644 index 48513be..0000000 Binary files a/auto_encoder/test_results/results132.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results134.jpg b/auto_encoder/test_results/results134.jpg deleted file mode 100644 index e46b697..0000000 Binary files a/auto_encoder/test_results/results134.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results136.jpg b/auto_encoder/test_results/results136.jpg deleted file mode 100644 index aef9d13..0000000 Binary files a/auto_encoder/test_results/results136.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results138.jpg b/auto_encoder/test_results/results138.jpg deleted file mode 100644 index e880b5b..0000000 Binary files a/auto_encoder/test_results/results138.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results14.jpg b/auto_encoder/test_results/results14.jpg deleted file mode 100644 index 99082a5..0000000 Binary files a/auto_encoder/test_results/results14.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results140.jpg b/auto_encoder/test_results/results140.jpg deleted file mode 100644 index 2eeaac7..0000000 Binary files a/auto_encoder/test_results/results140.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results142.jpg b/auto_encoder/test_results/results142.jpg deleted file mode 100644 index 5536e33..0000000 Binary files a/auto_encoder/test_results/results142.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results146.jpg b/auto_encoder/test_results/results146.jpg deleted file mode 100644 index eace93a..0000000 Binary files a/auto_encoder/test_results/results146.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results148.jpg b/auto_encoder/test_results/results148.jpg deleted file mode 100644 index a6d7359..0000000 Binary files a/auto_encoder/test_results/results148.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results150.jpg b/auto_encoder/test_results/results150.jpg deleted file mode 100644 index ea64ab0..0000000 Binary files a/auto_encoder/test_results/results150.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results152.jpg b/auto_encoder/test_results/results152.jpg deleted file mode 100644 index b1a9c7b..0000000 Binary files a/auto_encoder/test_results/results152.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results154.jpg b/auto_encoder/test_results/results154.jpg deleted file mode 100644 index 444e430..0000000 Binary files a/auto_encoder/test_results/results154.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results156.jpg b/auto_encoder/test_results/results156.jpg deleted file mode 100644 index 6cb2c84..0000000 Binary files a/auto_encoder/test_results/results156.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results157.jpg b/auto_encoder/test_results/results157.jpg deleted file mode 100644 index 3b105ed..0000000 Binary files a/auto_encoder/test_results/results157.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results158.jpg b/auto_encoder/test_results/results158.jpg deleted file mode 100644 index d88d61f..0000000 Binary files a/auto_encoder/test_results/results158.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results159.jpg b/auto_encoder/test_results/results159.jpg deleted file mode 100644 index 7bbb6c2..0000000 Binary files a/auto_encoder/test_results/results159.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results16.jpg b/auto_encoder/test_results/results16.jpg deleted file mode 100644 index 917d396..0000000 Binary files a/auto_encoder/test_results/results16.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results160.jpg b/auto_encoder/test_results/results160.jpg deleted file mode 100644 index a6d3d36..0000000 Binary files a/auto_encoder/test_results/results160.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results161.jpg b/auto_encoder/test_results/results161.jpg deleted file mode 100644 index 7fbf06f..0000000 Binary files a/auto_encoder/test_results/results161.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results18.jpg b/auto_encoder/test_results/results18.jpg deleted file mode 100644 index 298976a..0000000 Binary files a/auto_encoder/test_results/results18.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results2.jpg b/auto_encoder/test_results/results2.jpg deleted file mode 100644 index 6214a2a..0000000 Binary files a/auto_encoder/test_results/results2.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results20.jpg b/auto_encoder/test_results/results20.jpg deleted file mode 100644 index 2d126e2..0000000 Binary files a/auto_encoder/test_results/results20.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results24.jpg b/auto_encoder/test_results/results24.jpg deleted file mode 100644 index 7bbb0f3..0000000 Binary files a/auto_encoder/test_results/results24.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results26.jpg b/auto_encoder/test_results/results26.jpg deleted file mode 100644 index 39ece57..0000000 Binary files a/auto_encoder/test_results/results26.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results28.jpg b/auto_encoder/test_results/results28.jpg deleted file mode 100644 index 81ed746..0000000 Binary files a/auto_encoder/test_results/results28.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results3.jpg b/auto_encoder/test_results/results3.jpg deleted file mode 100644 index 58405c2..0000000 Binary files a/auto_encoder/test_results/results3.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results30.jpg b/auto_encoder/test_results/results30.jpg deleted file mode 100644 index a03d5c3..0000000 Binary files a/auto_encoder/test_results/results30.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results32.jpg b/auto_encoder/test_results/results32.jpg deleted file mode 100644 index 61e0198..0000000 Binary files a/auto_encoder/test_results/results32.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results34.jpg b/auto_encoder/test_results/results34.jpg deleted file mode 100644 index 079c7bf..0000000 Binary files a/auto_encoder/test_results/results34.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results36.jpg b/auto_encoder/test_results/results36.jpg deleted file mode 100644 index 0098239..0000000 Binary files a/auto_encoder/test_results/results36.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results38.jpg b/auto_encoder/test_results/results38.jpg deleted file mode 100644 index 8addd94..0000000 Binary files a/auto_encoder/test_results/results38.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results4.jpg b/auto_encoder/test_results/results4.jpg deleted file mode 100644 index 73d7919..0000000 Binary files a/auto_encoder/test_results/results4.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results40.jpg b/auto_encoder/test_results/results40.jpg deleted file mode 100644 index ca47b5f..0000000 Binary files a/auto_encoder/test_results/results40.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results42.jpg b/auto_encoder/test_results/results42.jpg deleted file mode 100644 index 85f7ff4..0000000 Binary files a/auto_encoder/test_results/results42.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results44.jpg b/auto_encoder/test_results/results44.jpg deleted file mode 100644 index 5985ffd..0000000 Binary files a/auto_encoder/test_results/results44.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results46.jpg b/auto_encoder/test_results/results46.jpg deleted file mode 100644 index 2b199a0..0000000 Binary files a/auto_encoder/test_results/results46.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results48.jpg b/auto_encoder/test_results/results48.jpg deleted file mode 100644 index ef79bfb..0000000 Binary files a/auto_encoder/test_results/results48.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results5.jpg b/auto_encoder/test_results/results5.jpg deleted file mode 100644 index 4df9e0f..0000000 Binary files a/auto_encoder/test_results/results5.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results50.jpg b/auto_encoder/test_results/results50.jpg deleted file mode 100644 index ec098fc..0000000 Binary files a/auto_encoder/test_results/results50.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results52.jpg b/auto_encoder/test_results/results52.jpg deleted file mode 100644 index b87faa9..0000000 Binary files a/auto_encoder/test_results/results52.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results54.jpg b/auto_encoder/test_results/results54.jpg deleted file mode 100644 index d72c49f..0000000 Binary files a/auto_encoder/test_results/results54.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results56.jpg b/auto_encoder/test_results/results56.jpg deleted file mode 100644 index 7c10bc2..0000000 Binary files a/auto_encoder/test_results/results56.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results58.jpg b/auto_encoder/test_results/results58.jpg deleted file mode 100644 index 71e7c09..0000000 Binary files a/auto_encoder/test_results/results58.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results6.jpg b/auto_encoder/test_results/results6.jpg deleted file mode 100644 index 2870fd2..0000000 Binary files a/auto_encoder/test_results/results6.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results60.jpg b/auto_encoder/test_results/results60.jpg deleted file mode 100644 index 2924524..0000000 Binary files a/auto_encoder/test_results/results60.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results62.jpg b/auto_encoder/test_results/results62.jpg deleted file mode 100644 index f0a0f59..0000000 Binary files a/auto_encoder/test_results/results62.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results64.jpg b/auto_encoder/test_results/results64.jpg deleted file mode 100644 index 9397c43..0000000 Binary files a/auto_encoder/test_results/results64.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results66.jpg b/auto_encoder/test_results/results66.jpg deleted file mode 100644 index 729326a..0000000 Binary files a/auto_encoder/test_results/results66.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results68.jpg b/auto_encoder/test_results/results68.jpg deleted file mode 100644 index 4459d48..0000000 Binary files a/auto_encoder/test_results/results68.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results69.jpg b/auto_encoder/test_results/results69.jpg deleted file mode 100644 index 1f907bb..0000000 Binary files a/auto_encoder/test_results/results69.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results7.jpg b/auto_encoder/test_results/results7.jpg deleted file mode 100644 index dff24fe..0000000 Binary files a/auto_encoder/test_results/results7.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results70.jpg b/auto_encoder/test_results/results70.jpg deleted file mode 100644 index f86961d..0000000 Binary files a/auto_encoder/test_results/results70.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results72.jpg b/auto_encoder/test_results/results72.jpg deleted file mode 100644 index a09e1fe..0000000 Binary files a/auto_encoder/test_results/results72.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results74.jpg b/auto_encoder/test_results/results74.jpg deleted file mode 100644 index d9cbe1e..0000000 Binary files a/auto_encoder/test_results/results74.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results76.jpg b/auto_encoder/test_results/results76.jpg deleted file mode 100644 index e7e44e8..0000000 Binary files a/auto_encoder/test_results/results76.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results78.jpg b/auto_encoder/test_results/results78.jpg deleted file mode 100644 index 617ae9f..0000000 Binary files a/auto_encoder/test_results/results78.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results8.jpg b/auto_encoder/test_results/results8.jpg deleted file mode 100644 index e91752d..0000000 Binary files a/auto_encoder/test_results/results8.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results80.jpg b/auto_encoder/test_results/results80.jpg deleted file mode 100644 index 146e680..0000000 Binary files a/auto_encoder/test_results/results80.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results82.jpg b/auto_encoder/test_results/results82.jpg deleted file mode 100644 index 076063a..0000000 Binary files a/auto_encoder/test_results/results82.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results84.jpg b/auto_encoder/test_results/results84.jpg deleted file mode 100644 index a236abc..0000000 Binary files a/auto_encoder/test_results/results84.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results86.jpg b/auto_encoder/test_results/results86.jpg deleted file mode 100644 index 865346d..0000000 Binary files a/auto_encoder/test_results/results86.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results88.jpg b/auto_encoder/test_results/results88.jpg deleted file mode 100644 index 0f3c737..0000000 Binary files a/auto_encoder/test_results/results88.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results9.jpg b/auto_encoder/test_results/results9.jpg deleted file mode 100644 index cb154f5..0000000 Binary files a/auto_encoder/test_results/results9.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results90.jpg b/auto_encoder/test_results/results90.jpg deleted file mode 100644 index ced4c22..0000000 Binary files a/auto_encoder/test_results/results90.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results92.jpg b/auto_encoder/test_results/results92.jpg deleted file mode 100644 index 7da1f84..0000000 Binary files a/auto_encoder/test_results/results92.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results94.jpg b/auto_encoder/test_results/results94.jpg deleted file mode 100644 index db7c8a8..0000000 Binary files a/auto_encoder/test_results/results94.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results96.jpg b/auto_encoder/test_results/results96.jpg deleted file mode 100644 index 052e7b2..0000000 Binary files a/auto_encoder/test_results/results96.jpg and /dev/null differ diff --git a/auto_encoder/test_results/results98.jpg b/auto_encoder/test_results/results98.jpg deleted file mode 100644 index d143309..0000000 Binary files a/auto_encoder/test_results/results98.jpg and /dev/null differ diff --git a/dataset/.gitignore b/dataset/.gitignore new file mode 100644 index 0000000..fca3e5c --- /dev/null +++ b/dataset/.gitignore @@ -0,0 +1,109 @@ +# Raw images +atlas_sw/ +atlas_s/ +atlas_pw/ +atlas_testing/ +*.png +*.jpg + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# dotenv +.env + +# virtualenv +.venv +venv/ +ENV/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ diff --git a/dataset/bounding.py b/dataset/bounding.py new file mode 100644 index 0000000..5207732 --- /dev/null +++ b/dataset/bounding.py @@ -0,0 +1,80 @@ +# Author: Jose G Perez +# Version: 1.2 +# Last Modified: Jan 31st, 2018 +from timeit import default_timer as timer +from PIL import Image +import numpy as np +import os + +WIDTH = 240 +HEIGHT = 300 +WHITE_THRESHOLD = 235 + + +def process_plate(filename, split=False): + im = Image.open(filename).convert("L") + + # Split in half if required + if split: + box = (0, 0, im.width // 2, im.height) + crop = im.crop(box) + crop.load() + im = crop + + im = im.resize((WIDTH, HEIGHT), Image.LANCZOS) + im = np.array(im, dtype=np.uint8) + + # Convert values very close to white to white for cropping + im[im >= WHITE_THRESHOLD] = 255 + + # Bounding box cropping + # https://stackoverflow.com/questions/9396312/use-python-pil-or-similar-to-shrink-whitespace + idx = np.where(im - 255) + box = list(map(min, idx))[::-1] + list(map(max, idx))[::-1] + region = Image.fromarray(im).crop(box) + region = region.resize((WIDTH, HEIGHT), Image.LANCZOS) + im_cropped = np.array(region, dtype=np.uint8) + + return im, im_cropped + + +def process_atlas(folder, prefix, ext, zfill, plate_min, plate_max, split): + atlas_im = [] + atlas_label = [] + atlas_original = [] + print('[', end='', flush=True) + for plate in range(plate_min, plate_max+1): + filename = prefix + str(plate).zfill(zfill) + ext + filename = os.path.join(folder, filename) + + print(plate, ',', end='', flush=True) + if not os.path.exists(filename): + print("Couldn't find ", filename, ", skipping") + continue + + im, im_cropped = process_plate(filename, split) + + atlas_im.append(im_cropped) + atlas_label.append(plate) + atlas_original.append(im) + + print(']\n', end='', flush=True) + return np.asarray(atlas_im), np.asarray(atlas_label), np.asarray(atlas_original) + + +if __name__ == '__main__': + print("===== Starting timer") + time_start = timer() + + print("Processing S...") + s_im, s_label, s_original = process_atlas('atlas_s', 'Level-', '.jpg', 2, 1, 73, False) + + print("Processing PW...") + pw_im, pw_label, pw_original = process_atlas('atlas_pw', 'RBSC7-', '.jpg', 3, 1, 161, True) + + print("Saving...") + np.savez_compressed('S_BB_V', images=s_im, labels=s_label, originals=s_original) + np.savez_compressed('PW_BB_V', images=pw_im, labels=pw_label, originals=pw_original) + + duration = timer() - time_start + print("Program took %.3fs" % duration) \ No newline at end of file diff --git a/dataset/fetch_swanson_atlas.py b/dataset/fetch_swanson_atlas.py new file mode 100644 index 0000000..49ba05a --- /dev/null +++ b/dataset/fetch_swanson_atlas.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +import urllib2 + +# Swanson's 3rd edition brain map atlas +complete_url = "http://larrywswanson.com/wp-content/uploads/2015/03/Complete-Atlas-Level-" +map_url = "http://larrywswanson.com/wp-content/uploads/2015/03/Map-only-Atlas-Level-" +ext = ".pdf" + +def fetch_atlas_level(level): + fetch_website(complete_url + str(level).zfill(2) + ext) + #fetch_website(map_url + str(level).zfill(2) + ext) + +def fetch_website(url): + file_name = url.split('/')[-1] + u = urllib2.urlopen(url) + f = open(file_name, 'wb') + meta = u.info() + file_size = int(meta.getheaders("Content-Length")[0]) + print("Downloading: %s Bytes: %s" % (file_name, file_size)) + + file_size_dl = 0 + block_sz = 8192 + while True: + buffer = u.read(block_sz) + if not buffer: + break + + file_size_dl += len(buffer) + f.write(buffer) + status = r"%10d [%3.2f%%]" % (file_size_dl, file_size_dl * 100. / file_size) + status = status + chr(8)*(len(status)+1) + print(status) + + print("\n") + f.close() + +# ---=== Main +print("Starting fetching script") + +for i in range(1, 74): + fetch_atlas_level(i) \ No newline at end of file diff --git a/dataset/viewer.py b/dataset/viewer.py new file mode 100644 index 0000000..acf46ac --- /dev/null +++ b/dataset/viewer.py @@ -0,0 +1,13 @@ +import numpy as np +import pylab as plt + +s_data = np.load('S_BB_V.npz') +s_im = s_data['images'] +s_label = s_data['labels'] +s_orig = s_data['originals'] + +pw_data = np.load('PW_BB_V.npz') +pw_im = pw_data['images'] +pw_label = pw_data['labels'] +pw_orig = pw_data['originals'] + diff --git a/Vision-Rat-Brain-F/.gitignore b/feature_matching_v1/.gitignore similarity index 97% rename from Vision-Rat-Brain-F/.gitignore rename to feature_matching_v1/.gitignore index 058e3f3..c200ba2 100644 --- a/Vision-Rat-Brain-F/.gitignore +++ b/feature_matching_v1/.gitignore @@ -10,6 +10,9 @@ atlas_swanson_pdf/ # Testing images part.* +# Similarity matrix npz +*-M.npz + # Spyder *.spyproject/ diff --git a/Vision-Rat-Brain-F/LICENSE.txt b/feature_matching_v1/LICENSE.txt similarity index 100% rename from Vision-Rat-Brain-F/LICENSE.txt rename to feature_matching_v1/LICENSE.txt diff --git a/Vision-Rat-Brain-F/clean.sh b/feature_matching_v1/clean.sh similarity index 100% rename from Vision-Rat-Brain-F/clean.sh rename to feature_matching_v1/clean.sh diff --git a/Vision-Rat-Brain-F/config.py b/feature_matching_v1/config.py similarity index 100% rename from Vision-Rat-Brain-F/config.py rename to feature_matching_v1/config.py diff --git a/Vision-Rat-Brain-F/dialog.py b/feature_matching_v1/dialog.py similarity index 100% rename from Vision-Rat-Brain-F/dialog.py rename to feature_matching_v1/dialog.py diff --git a/Vision-Rat-Brain-F/feature.py b/feature_matching_v1/feature.py similarity index 100% rename from Vision-Rat-Brain-F/feature.py rename to feature_matching_v1/feature.py diff --git a/Vision-Rat-Brain-F/graph.py b/feature_matching_v1/graph.py similarity index 100% rename from Vision-Rat-Brain-F/graph.py rename to feature_matching_v1/graph.py diff --git a/Vision-Rat-Brain-F/prototype.py b/feature_matching_v1/prototype.py similarity index 100% rename from Vision-Rat-Brain-F/prototype.py rename to feature_matching_v1/prototype.py diff --git a/Vision-Rat-Brain-F/pw.py b/feature_matching_v1/pw.py similarity index 100% rename from Vision-Rat-Brain-F/pw.py rename to feature_matching_v1/pw.py diff --git a/Vision-Rat-Brain-F/qrangeslider.py b/feature_matching_v1/qrangeslider.py similarity index 100% rename from Vision-Rat-Brain-F/qrangeslider.py rename to feature_matching_v1/qrangeslider.py diff --git a/Vision-Rat-Brain-F/scripts_batch_processing/batch_warp.py b/feature_matching_v1/scripts_batch_processing/batch_warp.py similarity index 100% rename from Vision-Rat-Brain-F/scripts_batch_processing/batch_warp.py rename to feature_matching_v1/scripts_batch_processing/batch_warp.py diff --git a/Vision-Rat-Brain-F/scripts_batch_processing/fetch_atlas.py b/feature_matching_v1/scripts_batch_processing/fetch_atlas.py similarity index 100% rename from Vision-Rat-Brain-F/scripts_batch_processing/fetch_atlas.py rename to feature_matching_v1/scripts_batch_processing/fetch_atlas.py diff --git a/Vision-Rat-Brain-F/scripts_testing/plate-34.jpg b/feature_matching_v1/scripts_testing/plate-34.jpg similarity index 100% rename from Vision-Rat-Brain-F/scripts_testing/plate-34.jpg rename to feature_matching_v1/scripts_testing/plate-34.jpg diff --git a/Vision-Rat-Brain-F/scripts_testing/plate-70.jpg b/feature_matching_v1/scripts_testing/plate-70.jpg similarity index 100% rename from Vision-Rat-Brain-F/scripts_testing/plate-70.jpg rename to feature_matching_v1/scripts_testing/plate-70.jpg diff --git a/Vision-Rat-Brain-F/scripts_testing/region-34.jpg b/feature_matching_v1/scripts_testing/region-34.jpg similarity index 100% rename from Vision-Rat-Brain-F/scripts_testing/region-34.jpg rename to feature_matching_v1/scripts_testing/region-34.jpg diff --git a/Vision-Rat-Brain-F/scripts_testing/region-70-hq.jpg b/feature_matching_v1/scripts_testing/region-70-hq.jpg similarity index 100% rename from Vision-Rat-Brain-F/scripts_testing/region-70-hq.jpg rename to feature_matching_v1/scripts_testing/region-70-hq.jpg diff --git a/Vision-Rat-Brain-F/scripts_testing/region-70.jpg b/feature_matching_v1/scripts_testing/region-70.jpg similarity index 100% rename from Vision-Rat-Brain-F/scripts_testing/region-70.jpg rename to feature_matching_v1/scripts_testing/region-70.jpg diff --git a/Vision-Rat-Brain-F/similarity.py b/feature_matching_v1/similarity.py similarity index 100% rename from Vision-Rat-Brain-F/similarity.py rename to feature_matching_v1/similarity.py diff --git a/Vision-Rat-Brain-F/sm.npz b/feature_matching_v1/sm.npz similarity index 100% rename from Vision-Rat-Brain-F/sm.npz rename to feature_matching_v1/sm.npz diff --git a/Vision-Rat-Brain-F/testing.py b/feature_matching_v1/testing.py similarity index 100% rename from Vision-Rat-Brain-F/testing.py rename to feature_matching_v1/testing.py diff --git a/Vision-Rat-Brain-F/thread.py b/feature_matching_v1/thread.py similarity index 100% rename from Vision-Rat-Brain-F/thread.py rename to feature_matching_v1/thread.py diff --git a/Vision-Rat-Brain-F/timing.py b/feature_matching_v1/timing.py similarity index 100% rename from Vision-Rat-Brain-F/timing.py rename to feature_matching_v1/timing.py diff --git a/feature_matching/LICENSE.txt b/feature_matching_v2/LICENSE.txt similarity index 100% rename from feature_matching/LICENSE.txt rename to feature_matching_v2/LICENSE.txt diff --git a/feature_matching/README.md b/feature_matching_v2/README.md similarity index 100% rename from feature_matching/README.md rename to feature_matching_v2/README.md diff --git a/feature_matching/asift.py b/feature_matching_v2/asift.py similarity index 100% rename from feature_matching/asift.py rename to feature_matching_v2/asift.py diff --git a/feature_matching/atlas.py b/feature_matching_v2/atlas.py similarity index 100% rename from feature_matching/atlas.py rename to feature_matching_v2/atlas.py diff --git a/feature_matching/clean.sh b/feature_matching_v2/clean.sh similarity index 100% rename from feature_matching/clean.sh rename to feature_matching_v2/clean.sh diff --git a/feature_matching/config.py b/feature_matching_v2/config.py similarity index 100% rename from feature_matching/config.py rename to feature_matching_v2/config.py diff --git a/feature_matching/dialog.py b/feature_matching_v2/dialog.py similarity index 100% rename from feature_matching/dialog.py rename to feature_matching_v2/dialog.py diff --git a/feature_matching/graph.py b/feature_matching_v2/graph.py similarity index 100% rename from feature_matching/graph.py rename to feature_matching_v2/graph.py diff --git a/feature_matching/matching.py b/feature_matching_v2/matching.py similarity index 100% rename from feature_matching/matching.py rename to feature_matching_v2/matching.py diff --git a/feature_matching/prototype.py b/feature_matching_v2/prototype.py similarity index 100% rename from feature_matching/prototype.py rename to feature_matching_v2/prototype.py diff --git a/feature_matching/qrangeslider.py b/feature_matching_v2/qrangeslider.py similarity index 100% rename from feature_matching/qrangeslider.py rename to feature_matching_v2/qrangeslider.py diff --git a/feature_matching/ransac.py b/feature_matching_v2/ransac.py similarity index 100% rename from feature_matching/ransac.py rename to feature_matching_v2/ransac.py diff --git a/feature_matching/sift.py b/feature_matching_v2/sift.py similarity index 100% rename from feature_matching/sift.py rename to feature_matching_v2/sift.py diff --git a/feature_matching/testing.py b/feature_matching_v2/testing.py similarity index 100% rename from feature_matching/testing.py rename to feature_matching_v2/testing.py diff --git a/feature_matching/thread.py b/feature_matching_v2/thread.py similarity index 100% rename from feature_matching/thread.py rename to feature_matching_v2/thread.py diff --git a/feature_matching/timing.py b/feature_matching_v2/timing.py similarity index 100% rename from feature_matching/timing.py rename to feature_matching_v2/timing.py diff --git a/feature_matching/util.py b/feature_matching_v2/util.py similarity index 100% rename from feature_matching/util.py rename to feature_matching_v2/util.py diff --git a/feature_matching/warping.py b/feature_matching_v2/warping.py similarity index 100% rename from feature_matching/warping.py rename to feature_matching_v2/warping.py diff --git a/auto_encoder/computed_data/.gitkeep b/feature_matching_v3/.gitignore similarity index 100% rename from auto_encoder/computed_data/.gitkeep rename to feature_matching_v3/.gitignore diff --git a/feature_matching_v3/Bregma_PW1.csv b/feature_matching_v3/Bregma_PW1.csv new file mode 100644 index 0000000..2fe6b2b --- /dev/null +++ b/feature_matching_v3/Bregma_PW1.csv @@ -0,0 +1 @@ +6.7,6.2,5.7,5.2,4.7,4.2,3.7,3.2,2.7,2.2,1.7,1.6,1.2,1,0.7,0.48,0.2,-0.26,-0.3,-0.4,-0.8,-0.92,-1.3,-1.4,-1.8,-2.12,-2.3,-2.56,-2.8,-3.14,-3.3,-3.6,-3.8,-4.16,-4.3,-4.48,-4.8,-5.2,-5.3,-5.6,-5.8,-6.04,-6.3,-6.72,-6.8,-7.04,-7.3,-7.64,-7.8,-8,-8.3,-8.72,-8.8,-9.16,-9.3,-9.68,-9.8,-10.04,-10.3,-10.52,-10.8,-11,-11.3,-11.6,-11.8,-11.96,-12.3,-12.72,-12.8,-13.24,-13.3,-13.68,-13.8,-14.08,-14.3,-14.6 \ No newline at end of file diff --git a/feature_matching_v3/Bregma_PW2.csv b/feature_matching_v3/Bregma_PW2.csv new file mode 100644 index 0000000..d2f4e64 --- /dev/null +++ b/feature_matching_v3/Bregma_PW2.csv @@ -0,0 +1 @@ +6.7,6.2,5.7,5.2,4.7,4.2,3.7,3.2,2.7,2.2,1.7,1.6,1.2,1,0.7,0.48,0.2,-0.26,-0.3,-0.4,-0.8,-0.92,-1.3,-1.4,-1.6,-1.8,-1.88,-2.12,-2.3,-2.56,-2.8,-3.14,-3.3,-3.6,-3.8,-4.16,-4.3,-4.48,-4.8,-5.2,-5.3,-5.6,-5.8,-6.04,-6.3,-6.72,-6.8,-7.04,-7.3,-7.64,-7.8,-8,-8.3,-8.72,-8.8,-9.16,-9.3,-9.68,-9.8,-10.04,-10.3,-10.52,-10.8,-11,-11.3,-11.6,-11.8,-11.96,-12.3,-12.72,-12.8,-13.24,-13.3,-13.68,-13.8,-14.08,-14.3,-14.6 diff --git a/feature_matching_v3/Bregma_PW3.csv b/feature_matching_v3/Bregma_PW3.csv new file mode 100644 index 0000000..cd997f0 --- /dev/null +++ b/feature_matching_v3/Bregma_PW3.csv @@ -0,0 +1 @@ +7.56,7.08,6.6,6.12,5.64,5.16,4.68,4.2,3.72,3.24,3,2.76,2.52,2.28,2.16,2.04,1.92,1.8,1.68,1.56,1.44,1.32,1.2,1.08,0.96,0.84,0.72,0.6,0.48,0.36,0.24,0.12,0,-0.12,-0.24,-0.36,-0.48,-0.6,-0.72,-0.84,-0.96,-1.08,-1.2,-1.32,-1.44,-1.56,-1.72,-1.8,-1.92,-2.04,-2.16,-2.28,-2.4,-2.52,-2.64,-2.76,-2.92,-3,-3.12,-3.24,-3.36,-3.48,-3.6,-3.72,-3.84,-3.96,-4.08,-4.2,-4.36,-4.44,-4.56,-4.68,-4.8,-4.92,-5.04,-5.16,-5.28,-5.4,-5.52,-5.64,-5.76,-5.88,-6,-6.12,-6.24,-6.36,-6.48,-6.6,-6.72,-6.84,-6.96,-7.08,-7.2,-7.32,-7.44,-7.56,-7.68,-7.8,-7.92,-8.04,-8.16,-8.28,-8.4,-8.52,-8.64,-8.76,-8.88,-9,-9.12,-9.24,-9.36,-9.48,-9.6,-9.72,-9.84,-9.96,-10.08,-10.2,-10.32,-10.44,-10.56,-10.68,-10.8,-10.92,-11.04,-11.16,-11.3,-11.52,-11.64,-11.76,-11.88,-12,-12.12,-12.24,-12.36,-12.48,-12.6,-12.72,-12.84,-12.96,-13.08,-13.2,-13.32,-13.44,-13.56,-13.68,-13.8,-13.92,-14.04,-14.16,-14.28,-14.4,-14.52,-14.64,-14.76,-15,-15.24,-15.48,-15.72,-15.96 diff --git a/feature_matching_v3/Bregma_PW3_M.csv b/feature_matching_v3/Bregma_PW3_M.csv new file mode 100644 index 0000000..3c715eb --- /dev/null +++ b/feature_matching_v3/Bregma_PW3_M.csv @@ -0,0 +1 @@ +7.56,7.08,6.6,6.12,5.64,5.16,4.68,4.2,3.72,3.24,3,2.76,2.52,2.28,2.16,2.04,1.92,1.8,1.68,1.56,1.44,1.32,1.2,1.08,0.96,0.84,0.72,0.6,0.48,0.36,0.24,0.12,0,-0.12,-0.24,-0.36,-0.48,-0.6,-0.72,-0.84,-0.96,-1.08,-1.2,-1.32,-1.44,-1.56,-1.72,-1.8,-1.92,-2.04,-2.16,-2.28,-2.4,-2.52,-2.64,-2.76,-2.92,-3,-3.12,-3.24,-3.36,-3.48,-3.6,-3.72,-3.84,-3.96,-4.08,-4.2,-4.36,-4.44,-4.56,-4.68,-4.8,-4.92,-5.04,-5.16,-5.28,-5.4,-5.52,-5.64,-5.76,-5.88,-6,-6.12,-6.24,-6.36,-6.48,-6.6,-6.72,-6.84,-6.96,-7.08,-7.2,-7.32,-7.44,-7.56,-7.68,-7.8,-7.92,-8.04,-8.16,-8.28,-8.4,-8.52,-8.64,-8.76,-8.88,-9,-9.12,-9.24,-9.36,-9.48,-9.6,-9.72,-9.84,-9.96,-10.08,-10.2,-10.32,-10.44,-10.56,-10.68,-10.8,-10.92,-11.04,-11.16,-11.3,-11.52,-11.64,-11.76,-11.88,-12,-12.12,-12.24,-12.36,-12.48,-12.6,-12.72,-12.84,-12.96,-13.08,-13.2,-13.32,-13.44,-13.56,-13.68,-13.8,-13.92,-14.04,-14.16,-14.28,-14.4,-14.52,-14.64,-14.76,-15,-15.24,-15.48,-15.72,-15.96,-16 diff --git a/feature_matching_v3/Bregma_S4.csv b/feature_matching_v3/Bregma_S4.csv new file mode 100644 index 0000000..118eb3d --- /dev/null +++ b/feature_matching_v3/Bregma_S4.csv @@ -0,0 +1 @@ +8.24,6.74,5.88,5.2,4.85,4.2,3.6,3.2,2.8,2.15,1.7,1.45,1.2,0.95,0.45,0.1,0,-0.11,-0.26,-0.46,-0.51,-0.83,-1.08,-1.33,-1.53,-1.78,-2,-2.45,-2.85,-3.25,-3.7,-3.9,-4.2,-4.45,-4.6,-5,-5.25,-5.65,-6.06,-6.5,-6.65,-6.85,-7.1,-7.6,-7.9,-8.3,-8.6,-8.85,-9.25,-9.5,-9.8,-10.1,-10.35,-10.6,-10.85,-11.1,-11.4,-11.58,-11.75,-11.9,-12.2,-12.5,-12.68,-12.88,-13.15,-13.28,-13.44,-13.6,-13.76,-14.16,-14.36,-14.86,-15.46 diff --git a/feature_matching_v3/EXP_SIFT.npz b/feature_matching_v3/EXP_SIFT.npz new file mode 100644 index 0000000..8b1bbe9 Binary files /dev/null and b/feature_matching_v3/EXP_SIFT.npz differ diff --git a/feature_matching_v3/EXP_SM.npz b/feature_matching_v3/EXP_SM.npz new file mode 100644 index 0000000..8b1b515 Binary files /dev/null and b/feature_matching_v3/EXP_SM.npz differ diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-01.jpg b/feature_matching_v3/Level-01.jpg similarity index 100% rename from Vision-Rat-Brain-F/atlas_swanson/Level-01.jpg rename to feature_matching_v3/Level-01.jpg diff --git a/Vision-Rat-Brain-F/atlas_swanson/Level-02.jpg b/feature_matching_v3/Level-02.jpg similarity index 100% rename from Vision-Rat-Brain-F/atlas_swanson/Level-02.jpg rename to feature_matching_v3/Level-02.jpg diff --git a/feature_matching_v3/Level33.svg b/feature_matching_v3/Level33.svg new file mode 100644 index 0000000..cbe6207 --- /dev/null +++ b/feature_matching_v3/Level33.svg @@ -0,0 +1,913 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +LGd +slu +ec +fx +opt +pm +cpd +fi +alv +cc +df +alv +alv +alv +cing +LHAp +ZI +PF +MDm +PVp +LHAsfpm +LHAvl +PSTN +V3m +V3h +BLAp +EPd +ec +EPv +TR +sm +MH +LH +CL +PVT +V3t +RT +VL +CA3 +CA2 +CA1 +IG +4 +3 +2 +1 +5 +RSPv +RSPd +SSp +1 +2 +3 +6a +b +DGmb +DGlb +COApl +COApm +VIP +FC +chpl +CM +BMAp +VPM +VPMpc +VPL +VPLpc +em +hf +IMD +LP +PO +PH +STN +PA +ENTl +LGvl +LGvm +DGlb +so +sr +mo +sg +po +sg +mo +slm + +PMv +PMd +TMv +SPFm +NL +AL +IL + +so +st +SUBv +sr +fr +im +SUMl +MMme +FF +po +sg +mo + +dhc +slu +5 +4 +b +a +ml +PERI +AUDp +AUDv +sp +PIR +1 +2 +3 +6 +PTLp +AUDd +ECT +TEa +sps +CA1 +CA3 +spd +sp +sps +spd +chf3 +bsc +3 +2 +3 +3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/feature_matching_v3/P1.png b/feature_matching_v3/P1.png new file mode 100644 index 0000000..983e9d7 Binary files /dev/null and b/feature_matching_v3/P1.png differ diff --git a/feature_matching_v3/P1P2.npz b/feature_matching_v3/P1P2.npz new file mode 100644 index 0000000..0107ab7 Binary files /dev/null and b/feature_matching_v3/P1P2.npz differ diff --git a/feature_matching_v3/P2.png b/feature_matching_v3/P2.png new file mode 100644 index 0000000..6fc91b2 Binary files /dev/null and b/feature_matching_v3/P2.png differ diff --git a/feature_matching_v3/PW_BB_V1.npz b/feature_matching_v3/PW_BB_V1.npz new file mode 100644 index 0000000..a3c15d3 Binary files /dev/null and b/feature_matching_v3/PW_BB_V1.npz differ diff --git a/feature_matching_v3/PW_BB_V1_SIFT.npz b/feature_matching_v3/PW_BB_V1_SIFT.npz new file mode 100644 index 0000000..b03f7d5 Binary files /dev/null and b/feature_matching_v3/PW_BB_V1_SIFT.npz differ diff --git a/feature_matching_v3/PW_BB_V2.npz b/feature_matching_v3/PW_BB_V2.npz new file mode 100644 index 0000000..0cc7503 Binary files /dev/null and b/feature_matching_v3/PW_BB_V2.npz differ diff --git a/feature_matching_v3/PW_BB_V2_SIFT.npz b/feature_matching_v3/PW_BB_V2_SIFT.npz new file mode 100644 index 0000000..c8636e7 Binary files /dev/null and b/feature_matching_v3/PW_BB_V2_SIFT.npz differ diff --git a/feature_matching_v3/PW_BB_V4.npz b/feature_matching_v3/PW_BB_V4.npz new file mode 100644 index 0000000..41342b7 Binary files /dev/null and b/feature_matching_v3/PW_BB_V4.npz differ diff --git a/feature_matching_v3/PW_BB_V4_SIFT.npz b/feature_matching_v3/PW_BB_V4_SIFT.npz new file mode 100644 index 0000000..b21ad2e Binary files /dev/null and b/feature_matching_v3/PW_BB_V4_SIFT.npz differ diff --git a/Vision-Rat-Brain-F/S_BB_V1.npz b/feature_matching_v3/S_BB_V1.npz similarity index 99% rename from Vision-Rat-Brain-F/S_BB_V1.npz rename to feature_matching_v3/S_BB_V1.npz index 132e750..43ceebd 100644 Binary files a/Vision-Rat-Brain-F/S_BB_V1.npz and b/feature_matching_v3/S_BB_V1.npz differ diff --git a/feature_matching_v3/S_BB_V1_SIFT.npz b/feature_matching_v3/S_BB_V1_SIFT.npz new file mode 100644 index 0000000..1fd4175 Binary files /dev/null and b/feature_matching_v3/S_BB_V1_SIFT.npz differ diff --git a/feature_matching_v3/S_BB_V2.npz b/feature_matching_v3/S_BB_V2.npz new file mode 100644 index 0000000..9278da8 Binary files /dev/null and b/feature_matching_v3/S_BB_V2.npz differ diff --git a/feature_matching_v3/S_BB_V2_SIFT.npz b/feature_matching_v3/S_BB_V2_SIFT.npz new file mode 100644 index 0000000..22bad7d Binary files /dev/null and b/feature_matching_v3/S_BB_V2_SIFT.npz differ diff --git a/feature_matching_v3/S_BB_V4.npz b/feature_matching_v3/S_BB_V4.npz new file mode 100644 index 0000000..cb78b63 Binary files /dev/null and b/feature_matching_v3/S_BB_V4.npz differ diff --git a/feature_matching_v3/S_BB_V4_SIFT.npz b/feature_matching_v3/S_BB_V4_SIFT.npz new file mode 100644 index 0000000..26fdf9e Binary files /dev/null and b/feature_matching_v3/S_BB_V4_SIFT.npz differ diff --git a/feature_matching_v3/deep_style.py b/feature_matching_v3/deep_style.py new file mode 100644 index 0000000..5d974f8 --- /dev/null +++ b/feature_matching_v3/deep_style.py @@ -0,0 +1,1225 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "colab": { + "name": "Neural Style Transfer with Eager Execution", + "version": "0.3.2", + "provenance": [], + "private_outputs": true, + "collapsed_sections": [], + "toc_visible": true + }, + "kernelspec": { + "name": "python3", + "display_name": "Python 3" + }, + "accelerator": "GPU" + }, + "cells": [ + { + "metadata": { + "id": "jo5PziEC4hWs", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "# Neural Style Transfer with tf.keras\n", + "\n", + "\n", + " \n", + " \n", + "
\n", + " Run in Google Colab\n", + " \n", + " View source on GitHub\n", + "
" + ] + }, + { + "metadata": { + "id": "aDyGj8DmXCJI", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "## Overview\n", + "\n", + "In this tutorial, we will learn how to use deep learning to compose images in the style of another image (ever wish you could paint like Picasso or Van Gogh?). This is known as **neural style transfer**! This is a technique outlined in [Leon A. Gatys' paper, A Neural Algorithm of Artistic Style](https://arxiv.org/abs/1508.06576), which is a great read, and you should definitely check it out. \n", + "\n", + "But, what is neural style transfer?\n", + "\n", + "Neural style transfer is an optimization technique used to take three images, a **content** image, a **style reference** image (such as an artwork by a famous painter), and the **input** image you want to style -- and blend them together such that the input image is transformed to look like the content image, but “painted” in the style of the style image.\n", + "\n", + "\n", + "For example, let’s take an image of this turtle and Katsushika Hokusai's *The Great Wave off Kanagawa*:\n", + "\n", + "\"Drawing\"\n", + "\"Drawing\"\n", + "\n", + "[Image of Green Sea Turtle](https://commons.wikimedia.org/wiki/File:Green_Sea_Turtle_grazing_seagrass.jpg)\n", + "-By P.Lindgren [CC BY-SA 3.0 (https://creativecommons.org/licenses/by-sa/3.0)], from Wikimedia Common\n", + "\n", + "\n", + "Now how would it look like if Hokusai decided to paint the picture of this Turtle exclusively with this style? Something like this?\n", + "\n", + "\"Drawing\"\n", + "\n", + "Is this magic or just deep learning? Fortunately, this doesn’t involve any witchcraft: style transfer is a fun and interesting technique that showcases the capabilities and internal representations of neural networks. \n", + "\n", + "The principle of neural style transfer is to define two distance functions, one that describes how different the content of two images are , $L_{content}$, and one that describes the difference between two images in terms of their style, $L_{style}$. Then, given three images, a desired style image, a desired content image, and the input image (initialized with the content image), we try to transform the input image to minimize the content distance with the content image and its style distance with the style image. \n", + "In summary, we’ll take the base input image, a content image that we want to match, and the style image that we want to match. We’ll transform the base input image by minimizing the content and style distances (losses) with backpropagation, creating an image that matches the content of the content image and the style of the style image. \n", + "\n", + "### Specific concepts that will be covered:\n", + "In the process, we will build practical experience and develop intuition around the following concepts\n", + "\n", + "* **Eager Execution** - use TensorFlow's imperative programming environment that evaluates operations immediately \n", + " * [Learn more about eager execution](https://www.tensorflow.org/programmers_guide/eager)\n", + " * [See it in action](https://www.tensorflow.org/get_started/eager)\n", + "* ** Using [Functional API](https://keras.io/getting-started/functional-api-guide/) to define a model** - we'll build a subset of our model that will give us access to the necessary intermediate activations using the Functional API \n", + "* **Leveraging feature maps of a pretrained model** - Learn how to use pretrained models and their feature maps \n", + "* **Create custom training loops** - we'll examine how to set up an optimizer to minimize a given loss with respect to input parameters\n", + "\n", + "### We will follow the general steps to perform style transfer:\n", + "\n", + "1. Visualize data\n", + "2. Basic Preprocessing/preparing our data\n", + "3. Set up loss functions \n", + "4. Create model\n", + "5. Optimize for loss function\n", + "\n", + "**Audience:** This post is geared towards intermediate users who are comfortable with basic machine learning concepts. To get the most out of this post, you should: \n", + "* Read [Gatys' paper](https://arxiv.org/abs/1508.06576) - we'll explain along the way, but the paper will provide a more thorough understanding of the task\n", + "* [Understand reducing loss with gradient descent](https://developers.google.com/machine-learning/crash-course/reducing-loss/gradient-descent)\n", + "\n", + "**Time Estimated**: 30 min\n" + ] + }, + { + "metadata": { + "id": "U8ajP_u73s6m", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "## Setup\n", + "\n", + "### Download Images" + ] + }, + { + "metadata": { + "id": "riWE_b8k3s6o", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "import os\n", + "img_dir = '/tmp/nst'\n", + "if not os.path.exists(img_dir):\n", + " os.makedirs(img_dir)\n", + "!wget --quiet -P /tmp/nst/ https://upload.wikimedia.org/wikipedia/commons/d/d7/Green_Sea_Turtle_grazing_seagrass.jpg\n", + "!wget --quiet -P /tmp/nst/ https://upload.wikimedia.org/wikipedia/commons/0/0a/The_Great_Wave_off_Kanagawa.jpg\n", + "!wget --quiet -P /tmp/nst/ https://upload.wikimedia.org/wikipedia/commons/b/b4/Vassily_Kandinsky%2C_1913_-_Composition_7.jpg\n", + "!wget --quiet -P /tmp/nst/ https://upload.wikimedia.org/wikipedia/commons/0/00/Tuebingen_Neckarfront.jpg\n", + "!wget --quiet -P /tmp/nst/ https://upload.wikimedia.org/wikipedia/commons/6/68/Pillars_of_creation_2014_HST_WFC3-UVIS_full-res_denoised.jpg\n", + "!wget --quiet -P /tmp/nst/ https://upload.wikimedia.org/wikipedia/commons/thumb/e/ea/Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg/1024px-Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg" + ], + "execution_count": 0, + "outputs": [] + }, + { + "metadata": { + "id": "eqxUicSPUOP6", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "### Import and configure modules" + ] + }, + { + "metadata": { + "id": "sc1OLbOWhPCO", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "import matplotlib.pyplot as plt\n", + "import matplotlib as mpl\n", + "mpl.rcParams['figure.figsize'] = (10,10)\n", + "mpl.rcParams['axes.grid'] = False\n", + "\n", + "import numpy as np\n", + "from PIL import Image\n", + "import time\n", + "import functools" + ], + "execution_count": 0, + "outputs": [] + }, + { + "metadata": { + "id": "RYEjlrYk3s6w", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "import tensorflow as tf\n", + "import tensorflow.contrib.eager as tfe\n", + "\n", + "from tensorflow.python.keras.preprocessing import image as kp_image\n", + "from tensorflow.python.keras import models \n", + "from tensorflow.python.keras import losses\n", + "from tensorflow.python.keras import layers\n", + "from tensorflow.python.keras import backend as K" + ], + "execution_count": 0, + "outputs": [] + }, + { + "metadata": { + "id": "L7sjDODq67HQ", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "We’ll begin by enabling [eager execution](https://www.tensorflow.org/guide/eager). Eager execution allows us to work through this technique in the clearest and most readable way. " + ] + }, + { + "metadata": { + "id": "sfjsSAtNrqQx", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "tf.enable_eager_execution()\n", + "print(\"Eager execution: {}\".format(tf.executing_eagerly()))" + ], + "execution_count": 0, + "outputs": [] + }, + { + "metadata": { + "id": "IOiGrIV1iERH", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "# Set up some global values here\n", + "content_path = '/tmp/nst/Green_Sea_Turtle_grazing_seagrass.jpg'\n", + "style_path = '/tmp/nst/The_Great_Wave_off_Kanagawa.jpg'" + ], + "execution_count": 0, + "outputs": [] + }, + { + "metadata": { + "id": "xE4Yt8nArTeR", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "## Visualize the input" + ] + }, + { + "metadata": { + "id": "3TLljcwv5qZs", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "def load_img(path_to_img):\n", + " max_dim = 512\n", + " img = Image.open(path_to_img)\n", + " long = max(img.size)\n", + " scale = max_dim/long\n", + " img = img.resize((round(img.size[0]*scale), round(img.size[1]*scale)), Image.ANTIALIAS)\n", + " \n", + " img = kp_image.img_to_array(img)\n", + " \n", + " # We need to broadcast the image array such that it has a batch dimension \n", + " img = np.expand_dims(img, axis=0)\n", + " return img" + ], + "execution_count": 0, + "outputs": [] + }, + { + "metadata": { + "id": "vupl0CI18aAG", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "def imshow(img, title=None):\n", + " # Remove the batch dimension\n", + " out = np.squeeze(img, axis=0)\n", + " # Normalize for display \n", + " out = out.astype('uint8')\n", + " plt.imshow(out)\n", + " if title is not None:\n", + " plt.title(title)\n", + " plt.imshow(out)" + ], + "execution_count": 0, + "outputs": [] + }, + { + "metadata": { + "id": "2yAlRzJZrWM3", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "These are input content and style images. We hope to \"create\" an image with the content of our content image, but with the style of the style image. " + ] + }, + { + "metadata": { + "id": "_UWQmeEaiKkP", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "plt.figure(figsize=(10,10))\n", + "\n", + "content = load_img(content_path).astype('uint8')\n", + "style = load_img(style_path).astype('uint8')\n", + "\n", + "plt.subplot(1, 2, 1)\n", + "imshow(content, 'Content Image')\n", + "\n", + "plt.subplot(1, 2, 2)\n", + "imshow(style, 'Style Image')\n", + "plt.show()" + ], + "execution_count": 0, + "outputs": [] + }, + { + "metadata": { + "id": "7qMVNvEsK-_D", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "## Prepare the data\n", + "Let's create methods that will allow us to load and preprocess our images easily. We perform the same preprocessing process as are expected according to the VGG training process. VGG networks are trained on image with each channel normalized by `mean = [103.939, 116.779, 123.68]`and with channels BGR." + ] + }, + { + "metadata": { + "id": "hGwmTwJNmv2a", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "def load_and_process_img(path_to_img):\n", + " img = load_img(path_to_img)\n", + " img = tf.keras.applications.vgg19.preprocess_input(img)\n", + " return img" + ], + "execution_count": 0, + "outputs": [] + }, + { + "metadata": { + "id": "xCgooqs6tAka", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "In order to view the outputs of our optimization, we are required to perform the inverse preprocessing step. Furthermore, since our optimized image may take its values anywhere between $- \\infty$ and $\\infty$, we must clip to maintain our values from within the 0-255 range. " + ] + }, + { + "metadata": { + "id": "mjzlKRQRs_y2", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "def deprocess_img(processed_img):\n", + " x = processed_img.copy()\n", + " if len(x.shape) == 4:\n", + " x = np.squeeze(x, 0)\n", + " assert len(x.shape) == 3, (\"Input to deprocess image must be an image of \"\n", + " \"dimension [1, height, width, channel] or [height, width, channel]\")\n", + " if len(x.shape) != 3:\n", + " raise ValueError(\"Invalid input to deprocessing image\")\n", + " \n", + " # perform the inverse of the preprocessiing step\n", + " x[:, :, 0] += 103.939\n", + " x[:, :, 1] += 116.779\n", + " x[:, :, 2] += 123.68\n", + " x = x[:, :, ::-1]\n", + "\n", + " x = np.clip(x, 0, 255).astype('uint8')\n", + " return x" + ], + "execution_count": 0, + "outputs": [] + }, + { + "metadata": { + "id": "GEwZ7FlwrjoZ", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "### Define content and style representations\n", + "In order to get both the content and style representations of our image, we will look at some intermediate layers within our model. As we go deeper into the model, these intermediate layers represent higher and higher order features. In this case, we are using the network architecture VGG19, a pretrained image classification network. These intermediate layers are necessary to define the representation of content and style from our images. For an input image, we will try to match the corresponding style and content target representations at these intermediate layers. \n", + "\n", + "#### Why intermediate layers?\n", + "\n", + "You may be wondering why these intermediate outputs within our pretrained image classification network allow us to define style and content representations. At a high level, this phenomenon can be explained by the fact that in order for a network to perform image classification (which our network has been trained to do), it must understand the image. This involves taking the raw image as input pixels and building an internal representation through transformations that turn the raw image pixels into a complex understanding of the features present within the image. This is also partly why convolutional neural networks are able to generalize well: they’re able to capture the invariances and defining features within classes (e.g., cats vs. dogs) that are agnostic to background noise and other nuisances. Thus, somewhere between where the raw image is fed in and the classification label is output, the model serves as a complex feature extractor; hence by accessing intermediate layers, we’re able to describe the content and style of input images. \n", + "\n", + "\n", + "Specifically we’ll pull out these intermediate layers from our network: \n" + ] + }, + { + "metadata": { + "id": "N4-8eUp_Kc-j", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "# Content layer where will pull our feature maps\n", + "content_layers = ['block5_conv2'] \n", + "\n", + "# Style layer we are interested in\n", + "style_layers = ['block1_conv1',\n", + " 'block2_conv1',\n", + " 'block3_conv1', \n", + " 'block4_conv1', \n", + " 'block5_conv1'\n", + " ]\n", + "\n", + "num_content_layers = len(content_layers)\n", + "num_style_layers = len(style_layers)" + ], + "execution_count": 0, + "outputs": [] + }, + { + "metadata": { + "id": "Jt3i3RRrJiOX", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "## Build the Model \n", + "In this case, we load [VGG19](https://keras.io/applications/#vgg19), and feed in our input tensor to the model. This will allow us to extract the feature maps (and subsequently the content and style representations) of the content, style, and generated images.\n", + "\n", + "We use VGG19, as suggested in the paper. In addition, since VGG19 is a relatively simple model (compared with ResNet, Inception, etc) the feature maps actually work better for style transfer. " + ] + }, + { + "metadata": { + "id": "v9AnzEUU6hhx", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "In order to access the intermediate layers corresponding to our style and content feature maps, we get the corresponding outputs and using the Keras [**Functional API**](https://keras.io/getting-started/functional-api-guide/), we define our model with the desired output activations. \n", + "\n", + "With the Functional API defining a model simply involves defining the input and output: \n", + "\n", + "`model = Model(inputs, outputs)`" + ] + }, + { + "metadata": { + "id": "nfec6MuMAbPx", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "def get_model():\n", + " \"\"\" Creates our model with access to intermediate layers. \n", + " \n", + " This function will load the VGG19 model and access the intermediate layers. \n", + " These layers will then be used to create a new model that will take input image\n", + " and return the outputs from these intermediate layers from the VGG model. \n", + " \n", + " Returns:\n", + " returns a keras model that takes image inputs and outputs the style and \n", + " content intermediate layers. \n", + " \"\"\"\n", + " # Load our model. We load pretrained VGG, trained on imagenet data\n", + " vgg = tf.keras.applications.vgg19.VGG19(include_top=False, weights='imagenet')\n", + " vgg.trainable = False\n", + " # Get output layers corresponding to style and content layers \n", + " style_outputs = [vgg.get_layer(name).output for name in style_layers]\n", + " content_outputs = [vgg.get_layer(name).output for name in content_layers]\n", + " model_outputs = style_outputs + content_outputs\n", + " # Build model \n", + " return models.Model(vgg.input, model_outputs)" + ], + "execution_count": 0, + "outputs": [] + }, + { + "metadata": { + "id": "kl6eFGa7-OtV", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "In the above code snippet, we’ll load our pretrained image classification network. Then we grab the layers of interest as we defined earlier. Then we define a Model by setting the model’s inputs to an image and the outputs to the outputs of the style and content layers. In other words, we created a model that will take an input image and output the content and style intermediate layers! \n" + ] + }, + { + "metadata": { + "id": "vJdYvJTZ4bdS", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "## Define and create our loss functions (content and style distances)" + ] + }, + { + "metadata": { + "id": "F2Hcepii7_qh", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "### Content Loss" + ] + }, + { + "metadata": { + "id": "1FvH-gwXi4nq", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "Our content loss definition is actually quite simple. We’ll pass the network both the desired content image and our base input image. This will return the intermediate layer outputs (from the layers defined above) from our model. Then we simply take the euclidean distance between the two intermediate representations of those images. \n", + "\n", + "More formally, content loss is a function that describes the distance of content from our output image $x$ and our content image, $p$. Let $C_{nn}$ be a pre-trained deep convolutional neural network. Again, in this case we use [VGG19](https://keras.io/applications/#vgg19). Let $X$ be any image, then $C_{nn}(X)$ is the network fed by X. Let $F^l_{ij}(x) \\in C_{nn}(x)$ and $P^l_{ij}(p) \\in C_{nn}(p)$ describe the respective intermediate feature representation of the network with inputs $x$ and $p$ at layer $l$. Then we describe the content distance (loss) formally as: $$L^l_{content}(p, x) = \\sum_{i, j} (F^l_{ij}(x) - P^l_{ij}(p))^2$$\n", + "\n", + "We perform backpropagation in the usual way such that we minimize this content loss. We thus change the initial image until it generates a similar response in a certain layer (defined in content_layer) as the original content image.\n", + "\n", + "This can be implemented quite simply. Again it will take as input the feature maps at a layer L in a network fed by x, our input image, and p, our content image, and return the content distance.\n", + "\n" + ] + }, + { + "metadata": { + "id": "6KsbqPA8J9DY", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "### Computing content loss\n", + "We will actually add our content losses at each desired layer. This way, each iteration when we feed our input image through the model (which in eager is simply `model(input_image)`!) all the content losses through the model will be properly compute and because we are executing eagerly, all the gradients will be computed. " + ] + }, + { + "metadata": { + "id": "d2mf7JwRMkCd", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "def get_content_loss(base_content, target):\n", + " return tf.reduce_mean(tf.square(base_content - target))" + ], + "execution_count": 0, + "outputs": [] + }, + { + "metadata": { + "id": "lGUfttK9F8d5", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "## Style Loss" + ] + }, + { + "metadata": { + "id": "I6XtkGK_YGD1", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "Computing style loss is a bit more involved, but follows the same principle, this time feeding our network the base input image and the style image. However, instead of comparing the raw intermediate outputs of the base input image and the style image, we instead compare the Gram matrices of the two outputs. \n", + "\n", + "Mathematically, we describe the style loss of the base input image, $x$, and the style image, $a$, as the distance between the style representation (the gram matrices) of these images. We describe the style representation of an image as the correlation between different filter responses given by the Gram matrix $G^l$, where $G^l_{ij}$ is the inner product between the vectorized feature map $i$ and $j$ in layer $l$. We can see that $G^l_{ij}$ generated over the feature map for a given image represents the correlation between feature maps $i$ and $j$. \n", + "\n", + "To generate a style for our base input image, we perform gradient descent from the content image to transform it into an image that matches the style representation of the original image. We do so by minimizing the mean squared distance between the feature correlation map of the style image and the input image. The contribution of each layer to the total style loss is described by\n", + "$$E_l = \\frac{1}{4N_l^2M_l^2} \\sum_{i,j}(G^l_{ij} - A^l_{ij})^2$$\n", + "\n", + "where $G^l_{ij}$ and $A^l_{ij}$ are the respective style representation in layer $l$ of $x$ and $a$. $N_l$ describes the number of feature maps, each of size $M_l = height * width$. Thus, the total style loss across each layer is \n", + "$$L_{style}(a, x) = \\sum_{l \\in L} w_l E_l$$\n", + "where we weight the contribution of each layer's loss by some factor $w_l$. In our case, we weight each layer equally ($w_l =\\frac{1}{|L|}$)" + ] + }, + { + "metadata": { + "id": "F21Hm61yLKk5", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "### Computing style loss\n", + "Again, we implement our loss as a distance metric . " + ] + }, + { + "metadata": { + "id": "N7MOqwKLLke8", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "def gram_matrix(input_tensor):\n", + " # We make the image channels first \n", + " channels = int(input_tensor.shape[-1])\n", + " a = tf.reshape(input_tensor, [-1, channels])\n", + " n = tf.shape(a)[0]\n", + " gram = tf.matmul(a, a, transpose_a=True)\n", + " return gram / tf.cast(n, tf.float32)\n", + "\n", + "def get_style_loss(base_style, gram_target):\n", + " \"\"\"Expects two images of dimension h, w, c\"\"\"\n", + " # height, width, num filters of each layer\n", + " # We scale the loss at a given layer by the size of the feature map and the number of filters\n", + " height, width, channels = base_style.get_shape().as_list()\n", + " gram_style = gram_matrix(base_style)\n", + " \n", + " return tf.reduce_mean(tf.square(gram_style - gram_target))# / (4. * (channels ** 2) * (width * height) ** 2)" + ], + "execution_count": 0, + "outputs": [] + }, + { + "metadata": { + "id": "pXIUX6czZABh", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "## Apply style transfer to our images\n" + ] + }, + { + "metadata": { + "id": "y9r8Lyjb_m0u", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "### Run Gradient Descent \n", + "If you aren't familiar with gradient descent/backpropagation or need a refresher, you should definitely check out this [awesome resource](https://developers.google.com/machine-learning/crash-course/reducing-loss/gradient-descent).\n", + "\n", + "In this case, we use the [Adam](https://www.tensorflow.org/api_docs/python/tf/keras/optimizers/Adam)* optimizer in order to minimize our loss. We iteratively update our output image such that it minimizes our loss: we don't update the weights associated with our network, but instead we train our input image to minimize loss. In order to do this, we must know how we calculate our loss and gradients. \n", + "\n", + "\\* Note that L-BFGS, which if you are familiar with this algorithm is recommended, isn’t used in this tutorial because a primary motivation behind this tutorial was to illustrate best practices with eager execution, and, by using Adam, we can demonstrate the autograd/gradient tape functionality with custom training loops.\n" + ] + }, + { + "metadata": { + "id": "-kGzV6LTp4CU", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "We’ll define a little helper function that will load our content and style image, feed them forward through our network, which will then output the content and style feature representations from our model. " + ] + }, + { + "metadata": { + "id": "O-lj5LxgtmnI", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "def get_feature_representations(model, content_path, style_path):\n", + " \"\"\"Helper function to compute our content and style feature representations.\n", + "\n", + " This function will simply load and preprocess both the content and style \n", + " images from their path. Then it will feed them through the network to obtain\n", + " the outputs of the intermediate layers. \n", + " \n", + " Arguments:\n", + " model: The model that we are using.\n", + " content_path: The path to the content image.\n", + " style_path: The path to the style image\n", + " \n", + " Returns:\n", + " returns the style features and the content features. \n", + " \"\"\"\n", + " # Load our images in \n", + " content_image = load_and_process_img(content_path)\n", + " style_image = load_and_process_img(style_path)\n", + " \n", + " # batch compute content and style features\n", + " style_outputs = model(style_image)\n", + " content_outputs = model(content_image)\n", + " \n", + " \n", + " # Get the style and content feature representations from our model \n", + " style_features = [style_layer[0] for style_layer in style_outputs[:num_style_layers]]\n", + " content_features = [content_layer[0] for content_layer in content_outputs[num_style_layers:]]\n", + " return style_features, content_features" + ], + "execution_count": 0, + "outputs": [] + }, + { + "metadata": { + "id": "3DopXw7-lFHa", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "### Computing the loss and gradients\n", + "Here we use [**tf.GradientTape**](https://www.tensorflow.org/programmers_guide/eager#computing_gradients) to compute the gradient. It allows us to take advantage of the automatic differentiation available by tracing operations for computing the gradient later. It records the operations during the forward pass and then is able to compute the gradient of our loss function with respect to our input image for the backwards pass." + ] + }, + { + "metadata": { + "id": "oVDhSo8iJunf", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "def compute_loss(model, loss_weights, init_image, gram_style_features, content_features):\n", + " \"\"\"This function will compute the loss total loss.\n", + " \n", + " Arguments:\n", + " model: The model that will give us access to the intermediate layers\n", + " loss_weights: The weights of each contribution of each loss function. \n", + " (style weight, content weight, and total variation weight)\n", + " init_image: Our initial base image. This image is what we are updating with \n", + " our optimization process. We apply the gradients wrt the loss we are \n", + " calculating to this image.\n", + " gram_style_features: Precomputed gram matrices corresponding to the \n", + " defined style layers of interest.\n", + " content_features: Precomputed outputs from defined content layers of \n", + " interest.\n", + " \n", + " Returns:\n", + " returns the total loss, style loss, content loss, and total variational loss\n", + " \"\"\"\n", + " style_weight, content_weight = loss_weights\n", + " \n", + " # Feed our init image through our model. This will give us the content and \n", + " # style representations at our desired layers. Since we're using eager\n", + " # our model is callable just like any other function!\n", + " model_outputs = model(init_image)\n", + " \n", + " style_output_features = model_outputs[:num_style_layers]\n", + " content_output_features = model_outputs[num_style_layers:]\n", + " \n", + " style_score = 0\n", + " content_score = 0\n", + "\n", + " # Accumulate style losses from all layers\n", + " # Here, we equally weight each contribution of each loss layer\n", + " weight_per_style_layer = 1.0 / float(num_style_layers)\n", + " for target_style, comb_style in zip(gram_style_features, style_output_features):\n", + " style_score += weight_per_style_layer * get_style_loss(comb_style[0], target_style)\n", + " \n", + " # Accumulate content losses from all layers \n", + " weight_per_content_layer = 1.0 / float(num_content_layers)\n", + " for target_content, comb_content in zip(content_features, content_output_features):\n", + " content_score += weight_per_content_layer* get_content_loss(comb_content[0], target_content)\n", + " \n", + " style_score *= style_weight\n", + " content_score *= content_weight\n", + "\n", + " # Get total loss\n", + " loss = style_score + content_score \n", + " return loss, style_score, content_score" + ], + "execution_count": 0, + "outputs": [] + }, + { + "metadata": { + "id": "r5XTvbP6nJQa", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "Then computing the gradients is easy:" + ] + }, + { + "metadata": { + "id": "fwzYeOqOUH9_", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "def compute_grads(cfg):\n", + " with tf.GradientTape() as tape: \n", + " all_loss = compute_loss(**cfg)\n", + " # Compute gradients wrt input image\n", + " total_loss = all_loss[0]\n", + " return tape.gradient(total_loss, cfg['init_image']), all_loss" + ], + "execution_count": 0, + "outputs": [] + }, + { + "metadata": { + "id": "T9yKu2PLlBIE", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "### Optimization loop" + ] + }, + { + "metadata": { + "id": "pj_enNo6tACQ", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "import IPython.display\n", + "\n", + "def run_style_transfer(content_path, \n", + " style_path,\n", + " num_iterations=1000,\n", + " content_weight=1e3, \n", + " style_weight=1e-2): \n", + " # We don't need to (or want to) train any layers of our model, so we set their\n", + " # trainable to false. \n", + " model = get_model() \n", + " for layer in model.layers:\n", + " layer.trainable = False\n", + " \n", + " # Get the style and content feature representations (from our specified intermediate layers) \n", + " style_features, content_features = get_feature_representations(model, content_path, style_path)\n", + " gram_style_features = [gram_matrix(style_feature) for style_feature in style_features]\n", + " \n", + " # Set initial image\n", + " init_image = load_and_process_img(content_path)\n", + " init_image = tfe.Variable(init_image, dtype=tf.float32)\n", + " # Create our optimizer\n", + " opt = tf.train.AdamOptimizer(learning_rate=5, beta1=0.99, epsilon=1e-1)\n", + "\n", + " # For displaying intermediate images \n", + " iter_count = 1\n", + " \n", + " # Store our best result\n", + " best_loss, best_img = float('inf'), None\n", + " \n", + " # Create a nice config \n", + " loss_weights = (style_weight, content_weight)\n", + " cfg = {\n", + " 'model': model,\n", + " 'loss_weights': loss_weights,\n", + " 'init_image': init_image,\n", + " 'gram_style_features': gram_style_features,\n", + " 'content_features': content_features\n", + " }\n", + " \n", + " # For displaying\n", + " num_rows = 2\n", + " num_cols = 5\n", + " display_interval = num_iterations/(num_rows*num_cols)\n", + " start_time = time.time()\n", + " global_start = time.time()\n", + " \n", + " norm_means = np.array([103.939, 116.779, 123.68])\n", + " min_vals = -norm_means\n", + " max_vals = 255 - norm_means \n", + " \n", + " imgs = []\n", + " for i in range(num_iterations):\n", + " grads, all_loss = compute_grads(cfg)\n", + " loss, style_score, content_score = all_loss\n", + " opt.apply_gradients([(grads, init_image)])\n", + " clipped = tf.clip_by_value(init_image, min_vals, max_vals)\n", + " init_image.assign(clipped)\n", + " end_time = time.time() \n", + " \n", + " if loss < best_loss:\n", + " # Update best loss and best image from total loss. \n", + " best_loss = loss\n", + " best_img = deprocess_img(init_image.numpy())\n", + "\n", + " if i % display_interval== 0:\n", + " start_time = time.time()\n", + " \n", + " # Use the .numpy() method to get the concrete numpy array\n", + " plot_img = init_image.numpy()\n", + " plot_img = deprocess_img(plot_img)\n", + " imgs.append(plot_img)\n", + " IPython.display.clear_output(wait=True)\n", + " IPython.display.display_png(Image.fromarray(plot_img))\n", + " print('Iteration: {}'.format(i)) \n", + " print('Total loss: {:.4e}, ' \n", + " 'style loss: {:.4e}, '\n", + " 'content loss: {:.4e}, '\n", + " 'time: {:.4f}s'.format(loss, style_score, content_score, time.time() - start_time))\n", + " print('Total time: {:.4f}s'.format(time.time() - global_start))\n", + " IPython.display.clear_output(wait=True)\n", + " plt.figure(figsize=(14,4))\n", + " for i,img in enumerate(imgs):\n", + " plt.subplot(num_rows,num_cols,i+1)\n", + " plt.imshow(img)\n", + " plt.xticks([])\n", + " plt.yticks([])\n", + " \n", + " return best_img, best_loss " + ], + "execution_count": 0, + "outputs": [] + }, + { + "metadata": { + "id": "vSVMx4burydi", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "best, best_loss = run_style_transfer(content_path, \n", + " style_path, num_iterations=1000)" + ], + "execution_count": 0, + "outputs": [] + }, + { + "metadata": { + "id": "dzJTObpsO3TZ", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "Image.fromarray(best)" + ], + "execution_count": 0, + "outputs": [] + }, + { + "metadata": { + "id": "dCXQ9vSnQbDy", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "To download the image from Colab uncomment the following code:" + ] + }, + { + "metadata": { + "id": "SSH6OpyyQn7w", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "#from google.colab import files\n", + "#files.download('wave_turtle.png')" + ], + "execution_count": 0, + "outputs": [] + }, + { + "metadata": { + "id": "LwiZfCW0AZwt", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "## Visualize outputs\n", + "We \"deprocess\" the output image in order to remove the processing that was applied to it. " + ] + }, + { + "metadata": { + "id": "lqTQN1PjulV9", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "def show_results(best_img, content_path, style_path, show_large_final=True):\n", + " plt.figure(figsize=(10, 5))\n", + " content = load_img(content_path) \n", + " style = load_img(style_path)\n", + "\n", + " plt.subplot(1, 2, 1)\n", + " imshow(content, 'Content Image')\n", + "\n", + " plt.subplot(1, 2, 2)\n", + " imshow(style, 'Style Image')\n", + "\n", + " if show_large_final: \n", + " plt.figure(figsize=(10, 10))\n", + "\n", + " plt.imshow(best_img)\n", + " plt.title('Output Image')\n", + " plt.show()" + ], + "execution_count": 0, + "outputs": [] + }, + { + "metadata": { + "id": "i6d6O50Yvs6a", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "show_results(best, content_path, style_path)" + ], + "execution_count": 0, + "outputs": [] + }, + { + "metadata": { + "id": "tyGMmWh2Pss8", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "## Try it on other images\n", + "Image of Tuebingen \n", + "\n", + "Photo By: Andreas Praefcke [GFDL (http://www.gnu.org/copyleft/fdl.html) or CC BY 3.0 (https://creativecommons.org/licenses/by/3.0)], from Wikimedia Commons" + ] + }, + { + "metadata": { + "id": "x2TePU39k9lb", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "### Starry night + Tuebingen" + ] + }, + { + "metadata": { + "id": "ES9dC6ZyJBD2", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "best_starry_night, best_loss = run_style_transfer('/tmp/nst/Tuebingen_Neckarfront.jpg',\n", + " '/tmp/nst/1024px-Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg')" + ], + "execution_count": 0, + "outputs": [] + }, + { + "metadata": { + "id": "X8w8WLkKvzXu", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "show_results(best_starry_night, '/tmp/nst/Tuebingen_Neckarfront.jpg',\n", + " '/tmp/nst/1024px-Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg')" + ], + "execution_count": 0, + "outputs": [] + }, + { + "metadata": { + "id": "QcXwvViek4Br", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "### Pillars of Creation + Tuebingen" + ] + }, + { + "metadata": { + "id": "vJ3u2U-gGmgP", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "best_poc_tubingen, best_loss = run_style_transfer('/tmp/nst/Tuebingen_Neckarfront.jpg', \n", + " '/tmp/nst/Pillars_of_creation_2014_HST_WFC3-UVIS_full-res_denoised.jpg')" + ], + "execution_count": 0, + "outputs": [] + }, + { + "metadata": { + "id": "pQUq3KxpGv2O", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "show_results(best_poc_tubingen, \n", + " '/tmp/nst/Tuebingen_Neckarfront.jpg',\n", + " '/tmp/nst/Pillars_of_creation_2014_HST_WFC3-UVIS_full-res_denoised.jpg')" + ], + "execution_count": 0, + "outputs": [] + }, + { + "metadata": { + "id": "bTZdTOdW3s8H", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "### Kandinsky Composition 7 + Tuebingen" + ] + }, + { + "metadata": { + "id": "bt9mbQfl7exl", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "best_kandinsky_tubingen, best_loss = run_style_transfer('/tmp/nst/Tuebingen_Neckarfront.jpg', \n", + " '/tmp/nst/Vassily_Kandinsky,_1913_-_Composition_7.jpg')" + ], + "execution_count": 0, + "outputs": [] + }, + { + "metadata": { + "id": "Qnz8HeXSXg6P", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "show_results(best_kandinsky_tubingen, \n", + " '/tmp/nst/Tuebingen_Neckarfront.jpg',\n", + " '/tmp/nst/Vassily_Kandinsky,_1913_-_Composition_7.jpg')" + ], + "execution_count": 0, + "outputs": [] + }, + { + "metadata": { + "id": "cg68lW2A3s8N", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "### Pillars of Creation + Sea Turtle" + ] + }, + { + "metadata": { + "id": "dl0DUot_bFST", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "best_poc_turtle, best_loss = run_style_transfer('/tmp/nst/Green_Sea_Turtle_grazing_seagrass.jpg', \n", + " '/tmp/nst/Pillars_of_creation_2014_HST_WFC3-UVIS_full-res_denoised.jpg')" + ], + "execution_count": 0, + "outputs": [] + }, + { + "metadata": { + "id": "UzJfE0I1bQn8", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "show_results(best_poc_turtle, \n", + " '/tmp/nst/Green_Sea_Turtle_grazing_seagrass.jpg',\n", + " '/tmp/nst/Pillars_of_creation_2014_HST_WFC3-UVIS_full-res_denoised.jpg')" + ], + "execution_count": 0, + "outputs": [] + }, + { + "metadata": { + "id": "sElaeNX-4Vnc", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "## Key Takeaways\n", + "\n", + "### What we covered:\n", + "\n", + "* We built several different loss functions and used backpropagation to transform our input image in order to minimize these losses\n", + " * In order to do this we had to load in a **pretrained model** and use its learned feature maps to describe the content and style representation of our images.\n", + " * Our main loss functions were primarily computing the distance in terms of these different representations\n", + "* We implemented this with a custom model and **eager execution**\n", + " * We built our custom model with the Functional API \n", + " * Eager execution allows us to dynamically work with tensors, using a natural python control flow\n", + " * We manipulated tensors directly, which makes debugging and working with tensors easier. \n", + "* We iteratively updated our image by applying our optimizers update rules using **tf.gradient**. The optimizer minimized a given loss with respect to our input image. " + ] + }, + { + "metadata": { + "id": "U-y02GWonqnD", + "colab_type": "text" + }, + "cell_type": "markdown", + "source": [ + "\n", + "**[Image of Tuebingen](https://commons.wikimedia.org/wiki/File:Tuebingen_Neckarfront.jpg)** \n", + "Photo By: Andreas Praefcke [GFDL (http://www.gnu.org/copyleft/fdl.html) or CC BY 3.0 (https://creativecommons.org/licenses/by/3.0)], from Wikimedia Commons\n", + "\n", + "**[Image of Green Sea Turtle](https://commons.wikimedia.org/wiki/File:Green_Sea_Turtle_grazing_seagrass.jpg)**\n", + "By P.Lindgren [CC BY-SA 3.0 (https://creativecommons.org/licenses/by-sa/3.0)], from Wikimedia Commons\n", + "\n" + ] + }, + { + "metadata": { + "id": "IpUD9W6ZkeyM", + "colab_type": "code", + "colab": {} + }, + "cell_type": "code", + "source": [ + "" + ], + "execution_count": 0, + "outputs": [] + } + ] +} diff --git a/feature_matching_v3/eval_similarity_matrix.py b/feature_matching_v3/eval_similarity_matrix.py new file mode 100644 index 0000000..e4a8e7f --- /dev/null +++ b/feature_matching_v3/eval_similarity_matrix.py @@ -0,0 +1,85 @@ +from util_sift import load_sift, array_to_kp, kp_to_array +from util_matching import match +from util_sm import load_sm +from util_cv import match_to_cv +import numpy as np +import matplotlib.pyplot as plt +import matplotlib.patches as patches +import cv2 + +def display(s_idx, pw_idx): + plt.figure() + (im1, kp1, des1) = (s_im[s_idx], s_kp[s_idx], s_des[s_idx]) + (im2, kp2, des2) = (pw_im[pw_idx], pw_kp[pw_idx], pw_des[pw_idx]) + matches = match(kp1, des1, kp2, des2) + # Convert to OpenCV objects for viewing + matches = match_to_cv(matches) + kp1 = array_to_kp(kp1) + kp2 = array_to_kp(kp2) + s_plate = s_label[s_idx] + pw_plate = pw_label[pw_idx] + im_matches = cv2.drawMatches(im1, kp1, im2, kp2, matches, None, flags=cv2.DRAW_MATCHES_FLAGS_NOT_DRAW_SINGLE_POINTS) + s = '[CV] Matches between S%s & PW%s = %s' % (s_plate, pw_plate, str(len(matches))) + print(s) + plt.title(s) + plt.imshow(im_matches) + +#%% Load data +s_im, s_label, s_kp, s_des = load_sift('S_BB_V2_SIFT.npz') +pw_im, pw_label, pw_kp, pw_des = load_sift('PW_BB_V2_SIFT.npz') +pwi_im, pwi_label, pwi_kp, pwi_des = load_sift('PW_BB_V1_SIFT.npz') +sm_matches, sm_metric = load_sm('sm_v3', s_kp, pw_kp) + +#%% Only use Nissl PWs=[''=/= +idxs = pw_label[pwi_label-1]-1 +pw_im = pw_im[idxs] +pw_label = pw_label[idxs] +pw_kp = pw_kp[idxs] +pw_des = pw_des[idxs] +sm_matches = sm_matches[:,idxs] +sm_metric = sm_metric[:,idxs] + +sm_matches = sm_matches.astype(np.uint8) + +#%% Figure +fig, ax = plt.subplots() +ax.set_title('Similarity Matrix Visualization (v2)') +ax.imshow(sm_matches, cmap=plt.get_cmap('hot')) + +fig2, ax2 = plt.subplots() +while True: + plt.figure(1) + p = plt.ginput(n=1, timeout=0) + + if len(p) == 0: + break + + p = p[0] + (x, y) = (p[0], p[1]) + rect = patches.Rectangle((np.floor(x)+0.5, np.floor(y)-0.5), 0.5, 0.5, color='blue') + ax.add_patch(rect) + + s_idx = int(y) + pw_idx = int(x) + s_plate = s_label[s_idx] + pw_plate = pw_label[pw_idx] + + s = 'Matches between S%s & PW%s = %s' % (s_plate, pw_plate, sm_matches[s_idx,pw_idx]) + ax.set_title(s) + print(s, 'index', s_idx, pw_idx) + + plt.figure(2) + (im1, kp1, des1) = (s_im[s_idx], s_kp[s_idx], s_des[s_idx]) + (im2, kp2, des2) = (pw_im[pw_idx], pw_kp[pw_idx], pw_des[pw_idx]) + matches = match(kp1, des1, kp2, des2) + # Convert to OpenCV objects for viewing + matches = match_to_cv(matches) + kp1 = array_to_kp(kp1) + kp2 = array_to_kp(kp2) + im_matches = cv2.drawMatches(im1, kp1, im2, kp2, matches, None, flags=cv2.DRAW_MATCHES_FLAGS_NOT_DRAW_SINGLE_POINTS) + s = '[CV] Matches between S%s & PW%s = %s' % (s_plate, pw_plate, str(len(matches))) + print(s) + ax2.set_title(s) + ax2.imshow(im_matches) + +plt.title("Finished") \ No newline at end of file diff --git a/feature_matching_v3/exp_baseline.py b/feature_matching_v3/exp_baseline.py new file mode 100644 index 0000000..26dbb18 --- /dev/null +++ b/feature_matching_v3/exp_baseline.py @@ -0,0 +1,379 @@ +import numpy as np +import os +from PIL import Image +import pylab as plt +import cv2 + +np.set_printoptions(threshold=np.nan) +plt.gray() + +#%% Generation function +def to_gray(P): + return P.mean(axis=2) + +def generate_color(P1, P2, rstrides, cstrides, threshold): + P3 = np.zeros_like(P1) + rows = P1.shape[0] // rstrides + cols = P1.shape[1] // cstrides + + for ridx in range(rows): + rstart = ridx * rstrides + if ridx == rows - 1: + rend = P1.shape[0] + else: + rend = rstart + rstrides + + for cidx in range(cols): + cstart = cidx * cstrides + if cidx == cols - 1: + cend = P1.shape[1] + else: + cend = cstart + cstrides + + # Extract plate quadrants + q1 = P1[rstart:rend, cstart:cend, :] + q1 = q1.reshape(q1.shape[0] * q1.shape[1], 3) + + q2 = P2[rstart:rend, cstart:cend, :] + q2 = q2.reshape(q2.shape[0] * q2.shape[1], 3) + + # Calculate quadrant coverage + px_total = q1.shape[0] + z1 = np.sum(q1 < threshold) + z2 = np.sum(q2 < threshold) + coverage1 = z1 / px_total + coverage2 = z2 / px_total + coverage3 = (coverage1 + coverage2) / 2 + + # Create blank quadrant + q3 = np.zeros_like(q1) + q3[:, :] = 255 + + # Figure out how much we need to cover it + q3_pixels = int(px_total * coverage3) + + # Randomly select pixels to paint + idxs = np.random.choice(q3.shape[0], q3_pixels, True) + + # Paint by averaging the two image quadrants + q3[idxs, :] = (q1[idxs, :] + q2[idxs, :]) / 2 + # q3[idxs, :] = 0 + + # Reshape back into original form, add to output image + q3 = q3.reshape(rend-rstart, cend-cstart, 3) + P3[rstart:rend, cstart:cend, :] = q3 + + return P3 + + +def generate_gray(P1, P2, rstrides, cstrides, threshold, w1=0.5): + P3 = np.zeros_like(P1) + rows = P1.shape[0] // rstrides + cols = P1.shape[1] // cstrides + + for ridx in range(rows): + rstart = ridx * rstrides + if ridx == rows - 1: + rend = P1.shape[0] + else: + rend = rstart + rstrides + + for cidx in range(cols): + cstart = cidx * cstrides + if cidx == cols - 1: + cend = P1.shape[1] + else: + cend = cstart + cstrides + + # Extract plate quadrants + q1 = P1[rstart:rend, cstart:cend] + q1 = q1.reshape(q1.shape[0] * q1.shape[1]) + + q2 = P2[rstart:rend, cstart:cend] + q2 = q2.reshape(q2.shape[0] * q2.shape[1]) + + # Calculate quadrant coverage + px_total = q1.shape[0] + z1 = np.sum(q1 < threshold) + z2 = np.sum(q2 < threshold) + coverage1 = z1 / px_total + coverage2 = z2 / px_total + coverage3 = (coverage1 + coverage2) / 2 + + # Create blank quadrant + q3 = np.zeros_like(q1) + q3[:] = 255 + + # Figure out how much we need to cover it + q3_pixels = int(px_total * coverage3) + + # Randomly select pixels to paint + idxs = np.random.choice(q3.shape[0], q3_pixels, True) + + # Paint by averaging the two image quadrants + w2 = 1 - w1 + # q3[idxs] = (w1 * q1[idxs] + w2 * q2[idxs]) / 2 + q3[idxs] = 0 + + # Reshape back into original form, add to output image + q3 = q3.reshape(rend-rstart, cend-cstart) + P3[rstart:rend, cstart:cend] = q3 + + return P3 +#%% Load Image Files +print("Loading images") +WIDTH = 800 +HEIGHT = 400 +dir = 'C:/Users/xeroj/Dropbox/Training data sets - Khan-Fuentes/Paxinos and Watson, 2014 (7th Edition) Image set/' + +filename1 = os.path.join(dir, 'RBSC7-068.jpg') +filename2 = os.path.join(dir, 'RBSC7-070.jpg') + +im1 = Image.open(filename1) +im1 = im1.resize((WIDTH, HEIGHT), Image.LANCZOS) +P1 = np.array(im1, dtype=np.uint8) +P1 = P1[:, 0:P1.shape[1]//2, :] + +im2 = Image.open(filename2) +im2 = im2.resize((WIDTH, HEIGHT), Image.LANCZOS) +P2 = np.array(im2, dtype=np.uint8) +P2 = P2[:, 0:P2.shape[1]//2, :] + +P1_g = to_gray(P1) +P2_g = to_gray(P2) + +#%% Control points +print("Computing control points") +LEFT_PAD = 0 +RIGHT_PAD = 0 +COL_INTERVALS = 5 +CTRL_THRESHOLD = 200 +def get_controls(P): + w = P.shape[0] + h = P.shape[1] + ctrl_pts = [[0, 0], [w, 0], [0, h], [w, h]] + # Top to bottom + for col in range(LEFT_PAD, P.shape[1]-RIGHT_PAD, COL_INTERVALS): + for row in range(0, P.shape[0], 1): + if P[row,col] <= CTRL_THRESHOLD: + ctrl_pts.append([row, col]) + break + + # Bottom to top + for col in range(LEFT_PAD, P.shape[1]-RIGHT_PAD, COL_INTERVALS): + for row in range(P.shape[0]-1, 0, -1): + if P[row,col] <= CTRL_THRESHOLD: + ctrl_pts.append([row, col]) + break + + + return ctrl_pts + +src_pts = get_controls(P1_g) +dst_pts = get_controls(P2_g) + +size = min(len(src_pts), len(dst_pts)) +src_pts = src_pts[:size] +dst_pts = dst_pts[:size] + +#%% Visualize Control Points +print("Visualizing control points") +fig, ax = plt.subplots(nrows=1,ncols=2) +title = 'Control Points' +fig.suptitle(title, fontsize=22) + +ax[0].set_title('PW68') +ax[0].imshow(P1) + +ax[1].set_title('PW72') +ax[1].imshow(P2) + +for pt in src_pts: + ax[0].plot(pt[1], pt[0], marker='x', color='red', markersize=5) + +for pt in dst_pts: + ax[1].plot(pt[1], pt[0], marker='x', color='red', markersize=5) + +#%% SIFT computing +print("Computing SIFT features") +# SIFT = cv2.xfeatures2d.SIFT_create(contrastThreshold=0.02, edgeThreshold=100, sigma=2) +SIFT = cv2.xfeatures2d.SIFT_create() +kp1, des1 = SIFT.detectAndCompute(P1, None) +kp2, des2 = SIFT.detectAndCompute(P2, None) + +fig, ax = plt.subplots(nrows=1,ncols=2) +title = 'SIFT KeyPoints' +fig.suptitle(title, fontsize=22) + +ax[0].set_title('Plate 1') +ax[0].imshow(cv2.drawKeypoints(P1, kp1, None)) + +ax[1].set_title('Plate 2') +ax[1].imshow(cv2.drawKeypoints(P2, kp2, None)) + +#%% SIFT + Homography +# bf = cv2.BFMatcher() +# matches = bf.knnMatch(des1,des2, k=2) +# matches = np.asarray([m for m in matches if m[0].distance < 0.8*m[1].distance]) +# if len(matches[:,0]) >= 4: +# src = np.float32([ kp1[m.queryIdx].pt for m in matches[:,0] ]).reshape(-1,1,2) +# dst = np.float32([ kp2[m.trainIdx].pt for m in matches[:,0] ]).reshape(-1,1,2) +# H, masked = cv2.findHomography(src, dst, cv2.RANSAC, 50.0) +# im_match = cv2.drawMatches(P1, kp1, P2, kp2, matches[:,0], None, flags=2) +# plt.figure(1) +# plt.imshow(im_match) +# # dst = cv2.warpPerspective(P1,H,(P1.shape[1] + P2.shape[1], P2.shape[0])) + +#%% SIFT for warping +# for m in matches[:,0]: +# src_pts.append(kp1[m.queryIdx].pt) +# dst_pts.append(kp2[m.trainIdx].pt) +# +# src_pts = np.array(src_pts, dtype=np.float32) +# dst_pts = np.array(dst_pts, dtype=np.float32) + +#%% My Method +print("Performing my matching algorithm") +import util_matching, util_cv, util_sift +matches2 = util_matching.match(util_sift.kp_to_array(kp1), des1, util_sift.kp_to_array(kp2), des2) +matches2 = util_cv.match_to_cv(matches2) +im_match2 = cv2.drawMatches(P1, kp1, P1, kp2, matches2, None, flags=cv2.DRAW_MATCHES_FLAGS_NOT_DRAW_SINGLE_POINTS) +# plt.imshow(im_match2) + +#%% Mine for warping +print("Adding matching points for warping") +for m in matches2: + pt1 = kp1[m.queryIdx].pt + pt2 = kp2[m.trainIdx].pt + src_pts.append([pt1[1], pt1[0]]) + dst_pts.append([pt2[1], pt2[0]]) + +src_pts = np.array(src_pts, dtype=np.float32) +dst_pts = np.array(dst_pts, dtype=np.float32) + +#%% Warping +print("Warping") +from skimage.transform import warp, PiecewiseAffineTransform +tform = PiecewiseAffineTransform() +tform.estimate(src_pts, dst_pts) +im_warp1 = warp(P1_g, tform) + +tform = PiecewiseAffineTransform() +tform.estimate(dst_pts, src_pts) +im_warp2 = warp(P2_g, tform) +# +# pts1 = np.float32([[56, 65], [368, 52], [28, 387], [389, 390]]) +# pts2 = np.float32([[0, 0], [300, 0], [0, 300], [300, 300]]) +# M = cv2.getPerspectiveTransform(src_pts, dst_pts) +# wrp = cv2.warpAffine(P1.astype(np.int32), M, dsize=(P1.shape[0], P1.shape[1]), flags=cv2.INTER_LINEAR) + +#%% Warp Visualization +# fig, ax = plt.subplots(nrows=3,ncols=2) +# title = 'Warping' +# fig.suptitle(title, fontsize=22) +# +# ax[0,0].set_title('PW68') +# ax[0,0].imshow(cv2.drawKeypoints(P1, kp1, None)) +# +# ax[0,1].set_title('PW72') +# ax[0,1].imshow(cv2.drawKeypoints(P2, kp2, None)) +# +# ax[1,0].set_title('Match (SIFT + RANSAC)') +# ax[1,0].imshow(None) +# +# ax[1,1].set_title("Match (Mine)") +# ax[1,1].imshow(im_match2) +# +# ax[2,0].set_title('WARP1') +# ax[2,0].imshow(im_warp1) +# +# ax[2,1].set_title('WARP2') +# ax[2,1].imshow(im_warp2) + +#%% Calculation of Baseline & Figure +print("Generating P3 baseline") +rstrides = 2 +cstrides = 2 +threshold = 200 +im_src = im_warp1 +im_dst = im_warp2 +P3 = generate_gray(im_src, im_dst, rstrides, cstrides, threshold, 0.5) +plt.figure() +plt.imshow(P3) + +#%% P3 Visualization +print("Visualizing P3 results") +fig, ax = plt.subplots(nrows=1,ncols=3) +title = 'Intermediate Plate Generation Baseline' +fig.suptitle(title, fontsize=22) + +ax[0].set_title('Source') +ax[0].imshow(im_src) + +ax[1].set_title('Destination') +ax[1].imshow(im_dst) + +ax[2].set_title(str(rstrides) + ' by ' + str(cstrides)) +ax[2].imshow(P3) + +#%% +print("Blending") +plt.figure() +im_b1 = im_warp1 +im_b2 = im_warp2 +# im_b1 = to_gray((im_warp1 * 255).astype(np.uint8)) +# im_b2 = to_gray((im_warp2 * 255).astype(np.uint8)) +for w in np.linspace(0, 1, 10): + b1 = im_b1 * w + b2 = im_b2 * (1-w) + gen = b1 + b2 + plt.suptitle("Im1 Weight " + str(w)) + plt.imshow(gen) + plt.waitforbuttonpress() + +#%% Optical Flow +print("Optical Flow") +# params for ShiTomasi corner detection +feature_params = dict( maxCorners = 500, + qualityLevel = 0.3, + minDistance = 7, + blockSize = 7 ) +# Parameters for lucas kanade optical flow +lk_params = dict( winSize = (15,15), + maxLevel = 3, + criteria = (cv2.TERM_CRITERIA_EPS | cv2.TERM_CRITERIA_COUNT, 25, 0.03)) + +P1_C = cv2.imread('P1.png') +P2_C = cv2.imread('P2.png') + +P1_CG = cv2.cvtColor(P1_C, cv2.COLOR_BGR2GRAY) +P2_CG = cv2.cvtColor(P2_C, cv2.COLOR_BGR2GRAY) + +p0 = cv2.goodFeaturesToTrack(P1_CG, mask = None, **feature_params) +mask = np.zeros_like(P1) +# Create some random colors +color = np.random.randint(0,255,(100,3)) + +# calculate optical flow +p1, st, err = cv2.calcOpticalFlowPyrLK(P1_CG, P2_CG, p0, None, **lk_params) +# Select good points +good_new = p1[st == 1] +good_old = p0[st == 1] +# draw the tracks +for i, (new, old) in enumerate(zip(good_new, good_old)): + a, b = new.ravel() + c, d = old.ravel() + mask = cv2.line(mask, (a, b), (c, d), color[i].tolist(), 2) + frame = cv2.circle(P2, (a, b), 5, color[i].tolist(), -1) +img = cv2.add(frame, mask) +cv2.imshow('frame', img) + + + +#%% Generate many intermediate baselines and save as files +# t = 150 +# for r in range(1, 20, 1): +# for c in range(1, 20, 1): +# P = generate(P1, P2, r, c, t) +# filename = 'baseline/' + str(r) + ' by ' + str(c) + '.png' +# Image.fromarray(P).save(filename) diff --git a/feature_matching_v3/exp_baseline_manual.py b/feature_matching_v3/exp_baseline_manual.py new file mode 100644 index 0000000..cced869 --- /dev/null +++ b/feature_matching_v3/exp_baseline_manual.py @@ -0,0 +1,306 @@ +import numpy as np +import os +import pylab as plt +import cv2 +from skimage.transform import warp, PiecewiseAffineTransform +from PIL import Image +from timeit import default_timer as timer + +USE_SIFT = False +USE_OPTICALFLOW = False + +def load(filename): + WIDTH = 800 + HEIGHT = 400 + im = Image.open(filename) + im = im.resize((WIDTH, HEIGHT), Image.LANCZOS) + P = np.array(im, dtype=np.uint8) + return P[:, 0:P.shape[1] // 2, :] + +def to_gray(P): + return P.mean(axis=2) + +def get_controls(P): + LEFT_PAD = 0 + RIGHT_PAD = 0 + COL_INTERVALS = 5 + CTRL_THRESHOLD = 200 + w = P.shape[0] + h = P.shape[1] + ctrl_pts = [[0, 0], [w, 0], [0, h], [w, h]] + # Top to bottom + for col in range(LEFT_PAD, P.shape[1] - RIGHT_PAD, COL_INTERVALS): + for row in range(0, P.shape[0], 1): + if P[row, col] <= CTRL_THRESHOLD: + ctrl_pts.append([row, col]) + break + + # Bottom to top + for col in range(LEFT_PAD, P.shape[1] - RIGHT_PAD, COL_INTERVALS): + for row in range(P.shape[0] - 1, 0, -1): + if P[row, col] <= CTRL_THRESHOLD: + ctrl_pts.append([row, col]) + break + + return ctrl_pts + +#%% Load images +print("Loading images") +dir1 = 'C:/Users/xeroj/Dropbox/Training data sets - Khan-Fuentes/Paxinos and Watson, 2014 (7th Edition) Image set/' +dir2 = 'C:/Users/xeroj/Downloads/Processed' + +P1 = load(os.path.join(dir1, 'RBSC7-068.jpg')) +P2 = load(os.path.join(dir1, 'RBSC7-070.jpg')) + +PM1 = load(os.path.join(dir2, '18-016 LHA s4t2.tif')) +PM2 = load(os.path.join(dir2, '18-016 LHA s4t3.tif')) +PM3 = load(os.path.join(dir2, '18-016 LHA s4t4.tif')) + +#%% Plate selection +S1 = P1 +S2 = P2 + +#%% SIFT Stuff +if USE_SIFT: + #%% SIFT Features + print("Computing SIFT features") + # SIFT = cv2.xfeatures2d.SIFT_create(contrastThreshold=0.02, edgeThreshold=100, sigma=2) + SIFT = cv2.xfeatures2d.SIFT_create() + kp1, des1 = SIFT.detectAndCompute(S1, None) + kp2, des2 = SIFT.detectAndCompute(S2, None) + + #%% Matching (SIFT + Homography) + # bf = cv2.BFMatcher() + # matches = bf.knnMatch(des1,des2, k=2) + # matches = np.asarray([m for m in matches if m[0].distance < 0.9*m[1].distance]) + # if len(matches[:,0]) >= 4: + # src = np.float32([ kp1[m.queryIdx].pt for m in matches[:,0] ]).reshape(-1,1,2) + # dst = np.float32([ kp2[m.trainIdx].pt for m in matches[:,0] ]).reshape(-1,1,2) + # H, masked = cv2.findHomography(src, dst, cv2.RANSAC, 50.0) + # im_match = cv2.drawMatches(P1, kp1, P2, kp2, matches[:,0], None, flags=2) + # plt.figure() + # plt.imshow(im_match) + # + # for m in matches[:,0]: + # pt1 = kp1[m.queryIdx].pt + # pt2 = kp2[m.trainIdx].pt + # + # (x1, y1) = (pt1[1], pt1[0]) + # (x2, y2) = (pt2[1], pt2[0]) + # + # x1 = (x1 + x2) / 2 + # y1 = (y1 + y2) / 2 + # # x2 = (x1 + x2) / 2 + # # y2 = (y1 + y2) / 2 + # + # src_pts.append([x1, y1]) + # dst_pts.append([x2, y2]) + # + # src_pts = np.array(src_pts, dtype=np.float32) + # dst_pts = np.array(dst_pts, dtype=np.float32) + + #%% Matching (Mine) + import util_matching, util_cv, util_sift + src_pts = [[0, 0], [S1.shape[0], 0], [0, S1.shape[1]], [S1.shape[0], S1.shape[1]]] + dst_pts = [[0, 0], [S2.shape[0], 0], [0, S2.shape[1]], [S2.shape[0], S2.shape[1]]] + print("Performing my matching algorithm") + matches2 = util_matching.match(util_sift.kp_to_array(kp1), des1, util_sift.kp_to_array(kp2), des2) + matches2 = util_cv.match_to_cv(matches2) + im_match2 = cv2.drawMatches(S1, kp1, S1, kp2, matches2, None, flags=cv2.DRAW_MATCHES_FLAGS_NOT_DRAW_SINGLE_POINTS) + plt.figure(6) + plt.imshow(im_match2) + + print("Adding matching points for warping") + for m in matches2: + pt1 = kp1[m.queryIdx].pt + pt2 = kp2[m.trainIdx].pt + + (x1, y1) = (pt1[1], pt1[0]) + (x2, y2) = (pt2[1], pt2[0]) + + # x1 = (x1 + x2) / 2 + # y1 = (y1 + y2) / 2 + x2 = (x1 + x2) / 2 + y2 = (y1 + y2) / 2 + + src_pts.append([x1, y1]) + dst_pts.append([x2, y2]) + + src_pts = np.array(src_pts, dtype=np.float32) + dst_pts = np.array(dst_pts, dtype=np.float32) + + #%% Warping + print("Warping") + tform = PiecewiseAffineTransform() + e1 = tform.estimate(dst_pts, src_pts) + im_warp1 = warp(S1, tform) + im_warp1 = to_gray((im_warp1 * 255).astype(np.uint8)) + + tform = PiecewiseAffineTransform() + e2 = tform.estimate(src_pts, dst_pts) + im_warp2 = warp(S2, tform) + im_warp2 = to_gray((im_warp2 * 255).astype(np.uint8)) + + print("Cross-Dissolve") + im_gen = (im_warp1 * 0.5) + (im_warp2 * 0.5) + plt.figure(7) + plt.suptitle("SIFT Generated") + plt.imshow(im_gen, cmap='gray') + +#%% OF +if USE_OPTICALFLOW: + print("Optical Flow") + # params for ShiTomasi corner detection + feature_params = dict(maxCorners=500, + qualityLevel=0.3, + minDistance=7, + blockSize=7) + # Parameters for lucas kanade optical flow + lk_params = dict(winSize=(15, 15), + maxLevel=3, + criteria=(cv2.TERM_CRITERIA_EPS | cv2.TERM_CRITERIA_COUNT, 25, 0.03)) + + P1_C = cv2.imread('P1.png') + P2_C = cv2.imread('P2.png') + + P1_CG = cv2.cvtColor(P1_C, cv2.COLOR_BGR2GRAY) + P2_CG = cv2.cvtColor(P2_C, cv2.COLOR_BGR2GRAY) + + p0 = cv2.goodFeaturesToTrack(P1_CG, mask=None, **feature_params) + mask = np.zeros_like(P1) + # Create some random colors + color = np.random.randint(0, 255, (100, 3)) + + # calculate optical flow + p1, st, err = cv2.calcOpticalFlowPyrLK(P1_CG, P2_CG, p0, None, **lk_params) + # Select good points + good_new = p1[st == 1] + good_old = p0[st == 1] + # draw the tracks + for i, (new, old) in enumerate(zip(good_new, good_old)): + a, b = new.ravel() + c, d = old.ravel() + mask = cv2.line(mask, (a, b), (c, d), color[i].tolist(), 2) + frame = cv2.circle(P2, (a, b), 5, color[i].tolist(), -1) + img = cv2.add(frame, mask) + cv2.imshow('frame', img) + + src_pts = good_old + dst_pts = good_new + + #%% Warping + print("Warping") + tform = PiecewiseAffineTransform() + e1 = tform.estimate(dst_pts, src_pts) + im_warp1 = warp(P1, tform) + im_warp1 = to_gray((im_warp1 * 255).astype(np.uint8)) + + tform = PiecewiseAffineTransform() + e2 = tform.estimate(src_pts, dst_pts) + im_warp2 = warp(P2, tform) + im_warp2 = to_gray((im_warp2 * 255).astype(np.uint8)) + + print("Cross-Dissolve") + im_gen = (im_warp1 * 0.5) + (im_warp2 * 0.5) + plt.figure(7) + plt.suptitle("SIFT Generated") + plt.imshow(im_gen, cmap='gray') + + +#%% Stack + +S1 = np.array(Image.open('face.jpg')) +S2 = S1 +plt.figure(8) +plt.suptitle("Intermediate PM2") +plt.imshow(PM2) + +S1_pts = [[0, 0], [S1.shape[0], 0], [0, S1.shape[1]], [S1.shape[0], S1.shape[1]]] +S2_pts = [[0, 0], [S2.shape[0], 0], [0, S2.shape[1]], [S2.shape[0], S2.shape[1]]] + +HS1 = ((S1 * 0.8) + (S2 * 0.2)).astype(np.uint8) +HS2 = ((S1 * 0.2) + (S2 * 0.8)).astype(np.uint8) + +plt.figure(1) +plt.imshow(np.hstack((HS1, HS2))) +while True: + plt.figure(1) + plt.suptitle('Select point on left plate or press enter to generate warp with current points') + p1 = plt.ginput(n=1, timeout=0) + + if len(p1) == 0: + plt.suptitle("Generating warp with current points...") + + tform = PiecewiseAffineTransform() + e1 = tform.estimate(np.array(S2_pts), np.array(S1_pts)) + im_warp1 = warp(S1, tform) + im_warp1 = to_gray((im_warp1 * 255).astype(np.uint8)) + + tform = PiecewiseAffineTransform() + e2 = tform.estimate(np.array(S1_pts), np.array(S2_pts)) + im_warp2 = warp(S2, tform) + im_warp2 = to_gray((im_warp2 * 255).astype(np.uint8)) + + # plt.figure(2) + # plt.suptitle("Warps") + # plt.imshow(np.hstack((im_warp1, im_warp2)), cmap='gray') + + plt.figure(3) + plt.suptitle("Cross-dissolve") + im_gen = (im_warp1 * 0.5) + (im_warp2 * 0.5) + plt.imshow(im_gen, cmap='gray') + + continue + + c = np.random.uniform(0, 1, 3) + (x1, y1) = (p1[0][0], p1[0][1]) + l1 = plt.plot(x1, y1, marker='x', markersize=15, color=c) + plt.suptitle('Select point on right plate') + + p2 = plt.ginput(n=1, timeout=0) + if len(p2) == 0: + l1.pop(0).remove() + plt.suptitle("Breaking out of infinite loop") + break + + # Translate + (x2, y2) = (p2[0][0], p2[0][1]) + + # If you click on the right side + if x2 > S1.shape[0]: + x2 = x2 - S1.shape[0] + print("Right side click") + else: + print("Left side click") + + x2 = (x2 + x1) / 2 + y2 = (y2 + y1) / 2 + plt.plot(x2, y2, marker='x', markersize=15, color=c) + + S1_pts.append([x1, y1]) + S2_pts.append([x2, y2]) + print("Total points so far: ", len(S1_pts)) + # plt.figure(2) + # plt.imshow(S1) + # plt.plot(x1, y1, marker='x', markersize=5, color='red') + # + # plt.figure(3) + # plt.imshow(S2) + # plt.plot(x2, y2, marker='x', markersize=5, color='red') + + +#%% Z-Plane using built-in warping + + +#%% +# print("Blending") +# plt.figure() +# im_b1 = im_warp1 +# im_b2 = im_warp2 +# for w in np.linspace(0, 1, 20): +# b1 = im_b1 * w +# b2 = im_b2 * (1-w) +# gen = b1 + b2 +# plt.suptitle("Im1 Weight " + str(w)) +# plt.imshow(gen, cmap='gray') +# plt.waitforbuttonpress() \ No newline at end of file diff --git a/feature_matching_v3/exp_both.py b/feature_matching_v3/exp_both.py new file mode 100644 index 0000000..647f67c --- /dev/null +++ b/feature_matching_v3/exp_both.py @@ -0,0 +1,101 @@ +#%% Load Data +import numpy as np +import pylab as plt +import sys +from util_visualization import imshow_matches +from util_sm import load_sm, norm_sm, norm_prob_sm +from util_sift import precompute_sift, load_sift +from skimage import color + +b_s4 = np.loadtxt('Bregma_S4.csv', dtype=np.float, delimiter=',') +b_pw3 = np.loadtxt('Bregma_PW3_M.csv', dtype=np.float, delimiter=',') + +s_im, s_label, s_kp, s_des = load_sift('S_BB_V2_SIFT.npz') +pw_im, pw_label, pw_kp, pw_des = load_sift('PW_BB_V2_SIFT.npz') +pwi_im, pwi_label, pwi_kp, pwi_des = load_sift('PW_BB_V1_SIFT.npz') +sm_matches, sm_metric = load_sm('sm_v3', s_kp, pw_kp) + +# Only Nissl but using V2 dataset +b_pw3_im = [] +b_pw3_label = [] +b_pw3_kp = [] +b_pw3_des = [] +nop = [12, 14, 56, 76, 15, 17, 19, 21, 22, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, + 61, 63, 65, 67, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91,93,95,97,99,101,103,105,107,109,111,113,115,117,119, + 121,123,125,127,129,131,133,135,137,139,141,143,144,145,147,149,151,153,155] +for plate in pw_label: + if plate in nop: + continue + idx = plate - 1 + b_pw3_im.append(pw_im[idx]) + b_pw3_label.append(pw_label[idx]) + b_pw3_kp.append(pw_kp[idx]) + b_pw3_des.append(pw_des[idx]) + +pw_im = np.array(b_pw3_im) +pw_label = np.array(b_pw3_label) +pw_kp = np.array(b_pw3_kp) +pw_des = np.array(b_pw3_des) + +b_sm_matches = [] +b_sm_metric = [] +for plate in pw_label: + idx = plate - 1 + b_sm_matches.append(sm_matches[:,idx]) + b_sm_metric.append(sm_metric[:,idx]) + +sm_matches = np.array(b_sm_matches) +sm_metric = np.array(b_sm_metric) +# norm = norm_sm(sm_metric, 100) +norm = norm_prob_sm(sm_matches) + +#%% Bregma Algorithm +atlas1 = b_s4 +atlas2 = b_pw3 +M = np.zeros((atlas1.shape[0]+1, atlas2.shape[0])) +M[1:,:] = np.inf +DIR = np.zeros_like(M) +DIR[:,:] = 2 +for row in range(1, M.shape[0]): + for col in range(M.shape[1]): + if row > col: + continue + + choices = [M[row,col-1], # Left + M[row-1,col-1]+abs(atlas1[row-1] - atlas2[col])] # Diagonal + M[row][col] = min(choices) + DIR[row][col] = np.argmin(choices) + +M = M[1:,:] +DIR = DIR[1:,:] +#%% Path Backtracking +im = np.zeros((DIR.shape[0], DIR.shape[1], 3), dtype=np.uint8) +for row in range(DIR.shape[0]): + for col in range(DIR.shape[1]): + if row > col: + im[row, col] = [0, 100, 50] # Dark Green + elif DIR[row][col] == 0: # Left + im[row,col] = [200, 0, 0] # Red + elif DIR[row][col] == 1: # Diagonal + im[row, col] = [0, 255, 0] # Green + elif DIR[row][col] == 2: # Unused + im[row, col] = [0, 100, 50] # Dark Green + else: + im[row, col] = [0, 0, 0] # Black + +c = [148, 0, 211] # Purple +im[6-1][8-1] = c +im[11-1][11-1] = c +im[23-1][42-1] = c +im[33-1][68-1] = c +for row in range(DIR.shape[0]): + col = np.argmin(M[row]) + # PW8 S6, PW11 S11, PW42 S23, PW68 S33, + if (row == 6-1 and col == 8-1) or (row == 11-1 and col == 11-1) or (row == 23-1 and col == 42-1) or (row == 33-1 and col == 68-1): + im[row][col] = [255, 255, 255] # White + else: + im[row][col] = [0, 0, 255] # Blue + +fig, ax = plt.subplots() +ax.set_title("DIR - Best Path") +ax.imshow(im) \ No newline at end of file diff --git a/feature_matching_v3/exp_dynamic2.py b/feature_matching_v3/exp_dynamic2.py new file mode 100644 index 0000000..c3bc820 --- /dev/null +++ b/feature_matching_v3/exp_dynamic2.py @@ -0,0 +1,441 @@ +# Author: Jose G Perez +# Version 1.0 +# Last Modified: April 9, 2018 +import numpy as np +import pylab as plt +import cv2 +import os +from timeit import default_timer as timer +from multiprocessing.pool import Pool +from skimage import color +from util_sm import load_sm, norm_sm, norm_prob_sm +from util_sift import precompute_sift, load_sift, array_to_kp, kp_to_array +from bounding import process_plate +from util_matching import match + +#%% Load precomputed atlas information +precompute_sift('S_BB_V4', 'PW_BB_V4') +s_im, s_label, s_kp, s_des = load_sift('S_BB_V4_SIFT.npz') +pw_im, pw_label, pw_kp, pw_des = load_sift('PW_BB_V4_SIFT.npz') +sm_matches, sm_metric = load_sm('sm_v4', s_kp, pw_kp) + +#%% Figure Set-Ups +pw_ticks_idxs = [0] +pw_ticks_vals = [pw_label[0]] +for x in range(len(pw_label)): + try: + diff = pw_label[x + 1] - pw_label[x] + if diff > 1: + pw_ticks_idxs.append(x) + pw_ticks_vals.append(pw_label[x]) + # print("IDX: ", x, "DIFF:", diff) + except: + continue + +pw_ticks_idxs.append(len(pw_label) - 1) +pw_ticks_vals.append(pw_label[-1]) + +def figure_reg(): + fig, ax = plt.subplots() + ax.set_xlabel('PW Level') + ax.set_ylabel('S Level') + plt.setp(ax.get_xticklabels(), rotation=90, horizontalalignment='right') + plt.xticks(pw_ticks_idxs, pw_ticks_vals) + plt.yticks(np.arange(0, len(s_label)), np.arange(1, len(s_label) + 1)) + + for tick in ax.xaxis.get_major_ticks(): + tick.label.set_fontsize(8) + + for tick in ax.yaxis.get_major_ticks(): + tick.label.set_fontsize(8) + + return fig, ax + +def figure_exp(): + fig, ax = plt.subplots() + ax.set_xlabel('PW Plate') + ax.set_ylabel('EXP Plate') + plt.setp(ax.get_xticklabels(), rotation=90, horizontalalignment='right') + plt.xticks(pw_ticks_idxs, pw_ticks_vals) + plt.yticks([0, 1, 2, 3], ['s1t6', 's2t3', 's3t3', 's4t2']) + for tick in ax.xaxis.get_major_ticks(): + tick.label.set_fontsize(8) + + return fig, ax + +def figure_synth(): + fig, ax = plt.subplots() + ax.set_ylabel('PW Plate') + ax.set_xlabel('EXP Plate') + plt.setp(ax.get_xticklabels(), rotation=90, horizontalalignment='right') + plt.yticks(pw_ticks_idxs, pw_ticks_vals) + plt.xticks([0, 1, 2, 3], ['s1t6', 's2t3', 's3t3', 's4t2']) + for tick in ax.xaxis.get_major_ticks(): + tick.label.set_fontsize(8) + + return fig, ax + +#%% Functions +def visualize_dir(dir): + color_mask = np.zeros((dir.shape[0], dir.shape[1], 3), dtype=np.uint8) + color_mask[:, :] = [255, 255, 255] + for row in range(dir.shape[0]): + for col in range(dir.shape[1]): + val = dir[row, col] + if val == 0: # Col-1 + color = [255, 0, 0] + elif val == 1: # Diagonal + color = [0, 0, 255] + else: # Row-1 + color = [0, 255, 0] + + color_mask[row, col] = color + + return color_mask + +def brute_force(sm): + bg = sm.astype(np.uint8) + color_mask = np.zeros((sm.shape[0], sm.shape[1], 3)) + + for row in range(sm.shape[0]): + best_col = sm[row].argmax() + color_mask[row, best_col] = [0, 0, 255] + bg[row, best_col] = 255 + + img_color = np.stack((bg,) * 3, axis=2) + img_hsv = color.rgb2hsv(img_color) + color_mask_hsv = color.rgb2hsv(color_mask) + img_hsv[..., 0] = color_mask_hsv[..., 0] + img_hsv[..., 1] = color_mask_hsv[..., 1] + im_overlay = color.hsv2rgb(img_hsv) + return im_overlay + +def brute_force_t(sm): + bg = sm.astype(np.uint8) + color_mask = np.zeros((sm.shape[0], sm.shape[1], 3)) + + for col in range(sm.shape[1]): + best_row = sm[:, col].argmax() + color_mask[best_row, col] = [0, 0, 255] + bg[best_row, col] = 255 + + img_color = np.stack((bg,) * 3, axis=2) + img_hsv = color.rgb2hsv(img_color) + color_mask_hsv = color.rgb2hsv(color_mask) + img_hsv[..., 0] = color_mask_hsv[..., 0] + img_hsv[..., 1] = color_mask_hsv[..., 1] + im_overlay = color.hsv2rgb(img_hsv) + return im_overlay + +def dynamic_prog(sm, col_penalty, row_penalty): + ed = np.zeros((sm.shape[0]+1, sm.shape[1]+1)) + dir = np.zeros_like(ed) + ed[:,0] = np.arange(ed.shape[0]) * -row_penalty + ed[0,:] = np.arange(ed.shape[1]) * -col_penalty + # ed[:,0] = ed[0,:] = 0 + + for i in range(1,ed.shape[0]): + for j in range(1,ed.shape[1]): + choices = [ed[i,j-1] - col_penalty, # 0 = top + ed[i-1,j-1] + sm[i-1,j-1], # 1 = diagonal + ed[i-1,j] - row_penalty] # 2 = left + idx = np.argmax(choices) + dir[i,j]=idx + ed[i,j]=choices[idx] + return ed, dir.astype(np.uint8) + +def dynamic_prog_breg(sm, pw_penalty, s_penalty, b_s4, b_pw3): + ed = np.zeros((sm.shape[0]+1, sm.shape[1]+1)) + dir = np.zeros_like(ed) + + # Adjust bregma ranges so they are all negative + # b_s4 = b_s4 - b_s4.max() + # b_pw3 = b_pw3 - b_pw3.max() + + # Append 0th bregma + # b_s4 = np.insert(b_s4, 0, 0.001) + # b_pw3 = np.insert(b_pw3, 0, 0.001) + alpha = 1 + + ed[:,0] = np.arange(ed.shape[0]) * -s_penalty + ed[0,:] = np.arange(ed.shape[1]) * -pw_penalty + # ed[:,0] = ed[0,:] = 0 + + for i in range(1,ed.shape[0]): + for j in range(1,ed.shape[1]): + diff = np.abs(b_s4[i-1] - b_pw3[i-1]) + choices = [ed[i,j-1] - pw_penalty, # 0 = top + ed[i-1,j-1] + (1 * sm[i-1,j-1]) - (alpha * diff) , # 1 = diagonal + ed[i-1,j] - s_penalty] # 2 = left + idx = np.argmax(choices) + dir[i,j]=idx + ed[i,j]=choices[idx] + return ed, dir.astype(np.uint8) + +def bregma_space(dir, sm, b_s4, b_pw3): + fig, ax = plt.subplots() + ax.set_xlabel('S4 Bregma') + ax.set_ylabel('PW3 Bregma') + sidx = sm.shape[0] - 1 + pwidx = sm.shape[1] - 1 + while sidx >= 0 and pwidx >= 0: + s_breg = b_s4[sidx] + pw_breg = b_pw3[pwidx] + + ax.plot(s_breg, pw_breg, marker='o', markerSize=5, color='red') + next_dir = dir[sidx, pwidx] + if next_dir == 0: # Left + pwidx -= 1 + elif next_dir == 1: # Diagonal + sidx -= 1 + pwidx -= 1 + else: # Up + sidx -= 1 + + return fig, ax + +#%% Overlay Function +def overlay(dir, sm): + color_mask = np.zeros((dir.shape[0],dir.shape[1],3)) + # bg = np.zeros((dir.shape[0],dir.shape[1])) + # bg[1:,1:] = sm.astype(np.uint8) + bg = sm.astype(np.uint8) + + sidx = sm.shape[0]-1 + pwidx = sm.shape[1]-1 + count = 0 + path = ['START'] + pairs = [] + while sidx >= 0 and pwidx >= 0: + count += 1 + color_mask[sidx, pwidx] = [0, 0, 255] + # bg[sidx-1, pwidx-1] = 255 + bg[sidx, pwidx] = 255 + next_dir = dir[sidx, pwidx] + pairs.append([sidx, pwidx]) + if next_dir == 0: # Left + pwidx -= 1 + path.append('L') + elif next_dir == 1: # Diagonal + sidx -= 1 + pwidx -= 1 + path.append('D') + else: # Up + sidx -= 1 + path.append('U') + + # Remove penalty row/col + dir = dir[1:,1:] + color_mask = color_mask[1:,1:,:] + + # PW8 S6, PW11 S11, PW42 S23, PW68 S33, + if dir.shape[0] == 74: + color_mask[np.where(s_label == 6), np.where(pw_label == 8)] = [255, 0, 0] + bg[np.where(s_label == 6), np.where(pw_label == 8)] = 255 + + color_mask[np.where(s_label == 11), np.where(pw_label == 11)] = [255, 0, 0] + bg[np.where(s_label == 11), np.where(pw_label == 11)] = 255 + + color_mask[np.where(s_label == 23), np.where(pw_label == 42)] = [255, 0, 0] + bg[np.where(s_label == 23), np.where(pw_label == 42)] = 255 + + color_mask[np.where(s_label == 33), np.where(pw_label == 68)] = [255, 0, 0] + bg[np.where(s_label == 33), np.where(pw_label == 68)] = 255 + + print("path", count, path) + img_color = np.stack((bg,)*3,axis=2) + img_hsv = color.rgb2hsv(img_color) + color_mask_hsv = color.rgb2hsv(color_mask) + img_hsv[..., 0] = color_mask_hsv[..., 0] + img_hsv[..., 1] = color_mask_hsv[..., 1] + im_overlay = color.hsv2rgb(img_hsv) + return im_overlay, np.array(pairs) + +#%% Load Bregma data +b_s4 = np.loadtxt('Bregma_S4.csv', dtype=np.float, delimiter=',') +b_pw3 = np.loadtxt('Bregma_PW3_M.csv', dtype=np.float, delimiter=',') + +b_pw = [] +for i in range(len(pw_label)): + lbl = pw_label[i] + idx = lbl-1 + b_pw.append(b_pw3[idx]) + +b_pw3 = np.array(b_pw) + +#%% Brute Force Experiment +im_bf_overlay = brute_force(sm_matches) +fig, ax = figure_reg() +ax.set_title('Brute Force Overlay') +ax.imshow(im_bf_overlay) + +#%% Dynamic Programming (Bregma Distances) +ed_b, dir_b = dynamic_prog_breg(sm_matches, pw_penalty=50, s_penalty=50, b_s4=b_s4, b_pw3=b_pw3) +im_dpb_overlay, pairs_b = overlay(dir_b, sm_matches) +im_dir_b = visualize_dir(dir_b) + +fig, ax = figure_reg() +ax.set_title('Dynamic Prog (Bregma) - Overlay') +ax.imshow(im_dpb_overlay) + +fig, ax = figure_reg() +ax.set_title('Dynamic Prog (Bregma) - Dir [Red=Col-1, Blue=Diagonal, Green=Row-1]') +ax.imshow(im_dir_b) + +#%% Dynamic Programming (Regular) +mat = sm_matches +pw_penalty = 50 +s_penalty = 50 +ed, dir = dynamic_prog(mat, col_penalty=pw_penalty, row_penalty=s_penalty) +im_overlay, pairs = overlay(dir, mat) +im_dir = visualize_dir(dir) + +fig, ax = figure_reg() +ax.set_title('Dynamic Prog (Regular) - Overlay') +ax.imshow(im_overlay) + +fig, ax = figure_reg() +ax.set_title('Dynamic Prog (Regular) - Dir [Red=Col-1, Blue=Diagonal, Green=Row-1]') +ax.imshow(im_dir) + +#%% Bregma Space +fig, ax = bregma_space(dir, mat, b_s4, b_pw3) +ax.set_title('Bregma Space (Regular DP)') + +fig, ax = bregma_space(dir_b, sm_matches, b_s4, b_pw3) +ax.set_title('Bregma Space (Bregma Dist DP)') + +#%% Experimental data init +e1, e1_c = process_plate('experimental/18-016 LHA s1t6.tif', split=True) +e2, e2_c = process_plate('experimental/18-016 LHA s2t3.tif', split=True) +e3, e3_c = process_plate('experimental/18-016 LHA s3t3.tif', split=True) +e4, e4_c = process_plate('experimental/18-016 LHA s4t2.tif', split=True) + +exp = [e1_c, e2_c, e3_c, e4_c] +exp_kp = [] +exp_des = [] + +if not os.path.isfile('EXP_SIFT.npz'): + print("Precomputing and saving SIFT for experimental") + SIFT = cv2.xfeatures2d.SIFT_create(contrastThreshold=0.05, edgeThreshold=100, sigma=2) + for im_exp in exp: + kp, des = SIFT.detectAndCompute(im_exp, None) + kp = kp_to_array(kp) + + exp_kp.append(kp) + exp_des.append(des) + + exp_kp = np.asarray(exp_kp) + exp_des = np.asarray(exp_des) + + np.savez_compressed('EXP_SIFT', kp=exp_kp, des=exp_des) +else: + print("Loading pre-saved SIFT for experimental") + data = np.load('EXP_SIFT.npz') + exp_kp = data['kp'] + exp_des = data['des'] + +#%% Prepare to match with PW +def perform_match(idx): + global s_kp, s_des, pw_kp, pw_des, exp_kp, exp_des + matches = [] + print('EXP IDX', idx) + for pw_idx in range(pw_kp.shape[0]): + matches.append(match(exp_kp[idx], exp_des[idx], pw_kp[pw_idx], pw_des[pw_idx])) + + return np.array(matches) + # np.savez_compressed(str(idx) + '-EM', m=matches) + +#%% Match (Sequential) +if not os.path.isfile('EXP_SM.npz'): + print("Creating EXP SM") + time_start = timer() + sm_exp = [] + for i in range(len(exp)): + sm_exp.append(perform_match(i)) + + sm_exp = np.array(sm_exp) + duration = timer() - time_start + duration_m = duration / 60 + print("Matching took %.3fs %.3fm" % (duration, duration_m)) + np.savez_compressed('EXP_SM', sm=sm_exp) +else: + print("Loading pre-saved SM for experimental") + data = np.load('EXP_SM.npz') + sm_exp = data['sm'] + +sm_exp_count = np.zeros_like(sm_exp) +for row in range(sm_exp.shape[0]): + count = [] + for col in range(sm_exp.shape[1]): + matches = sm_exp[row,col] + count.append(len(matches)) + + sm_exp_count[row] = np.array(count) + +#%% Experimental matching with brute-force approach +bf_exp_overlay = brute_force(sm_exp_count) +fig, ax = plt.exp() +ax.set_title('Brute-Force Matching (SM-Exp)') +ax.imshow(bf_exp_overlay) + +#%% Experimental matching with dynamic programming +ed_e, dir_e = dynamic_prog(sm_exp_count, col_penalty=10, row_penalty=10) +im_overlay_e, pairs_e = overlay(dir_e, sm_exp_count) +im_dir_e = visualize_dir(dir_e) + +fig, ax = figure_exp() +ax.imshow(sm_exp_count.astype(np.uint8)) +ax.set_title('Similarity Matrix - Experimental') + +fig, ax = figure_exp() +ax.set_title('Dynamic Prog (Experimental) - Overlay') +ax.imshow(im_overlay_e) + +fig, ax = figure_exp() +ax.set_title('Dynamic Prog (Experimental) - Dir [Red=Col-1, Blue=Diagonal, Green=Row-1]') +ax.imshow(im_dir_e) + +#%% Synthetic +sm_synth = sm_exp_count +sm_synth[1,1] = 20 + +fig, ax = figure_synth() +ax.imshow(sm_synth.astype(np.uint8)) +ax.set_title('Similarity Matrix - Synthetic') + +#%% Synthetic Brute Force +bf_exp_overlay = brute_force(sm_synth) +fig, ax = figure_synth() +ax.set_title('Brute-Force Matching (SM-Exp)') +ax.imshow(bf_exp_overlay) + +#%% Synthetic Dynamic Programming +ed_s, dir_s = dynamic_prog(sm_synth, col_penalty=10, row_penalty=10) +im_overlay_s, pairs_s = overlay(dir_s, sm_synth) +im_dir_s = visualize_dir(dir_s) + +fig, ax = figure_synth() +ax.set_title('Dynamic Prog (Synthetic) - Overlay') +ax.imshow(im_overlay_s) + +fig, ax = figure_synth() +ax.set_title('Dynamic Prog (Synthetic) - Dir [Red=Col-1, Blue=Diagonal, Green=Row-1]') +ax.imshow(im_dir_s) + + +#%% Match (Threaded) +# TODO: Required to be in main function +# time_start = timer() +# +# pool = Pool() +# idx = range(im_exp.shape[0]) +# +# print('Beginning pool work: Matching experimental with atlas') +# pool.map(perform_match, idx) +# pool.close() +# pool.join() +# +# duration = timer() - time_start +# duration_m = duration / 60 +# print("Program took %.3fs %.3fm" % (duration, duration_m)) \ No newline at end of file diff --git a/feature_matching_v3/exp_dynamic_bregma.py b/feature_matching_v3/exp_dynamic_bregma.py new file mode 100644 index 0000000..d65735c --- /dev/null +++ b/feature_matching_v3/exp_dynamic_bregma.py @@ -0,0 +1,116 @@ +#%% Load Bregma Data +import numpy as np +import pylab as plt +from skimage import color +import sys + +from util_visualization import imshow_matches +from util_sm import load_sm, norm_sm, norm_prob_sm +from util_sift import precompute_sift, load_sift + +BREG = True + +s_im, s_label, s_kp, s_des = load_sift('S_BB_V2_SIFT.npz') +pw_im, pw_label, pw_kp, pw_des = load_sift('PW_BB_V2_SIFT.npz') +pwi_im, pwi_label, pwi_kp, pwi_des = load_sift('PW_BB_V1_SIFT.npz') +sm_matches, sm_metric = load_sm('sm_v3', s_kp, pw_kp) + +def norm_sm(sm, max_value=255, min_value=0): + sm[sm == np.inf] = sys.maxsize + im_result = np.zeros_like(sm) + for idx in range(sm.shape[0]): + x = sm[idx] + norm = ((x - np.min(x))*(max_value-min_value)) / (np.max(x)-np.min(x)) + min_value + im_result[idx] = (norm).reshape(1, sm.shape[1]) + return im_result + +np.set_printoptions(edgeitems=5) +b_s4 = np.loadtxt('Bregma_S4.csv', dtype=np.float, delimiter=',') +b_pw3 = np.loadtxt('Bregma_PW3.csv', dtype=np.float, delimiter=',') + + + +breg_1 = b_s4 +breg_2 = b_pw3 +# M = np.zeros((breg_1.shape[0]+1, breg_2.shape[0])) +M = np.zeros((breg_1.shape[0]+1, breg_2.shape[0])) +M[1:,:] = np.inf +DIR = np.zeros_like(M) +DIR[1:,:] = np.inf + + + +#%% Dynamic programming +for row in range(1, M.shape[0]): + for col in range(M.shape[1]): + if row > col: + continue + if BREG: + choices = [M[row,col-1], # Left + M[row-1,col-1]+abs(breg_1[row-1] - breg_2[col])] # Diagonal + M[row][col] = min(choices) + DIR[row][col] = np.argmin(choices) + else: + choices = [M[row,col-1], # Left + M[row-1,col-1] + sm_matches[row-1][col-1], # Diagonal + M[row-1][col-1] # Right + ] + M[row][col] = max(choices) + DIR[row][col] = np.argmax(choices) + + + +#%% Overlap +bg = norm_sm(M, 255).astype(np.uint8) +color_mask = np.zeros((DIR.shape[0], DIR.shape[1], 3)) +for row in range(1, M.shape[0]): + for col in range(M.shape[1]): + if row > col: + color_mask[row][col] = [255, 0, 0] +d_row = DIR.shape[0] - 1 +d_col = DIR.shape[1] - 1 +count = 0 +path = ['START'] +pairs = [] +if BREG: + while d_row != 0 and d_col != 0: + color_mask[d_row, d_col] = [0, 0, 255] + bg[d_row, d_col] = 255 + next_dir = DIR[d_row, d_col] + pairs.append([d_row, d_col]) + if next_dir == 0: + d_col -= 1 + path.append('L') + elif next_dir == 1: + d_row -= 1 + d_col -= 1 + path.append('D') +else: + while d_row != 0 and d_col != 0: + color_mask[d_row, d_col] = [0, 0, 255] + bg[d_row, d_col] = 255 + next_dir = DIR[d_row, d_col] + pairs.append([d_row, d_col]) + if next_dir == 0: + d_col -= 1 + path.append('L') + elif next_dir == 1: + d_row -= 1 + d_col -= 1 + path.append('D') + else: + d_row -= 1 + path.append("U") + +#%% Path Figure +print("path", count, path) +img_color = np.stack((bg,) * 3, axis=2) +img_hsv = color.rgb2hsv(img_color) +color_mask_hsv = color.rgb2hsv(color_mask) +img_hsv[..., 0] = color_mask_hsv[..., 0] +img_hsv[..., 1] = color_mask_hsv[..., 1] +im_overlay = color.hsv2rgb(img_hsv) +plt.figure() +plt.title("Bregma Overlay: " + str(BREG)) +plt.imshow(im_overlay) +plt.show() \ No newline at end of file diff --git a/feature_matching_v3/exp_dynamic_local_alignment.py b/feature_matching_v3/exp_dynamic_local_alignment.py new file mode 100644 index 0000000..76ad7d4 --- /dev/null +++ b/feature_matching_v3/exp_dynamic_local_alignment.py @@ -0,0 +1,196 @@ +#%% Experiment: Dynamic programming to align a sequence of plates to an atlas +# Author: Jose G. Perez +# Last Modified: March 28, 2020 +import numpy as np +import pylab as plt +import cv2 +import os +from timeit import default_timer as timer + +import util_sm +import util_sift +import util_matching +import util_visualization +import bounding + +PATH_CHARACTERS = ['', '↖', '↑', '←'] + +#%% Load atlas data +util_sift.precompute_sift('S_BB_V4', 'PW_BB_V4') +s_im, s_label, s_kp, s_des = util_sift.load_sift('S_BB_V4_SIFT.npz') +pw_im, pw_label, pw_kp, pw_des = util_sift.load_sift('PW_BB_V4_SIFT.npz') +sm_matches, sm_metric = util_sm.load_sm('sm_v4', s_kp, pw_kp) + +#%% Load local sequence data +e1, e1_c = bounding.process_plate('experimental/18-016 LHA s1t6.tif', split=True) +e2, e2_c = bounding.process_plate('experimental/18-016 LHA s2t3.tif', split=True) +e3, e3_c = bounding.process_plate('experimental/18-016 LHA s3t3.tif', split=True) +e4, e4_c = bounding.process_plate('experimental/18-016 LHA s4t2.tif', split=True) + +exp_filenames = ['s1t6', 's2t3', 's3t3', 's4t2'] +exp = [e1_c, e2_c, e3_c, e4_c] +exp_kp = [] +exp_des = [] + +if not os.path.isfile('EXP_SIFT.npz'): + print("Precomputing and saving SIFT for experimental dataset") + SIFT = cv2.xfeatures2d.SIFT_create(contrastThreshold=0.05, edgeThreshold=100, sigma=2) + for im_exp in exp: + kp, des = SIFT.detectAndCompute(im_exp, None) + kp = util_sift.kp_to_array(kp) + + exp_kp.append(kp) + exp_des.append(des) + + exp_kp = np.asarray(exp_kp) + exp_des = np.asarray(exp_des) + + np.savez_compressed('EXP_SIFT', kp=exp_kp, des=exp_des) +else: + print("Loading pre-saved SIFT for experimental") + data = np.load('EXP_SIFT.npz') + exp_kp = data['kp'] + exp_des = data['des'] + +#%% Compute similarity matrix between atlas (PW) and experimental sequence +def perform_match(idx): + global s_kp, s_des, pw_kp, pw_des, exp_kp, exp_des + matches = [] + print('EXP IDX', idx) + for pw_idx in range(pw_kp.shape[0]): + matches.append(util_matching.match(exp_kp[idx], exp_des[idx], pw_kp[pw_idx], pw_des[pw_idx])) + + return np.array(matches) + + +if not os.path.isfile('EXP_SM.npz'): + print("Creating atlas-experimental similarity matrix") + time_start = timer() + sm_exp = [] + for i in range(len(exp)): + sm_exp.append(perform_match(i)) + + sm_exp = np.array(sm_exp) + duration = timer() - time_start + duration_m = duration / 60 + print("Matching took %.3fs %.3fm" % (duration, duration_m)) + np.savez_compressed('EXP_SM', sm=sm_exp) +else: + print("Loading pre-saved SM for atlas-experimental") + data = np.load('EXP_SM.npz') + sm_exp = data['sm'] + +sm_atlas_experimental = np.zeros_like(sm_exp, dtype=np.uint8) +for row in range(sm_exp.shape[0]): + count = [] + for col in range(sm_exp.shape[1]): + matches = sm_exp[row,col] + count.append(len(matches)) + + sm_atlas_experimental[row] = np.array(count) + + +#%% Dynamic programming algorithm (Sequence to Atlas / Local Alignment) +def local_alignment(sm, col_penalty, row_penalty): + V = np.zeros((sm.shape[0]+1, sm.shape[1]+1)) + paths = np.zeros_like(V) + V[:, 0] = V[0, :] = 0 + + for i in range(1, V.shape[0]): + for j in range(1, V.shape[1]): + # 0 = Finish + # 1 = Diagonal / Match + # 2 = Up / Deletion + # 3 = Left / Insertion + choices = [0, + V[i-1, j-1] + sm[i-1, j-1], + V[i-1, j] - row_penalty, + V[i, j-1] - col_penalty, + ] + + idx = np.argmax(choices) + paths[i,j] = idx + V[i,j] = choices[idx] + + return V, paths.astype(np.uint8) + + +def reconstruct(sm, V, paths): + # Visualization + foreground = np.zeros((V.shape[0], V.shape[1], 3)) + background = V.astype(np.uint8) + + # For local alignment, pick the highest number in V + max_value = np.amax(V) + idxs = np.where(V == max_value) + start_row_idx = idxs[0][0] + start_col_idx = idxs[1][0] + + # Then backtrack until we hit a 0 + # We also keep backtracking until we reach the top-left corner + row_idx = start_row_idx + col_idx = start_col_idx + score = V[row_idx, col_idx] + + while row_idx > 0 or col_idx > 0: + # Paint the pixel we traveled to in the visualization + value = paths[row_idx, col_idx] + foreground[row_idx, col_idx] = [0, 0, 255] + background[row_idx, col_idx] = 255 + + # Navigate the dynamic programming table + diagonal = (value == 1) or (value == 0 and col_idx >= 1 and row_idx >= 1) + up = (value == 2) or (value == 0 and row_idx >= 1) + left = (value == 3) or (value == 0 and col_idx >= 1) + if diagonal: + row_idx -= 1 + col_idx -= 1 + elif up: + row_idx -= 1 + elif left: + col_idx -= 1 + + return util_visualization.overlay(background, foreground) + + +#%% Actual Experiment! +V, paths = local_alignment(sm_atlas_experimental, 1, 1) +im_overlay = reconstruct(sm_atlas_experimental, V, paths) + +#%% Figure 1: Atlas-Experimental Similarity Matrix +util_visualization.imshow_detailed( + np_arr=sm_atlas_experimental, + title='Atlas-Experimental Similarity Matrix', + axis_xlabel='PW Plate', + axis_ylabel='Experimental Plate', + xlabel_arr=['ε'] + pw_label, + ylabel_arr=['ε'] + exp_filenames) + +#%% Figure 2: DP Value Matrix (V) +util_visualization.imshow_detailed( + np_arr=V, + title='Atlas-Experimental Dynamic Programming Value Matrix', + axis_xlabel='PW Plate', + axis_ylabel='Experimental Plate', + xlabel_arr=['ε'] + pw_label, + ylabel_arr=['ε'] + exp_filenames) + +#%% Figure 3: DP Paths Matrix (With arrows!) +util_visualization.imshow_detailed( + np_arr=paths, + title='Atlas-Experimental Dynamic Programming Path', + axis_xlabel='PW Plate', + axis_ylabel='Experimental Plate', + xlabel_arr=['ε'] + pw_label, + ylabel_arr=['ε'] + exp_filenames, + value_to_str_func=lambda i, j, val: PATH_CHARACTERS[val]) + +#%% Figure 4: DP Path Backtracking Overlay +util_visualization.imshow_detailed( + np_arr=im_overlay, + title='Atlas-Experimental Dynamic Programming Overlay', + axis_xlabel='PW Plate', + axis_ylabel='Experimental Plate', + xlabel_arr=['ε'] + pw_label, + ylabel_arr=['ε'] + exp_filenames, + value_to_str_func=lambda i, j, val: int(V[i, j])) \ No newline at end of file diff --git a/feature_matching_v3/exp_dynamic_programming.py b/feature_matching_v3/exp_dynamic_programming.py new file mode 100644 index 0000000..12aa34f --- /dev/null +++ b/feature_matching_v3/exp_dynamic_programming.py @@ -0,0 +1,314 @@ +# Author: Jose G Perez +# Version 1.0 +# Last Modified: January 31, 2018 +import numpy as np +import pylab as plt +from skimage import color +from util_visualization import imshow_matches +from util_sm import load_sm, norm_sm, norm_prob_sm +from util_sift import precompute_sift, load_sift + +precompute_sift('S_BB_V4', 'PW_BB_V4') +s_im, s_label, s_kp, s_des = load_sift('S_BB_V4_SIFT.npz') +pw_im, pw_label, pw_kp, pw_des = load_sift('PW_BB_V4_SIFT.npz') +sm_matches, sm_metric = load_sm('sm_v4', s_kp, pw_kp) + +def idx_to_plate(labels, plate): + return np.where(labels == plate) + +def dynamic_prog(sm, pw_penalty, s_penalty): + ed = np.zeros((sm.shape[0]+1, sm.shape[1]+1)) + dir = np.zeros_like(ed) + ed[:,0] = np.arange(ed.shape[0]) * -s_penalty + ed[0,:] = np.arange(ed.shape[1]) * -pw_penalty + # ed[:,0] = ed[0,:] = 0 + + for i in range(1,ed.shape[0]): + for j in range(1,ed.shape[1]): + choices = [ed[i,j-1] - pw_penalty, # 0 = top + ed[i-1,j-1] + sm[i-1,j-1], # 1 = diagonal + ed[i-1,j] - s_penalty] # 2 = left + idx = np.argmax(choices) + dir[i,j]=idx + ed[i,j]=choices[idx] + return ed, dir.astype(np.uint8) + # return ed, dir.astype(np.uint8) + +def get_pairs(dir): + sidx = dir.shape[0]-1 + pwidx = dir.shape[1]-1 + pairs = [] + while sidx > 0 and pwidx > 0: + next_dir = dir[sidx, pwidx] + pairs.append([sidx, pwidx]) + if next_dir == 0: + sidx -= 1 + elif next_dir == 1: + sidx -= 1 + pwidx -= 1 + else: + pwidx -= 1 + return np.array(pairs) + +def pair_metric(sm_metric, pairs): + best6_pw = get_best_pw(sm_metric, pairs, 6) + best11_pw = get_best_pw(sm_metric, pairs, 11) + best23_pw = get_best_pw(sm_metric, pairs, 23) + best33_pw = get_best_pw(sm_metric, pairs, 33) + + # PW8 S6, PW11 S11, PW42 S23, PW68 S33, + # m += np.count_nonzero(best6_pw == np.where(pw_label == 8)) + # m += np.count_nonzero(best11_pw == np.where(pw_label == 11)) + # m += np.count_nonzero(best23_pw == np.where(pw_label == 42)) + # m += np.count_nonzero(best33_pw == np.where(pw_label == 68)) + return np.min(abs(best6_pw - np.where(pw_label == 8))) + \ + np.min(abs(best11_pw - np.where(pw_label == 11))) + \ + np.min(abs(best23_pw - np.where(pw_label == 42))) + \ + np.min(abs(best33_pw - np.where(pw_label == 68))) + +def overlay(dir, sm): + # bg = norm_sm(sm, 255).astype(np.uint8) + bg = sm.astype(np.uint8) + color_mask = np.zeros((dir.shape[0],dir.shape[1],3)) + + sidx = sm.shape[0]-1 + pwidx = sm.shape[1]-1 + count = 0 + path = ['START'] + pairs = [] + while sidx >= 0 and pwidx >= 0: + count += 1 + color_mask[sidx, pwidx] = [0, 0, 255] + bg[sidx, pwidx] = 255 + next_dir = dir[sidx, pwidx] + pairs.append([sidx, pwidx]) + if next_dir == 0: # Left + pwidx -= 1 + path.append('L') + elif next_dir == 1: # Diagonal + sidx -= 1 + pwidx -= 1 + path.append('D') + else: # Up + sidx -= 1 + path.append('U') + + # Remove penalty row/col + dir = dir[1:,1:] + color_mask = color_mask[1:,1:,:] + + # PW8 S6, PW11 S11, PW42 S23, PW68 S33, + color_mask[np.where(s_label == 6), np.where(pw_label == 8)] = [255, 0, 0] + bg[np.where(s_label == 6), np.where(pw_label == 8)] = 255 + + color_mask[np.where(s_label == 11), np.where(pw_label == 11)] = [255, 0, 0] + bg[np.where(s_label == 11), np.where(pw_label == 11)] = 255 + + color_mask[np.where(s_label == 23), np.where(pw_label == 42)] = [255, 0, 0] + bg[np.where(s_label == 23), np.where(pw_label == 42)] = 255 + + color_mask[np.where(s_label == 33), np.where(pw_label == 68)] = [255, 0, 0] + bg[np.where(s_label == 33), np.where(pw_label == 68)] = 255 + + print("path", count, path) + img_color = np.stack((bg,)*3,axis=2) + img_hsv = color.rgb2hsv(img_color) + color_mask_hsv = color.rgb2hsv(color_mask) + img_hsv[..., 0] = color_mask_hsv[..., 0] + img_hsv[..., 1] = color_mask_hsv[..., 1] + im_overlay = color.hsv2rgb(img_hsv) + return im_overlay, np.array(pairs) + +def error(best_pw, pw_plate, s_plate): + # s_idx = int(np.argwhere(s_label == s_plate)) + pw_idx = int(np.argwhere(pw_label == pw_plate)) + pred_sidx = best_pw[pw_idx] + pred_s = int(np.argwhere(s_label == pred_sidx)) + + return abs(pred_s - s_plate) + +def get_best_pw(sm_metric, pairs, s_plate): + # Indices start at 0, plates start at 1 + sidx = s_plate-1 + + pidx = np.where(pairs[:, 0] == sidx) + matches = pairs[pidx, 1].flatten() + # return pw_label[matches] if len(matches >= 1) else -1 + return pw_label[matches] if len(matches >= 1) else np.array([np.inf]) + # if len(matches) > 1: + # metrics = sm_metric[sidx,matches] + # best_idx = np.argmax(metrics) + # return int(pw_label[matches[best_idx]]) + # elif len(matches) == 1: + # # Convert from PW Indices to PW Labels + # return int(pw_label[matches]) + # else: + # return -1 + +if __name__ == '__main__': + # lowest_error = np.inf + # best_pw = -1 + # best_s = -1 + # for pw_penalty in np.arange(0.4, 0.5, 0.001): + # for s_penalty in np.arange(0.4, 0.5, 0.001): + # ed, dir = dynamic_prog(norm, pw_penalty=pw_penalty, s_penalty=s_penalty) + # pairs = get_pairs(dir) + # metric = pair_metric(sm_metric, pairs) + # if metric < lowest_error: + # print("New error", metric, pw_penalty, s_penalty) + # lowest_error = metric + # best_pw = pw_penalty + # best_s = s_penalty + # ed, dir = dynamic_prog(norm, pw_penalty=best_pw, s_penalty=best_s) + # im_overlay, pairs = overlay(dir, sm_metric) + # best6_pw = get_best_pw(sm_metric,pairs,6) + # best11_pw = get_best_pw(sm_metric,pairs,11) + # best23_pw = get_best_pw(sm_metric,pairs,23) + # best33_pw = get_best_pw(sm_metric,pairs,33) + # print("[PW8=%s], [PW11=%s], [PW42=%s [PW68=%s]" % (best6_pw, best11_pw, best23_pw, best33_pw)) + # + # imshow_matches(im_overlay, 'Dynamic Programming') + + # import pylab as plt + # best_pw = 200 + # best_s = 220 + # ed, dir = dynamic_prog(norm, pw_penalty=best_pw, s_penalty=best_s) + # pairs = get_pairs(dir) + # metric = pair_metric(sm_metric, pairs) + # im_overlay, pairs = overlay(dir, sm_metric) + # best6_pw = get_best_pw(sm_metric,pairs,6) + # best11_pw = get_best_pw(sm_metric,pairs,11) + # best23_pw = get_best_pw(sm_metric,pairs,23) + # best33_pw = get_best_pw(sm_metric,pairs,33) + # print("[PW8=%s], [PW11=%s], [PW42=%s [PW68=%s]" % (best6_pw, best11_pw, best23_pw, best33_pw)) + # + # imshow_matches(im_overlay, 'Dynamic Programming') + # plt.show() + + # mat = sm_matches + # + # pw_penalty = 50 + # s_penalty = 50 + # ed, dir = dynamic_prog(mat, pw_penalty=pw_penalty, s_penalty=s_penalty) + # im_overlay, pairs = overlay(dir, mat) + # norm = norm_sm(mat) + # + # import pylab as plt + # fig, axes = plt.subplots(nrows=2, ncols=2) + # plt.subplots_adjust(left=0.25, bottom=0.25) + # plt.set_cmap(plt.get_cmap('hot')) + # # axes.set_title('Dynamic') + # + # axes[0,0].set_title('Similarity Matrix') + # axes[0,0].imshow(mat) + # + # axes[0,1].set_title('SM Norm') + # axes[0,1].imshow(norm_prob_sm(sm_matches)) + # + # axes[1,0].set_title('ED') + # axes[1,1].set_title('Overlay') + # + # # Sliders + # axcolor = 'lightgoldenrodyellow' + # axfreq = plt.axes([0.25, 0.1, 0.65, 0.03], facecolor=axcolor) + # axamp = plt.axes([0.25, 0.15, 0.65, 0.03], facecolor=axcolor) + # # s_pwp = plt.Slider(axfreq, 'PW Penalty', 0, 1, .0001, valfmt='%.8f') + # # s_sp = plt.Slider(axamp, 'S Penalty', 0, 1, .0001, valfmt='%.8f') + # s_pwp = plt.Slider(axfreq, 'PW Penalty', 0, 400, 10, valfmt='%.8f') + # s_sp = plt.Slider(axamp, 'S Penalty', 0, 400, 10, valfmt='%.8f') + # + # def update(val): + # pw_penalty = s_pwp.val + # s_penalty = s_sp.val + # + # ed, dir = dynamic_prog(mat, pw_penalty=pw_penalty, s_penalty=s_penalty) + # im_overlay, pairs = overlay(dir, mat) + # + # best6_pw = get_best_pw(sm_metric,pairs,6) + # best11_pw = get_best_pw(sm_metric,pairs,11) + # best23_pw = get_best_pw(sm_metric,pairs,23) + # best33_pw = get_best_pw(sm_metric,pairs,33) + # print("[PW8=%s], [PW11=%s], [PW42=%s [PW68=%s]" % (best6_pw, best11_pw, best23_pw, best33_pw)) + # + # axes[1,0].imshow(ed) + # axes[1,1].imshow(im_overlay) + # fig.canvas.draw_idle() + # + # s_pwp.on_changed(update) + # s_sp.on_changed(update) + # plt.show() + + #%% Runtime Experiments + mat = sm_matches + pw_penalty = 50 + s_penalty = 50 + ed, dir = dynamic_prog(mat, pw_penalty=pw_penalty, s_penalty=s_penalty) + im_overlay, pairs = overlay(dir, mat) + + # Figure prep + pw_ticks_idxs = [0] + pw_ticks_vals = [pw_label[0]] + for x in range(len(pw_label)): + try: + diff = pw_label[x + 1] - pw_label[x] + if diff > 1: + pw_ticks_idxs.append(x) + pw_ticks_vals.append(pw_label[x]) + # print("IDX: ", x, "DIFF:", diff) + except: + continue + + pw_ticks_idxs.append(len(pw_label) - 1) + pw_ticks_vals.append(pw_label[-1]) + + # Figure + plt.figure() + ax = plt.gca() + ax.set_title('Dynamic Programming Back-Tracing') + plt.setp(ax.get_xticklabels(), rotation=90, horizontalalignment='right') + plt.imshow(im_overlay) + plt.xticks(pw_ticks_idxs, pw_ticks_vals) + plt.yticks(np.arange(0, len(s_label)), np.arange(1, len(s_label) + 1)) + + for tick in ax.xaxis.get_major_ticks(): + tick.label.set_fontsize(8) + + for tick in ax.yaxis.get_major_ticks(): + tick.label.set_fontsize(8) + + plt.xlabel('PW Level') + plt.ylabel('S Level') + + # best_pwp = 0 + # best_sps = 0 + # best_total = np.inf + # for pw_penalty in range(0, 200): + # for s_penalty in range(0, 200): + # ed, ed2 = dynamic_prog(norm, pw_penalty=pw_penalty, s_penalty=s_penalty) + # best_pw = s_label[np.argmin(ed, axis=0)] + # + # # PW8 S6, PW11 S11, PW42 S23, PW68 S33, + # e = error(best_pw, 68, 33) + \ + # error(best_pw, 11, 11) + \ + # error(best_pw, 42, 23) + \ + # error(best_pw, 68, 33) + # + # if e < best_total: + # print("New best total", e) + # best_total = e + # best_pwp = pw_penalty + # best_sps = s_penalty + + # best_pwp = 200 + # best_sps = 200 + # ed, ed2 = dynamic_prog(norm, pw_penalty=best_pwp, s_penalty=best_sps) + # im_overlay = overlay(ed, norm) + + # imshow_matches(dynamic_prog(norm, pw_penalty=1, s_penalty=1)[1], '') + # imshow_matches(overlay(dynamic_prog(sm_matches, 0.9, 0.1)[0], sm_matches), '') + + # aoi = ed[32:35, 38:41] + # best_s = pw_label[np.argmin(ed,axis=1)] + # print("PW68 best match", best_pw[np.where(pw_label==68)]) + # print("S33 best match", best_s[np.where(s_label==33)]) + diff --git a/Vision-Rat-Brain-F/cmatching.py b/feature_matching_v3/exp_match_details.py similarity index 68% rename from Vision-Rat-Brain-F/cmatching.py rename to feature_matching_v3/exp_match_details.py index f683711..7b6dbe6 100644 --- a/Vision-Rat-Brain-F/cmatching.py +++ b/feature_matching_v3/exp_match_details.py @@ -1,10 +1,14 @@ -# Author: Jose G Perez +# Author: Jose G Perez +# Version 1.0 +# Last Modified: January 31, 2018 import cv2 import numpy as np import pylab as plt from multiprocessing.pool import ThreadPool from timeit import default_timer as timer +from util_sift import load_sift +from util_matching import match_details INDIVIDUAL = False np.random.seed(1) @@ -58,73 +62,8 @@ def gallery(array, ncols=3): .reshape(height*nrows, width*ncols, intensity)) return result -def match(kp1, des1, kp2, des2): - matches = [] - stat_s_diff = set() - stat_d_dist = set() - stat_resp_kp1 = set() - stat_resp_kp2 = set() - stat_rad = set() - - for idx1 in range(len(kp1)): - kpa = kp1[idx1] - stat_resp_kp1.add(kpa.response) - if kpa.response < RESPONSE_THRESHOLD: - continue - - dpa = des1[idx1] - best_distance = float('inf') - best_idx2 = -1 - - for idx2 in range(len(kp2)): - kpb = kp2[idx2] - stat_resp_kp2.add(kpb.response) - if kpb.response < RESPONSE_THRESHOLD: - continue - dpb = des2[idx2] - - d_pt_squared = (kpb.pt[0] - kpa.pt[0]) ** 2 + (kpb.pt[1] - kpa.pt[1]) ** 2 - stat_rad.add(np.linalg.norm(np.array(kpb.pt)-np.array(kpa.pt))) - if d_pt_squared >= RADIUS_SQUARED: - continue - - scale_diff = abs(kpa.size - kpb.size) - stat_s_diff.add(scale_diff) - if scale_diff > SCALE_THRESHOLD: - continue - - d_des = np.linalg.norm(dpb - dpa) - stat_d_dist.add(d_des) - if d_des < best_distance: - best_distance = d_des - best_idx2 = idx2 - - if best_idx2 == -1 or best_distance > DISTANCE_THRESHOLD: - continue - - match = cv2.DMatch() - match.queryIdx = idx1 - match.imgIdx = idx1 - match.trainIdx = best_idx2 - match.distance = best_distance - matches.append(match) - - print("\t[ScaleD] Max %.3f, Min %.3f, Avg %.3f" % (max(stat_s_diff) , min(stat_s_diff), sum(stat_s_diff) / len(stat_s_diff))) - print("\t[DescD] Max %.3f, Min %.3f, Avg %.3f" % (max(stat_d_dist), min(stat_d_dist), sum(stat_d_dist) / len(stat_d_dist))) - print("\t[RespKp1] Max %.3f, Min %.3f, Avg %.3f" % (max(stat_resp_kp1), min(stat_resp_kp1), sum(stat_resp_kp1) / len(stat_resp_kp1))) - print("\t[RespKp2] Max %.3f, Min %.3f, Avg %.3f" % (max(stat_resp_kp2), min(stat_resp_kp2), sum(stat_resp_kp2) / len(stat_resp_kp2))) - print("\t[Rad] Max %.3f, Min %.3f, Avg %.3f" % (max(stat_rad), min(stat_rad), sum(stat_rad) / len(stat_rad))) - - # print("Total Matches", len(matches), "/", len(kp1) * len(kp2)) - return matches - -s_data = np.load('S_BB_V1.npz') -s_im = s_data['images'] -s_label = s_data['labels'] - -pw_data = np.load('PW_BB_V1.npz') -pw_im = pw_data['images'] -pw_label = pw_data['labels'] +s_im, s_label, s_kp, s_des = load_sift('S_BB_V1_SIFT.npz') +pw_im, pw_label, pw_kp, pw_des = load_sift('PW_BB_V1_SIFT.npz') time_start = timer() # ==== MATCHING SYSTEM BEGIN @@ -141,7 +80,12 @@ def match(kp1, des1, kp2, des2): kp1, des1 = SIFT.detectAndCompute(im1, None) kp2, des2 = SIFT.detectAndCompute(im2, None) - matches = match(kp1, des1, kp2, des2) + m, matches, stat_s_diff, stat_d_dist, stat_resp_kp1, stat_resp_kp2, stat_rad = match_details(kp1, des1, kp2, des2) + print("\t[ScaleD] Max %.3f, Min %.3f, Avg %.3f" % (max(stat_s_diff) , min(stat_s_diff), sum(stat_s_diff) / len(stat_s_diff))) + print("\t[DescD] Max %.3f, Min %.3f, Avg %.3f" % (max(stat_d_dist), min(stat_d_dist), sum(stat_d_dist) / len(stat_d_dist))) + print("\t[RespKp1] Max %.3f, Min %.3f, Avg %.3f" % (max(stat_resp_kp1), min(stat_resp_kp1), sum(stat_resp_kp1) / len(stat_resp_kp1))) + print("\t[RespKp2] Max %.3f, Min %.3f, Avg %.3f" % (max(stat_resp_kp2), min(stat_resp_kp2), sum(stat_resp_kp2) / len(stat_resp_kp2))) + print("\t[Rad] Max %.3f, Min %.3f, Avg %.3f" % (max(stat_rad), min(stat_rad), sum(stat_rad) / len(stat_rad))) # For comparison, the selected SIFT keypoints # BF = cv2.BFMatcher(normType=cv2.NORM_L2, crossCheck=True) @@ -179,8 +123,10 @@ def match(kp1, des1, kp2, des2): imshow(im_matches, 'New Matching') imshow(im_ransac, 'RANSAC') else: - im2 = pw_im[np.where(pw_label == 68)[0][0]] - kp2, des2 = SIFT.detectAndCompute(im2, None) + # im2 = pw_im[np.where(pw_label == 68)[0][0]] + pw_idx = 33 + im2 = pw_im[pw_idx] + (kp2, des2) = (pw_kp[pw_idx], pw_des[pw_idx]) all_matches = [] all_im = [] @@ -189,16 +135,26 @@ def match(kp1, des1, kp2, des2): cidx = 0 for sidx in range(25, 40): - if sidx == 32: - print('=[P]', end='') + # if sidx == 32: + # print('=[P]', end='') print("S", (sidx + 1), "CIDX", cidx) - im1 = s_im[sidx] - kp1, des1 = SIFT.detectAndCompute(im1, None) - matches = match(kp1, des1, kp2, des2) + (im1, kp1, des1) = (s_im[sidx], s_kp[sidx], s_des[sidx]) + m, matches, stat_s_diff, stat_d_dist, stat_resp_kp1, stat_resp_kp2, stat_rad = match_details(kp1, des1, kp2, + des2) + # print("\t[ScaleD] Max %.3f, Min %.3f, Avg %.3f" % ( + # max(stat_s_diff), min(stat_s_diff), sum(stat_s_diff) / len(stat_s_diff))) + # print("\t[DescD] Max %.3f, Min %.3f, Avg %.3f" % ( + # max(stat_d_dist), min(stat_d_dist), sum(stat_d_dist) / len(stat_d_dist))) + # print("\t[RespKp1] Max %.3f, Min %.3f, Avg %.3f" % ( + # max(stat_resp_kp1), min(stat_resp_kp1), sum(stat_resp_kp1) / len(stat_resp_kp1))) + # print("\t[RespKp2] Max %.3f, Min %.3f, Avg %.3f" % ( + # max(stat_resp_kp2), min(stat_resp_kp2), sum(stat_resp_kp2) / len(stat_resp_kp2))) + # print("\t[Rad] Max %.3f, Min %.3f, Avg %.3f" % (max(stat_rad), min(stat_rad), sum(stat_rad) / len(stat_rad))) + metric = len(matches) / (len(kp1) + len(kp2) - len(matches)) - print("\tMetric w/PW68 %.3f, Matches %d" % (metric, len(matches))) + print("\tMetric w/PW %s is %.3f, Matches %d" % (pw_idx, metric, len(matches))) all_matches.append(matches) all_im.append(im1) @@ -206,10 +162,10 @@ def match(kp1, des1, kp2, des2): all_des.append(des1) cidx += 1 - index = 7 - imshow(cv2.drawMatches(all_im[index], all_kp[index], im2, kp2, all_matches[index], None, flags=2), '[P]SW33') - index = 8 - imshow(cv2.drawMatches(all_im[index], all_kp[index], im2, kp2, all_matches[index], None, flags=2), 'SW34') + # index = 7 + # imshow(cv2.drawMatches(all_im[index], all_kp[index], im2, kp2, all_matches[index], None, flags=2), '[P]SW33') + # index = 8 + # imshow(cv2.drawMatches(all_im[index], all_kp[index], im2, kp2, all_matches[index], None, flags=2), 'SW34') duration = timer() - time_start print("Program took %.3fs" % duration) \ No newline at end of file diff --git a/feature_matching_v3/exp_match_individual.py b/feature_matching_v3/exp_match_individual.py new file mode 100644 index 0000000..c98deac --- /dev/null +++ b/feature_matching_v3/exp_match_individual.py @@ -0,0 +1,30 @@ +# Author: Jose G Perez +# Version 1.0 +# Last Modified: January 31, 2018 +import numpy as np +import pylab as plt +import cv2 + +from util_sift import array_to_kp, precompute_sift, load_sift +from util_matching import match +from util_cv import match_to_cv +from util_visualization import imshow + +precompute_sift('S_BB_V4', 'PW_BB_V4') +s_im, s_label, s_kp, s_des = load_sift('S_BB_V4_SIFT.npz') +pw_im, pw_label, pw_kp, pw_des = load_sift('PW_BB_V4_SIFT.npz') + +#%% +s_idx = 32 # np.where(s_label == 33)[0][0] +pw_idx = 36 # np.where(pw_label == 50)[0][0] +(im1, kp1, des1) = (s_im[s_idx], s_kp[s_idx], s_des[s_idx]) +(im2, kp2, des2) = (pw_im[pw_idx], pw_kp[pw_idx], pw_des[pw_idx]) +matches = match(kp1,des1,kp2,des2) +# Convert to OpenCV objects for viewing +matches = match_to_cv(matches) +kp1 = array_to_kp(kp1) +kp2 = array_to_kp(kp2) +im_matches = cv2.drawMatches(im1, kp1, im2, kp2, matches, None, flags=cv2.DRAW_MATCHES_FLAGS_NOT_DRAW_SINGLE_POINTS) +# plt.gray() +str = '%s Matches Between S%s and PW%s' % (len(matches), s_label[s_idx], pw_label[pw_idx]) +imshow(im_matches, str) \ No newline at end of file diff --git a/feature_matching_v3/exp_match_row.py b/feature_matching_v3/exp_match_row.py new file mode 100644 index 0000000..cfd7c33 --- /dev/null +++ b/feature_matching_v3/exp_match_row.py @@ -0,0 +1,42 @@ +# Author: Jose G Perez +# Version 1.0 +# Last Modified: January 31, 2018 +import numpy as np +import pylab as plt + +from util_matching import match +from util_sift import precompute_sift, load_sift + +precompute_sift('S_BB_V1', 'PW_BB_V1') +s_im, s_label, s_kp, s_des = load_sift('S_BB_V1_SIFT.npz') +pw_im, pw_label, pw_kp, pw_des = load_sift('PW_BB_V1_SIFT.npz') +# =======******* Row Testing [S33 and all PW] +# PW68 is IDX:39 +# matches = [] +# s_idx = np.where(s_label == 33)[0][0] +# (im1, kp1, des1) = (s_im[s_idx], s_kp[s_idx], s_des[s_idx]) +# for pw_idx in range(pw_im.shape[0]): +# print(pw_idx, '/', pw_im.shape[0]) +# (im2, kp2, des2) = (pw_im[pw_idx], pw_kp[pw_idx], pw_des[pw_idx]) +# m = match(kp1, des1, kp2, des2) +# matches.append(m) +# +# count = [] +# for match in matches: +# count.append(len(match)) +matches = [] +pw_idx = 33 +(im2, kp2, des2) = (pw_im[pw_idx], pw_kp[pw_idx], pw_des[pw_idx]) +for s_idx in range(s_im.shape[0]): + print(s_idx, '/', s_im.shape[0]) + (im1, kp1, des1) = (s_im[s_idx], s_kp[s_idx], s_des[s_idx]) + m = match(kp1, des1, kp2, des2) + matches.append(m) + +count = [] +for match in matches: + count.append(len(match)) +count_norm = np.array(count) / np.max(count) +count_im = (count_norm * 255).reshape(1, 73) +plt.gray() +plt.imshow(count_im) \ No newline at end of file diff --git a/feature_matching_v3/exp_match_thread.py b/feature_matching_v3/exp_match_thread.py new file mode 100644 index 0000000..280b759 --- /dev/null +++ b/feature_matching_v3/exp_match_thread.py @@ -0,0 +1,41 @@ +import numpy as np +from timeit import default_timer as timer +from multiprocessing.pool import Pool + +from util_ransac import perform_ransac +from util_matching import match +from util_sift import precompute_sift, load_sift + +RADIUS = 25 +RADIUS_SQUARED = RADIUS ** 2 +SCALE_THRESHOLD = 3 +DISTANCE_THRESHOLD = 200 +RESPONSE_THRESHOLD = 0.01 +precompute_sift('S_BB_V4', 'PW_BB_V4') +s_im, s_label, s_kp, s_des = load_sift('S_BB_V4_SIFT.npz') +pw_im, pw_label, pw_kp, pw_des = load_sift('PW_BB_V4_SIFT.npz') + +def perform_match(s_idx): + global s_kp, s_des, pw_kp, pw_des + matches = [] + print('s_idx', s_idx) + for pw_idx in range(pw_kp.shape[0]): + matches.append(match(s_kp[s_idx], s_des[s_idx], pw_kp[pw_idx], pw_des[pw_idx])) + + np.savez_compressed(str(s_idx) + '-M', m=matches) + +if __name__ == '__main__': + time_start = timer() + + pool = Pool() + s_idx = range(s_kp.shape[0]) + + print('Begin pool work') + pool.map(perform_match, s_idx) + # pool.map(perform_ransac, s_idx) + pool.close() + pool.join() + + duration = timer() - time_start + duration_m = duration / 60 + print("Program took %.3fs %.3fm" % (duration, duration_m)) \ No newline at end of file diff --git a/feature_matching_v3/exp_matching_new.py b/feature_matching_v3/exp_matching_new.py new file mode 100644 index 0000000..48e66b2 --- /dev/null +++ b/feature_matching_v3/exp_matching_new.py @@ -0,0 +1,75 @@ +#%% Load Data +import numpy as np +import pylab as plt +import sys +from util_visualization import imshow_matches +from util_sm import load_sm, norm_sm, norm_prob_sm +from util_sift import precompute_sift, load_sift +from skimage import color + +b_s4 = np.loadtxt('Bregma_S4.csv', dtype=np.float, delimiter=',') +b_pw3 = np.loadtxt('Bregma_PW3_M.csv', dtype=np.float, delimiter=',') + +s_im, s_label, s_kp, s_des = load_sift('S_BB_V2_SIFT.npz') +pw_im, pw_label, pw_kp, pw_des = load_sift('PW_BB_V2_SIFT.npz') +pwi_im, pwi_label, pwi_kp, pwi_des = load_sift('PW_BB_V1_SIFT.npz') +sm_matches, sm_metric = load_sm('sm_v3', s_kp, pw_kp) + +b_pw3_m = [] +for plate in pwi_label: + idx = plate - 1 + b_pw3_m.append(b_pw3[idx]) + +# Only Nissl bregmas +b_pw3 = np.array(b_pw3_m) + +#%% Bregma Algorithm +atlas1 = b_s4 +atlas2 = b_pw3 +M = np.zeros((atlas1.shape[0]+1, atlas2.shape[0]+1)) +M[1:,:] = np.inf +DIR = np.zeros_like(M) +DIR[:,:] = 2 +for row in range(1, M.shape[0]): + for col in range(1, M.shape[1]): + if row > col: + continue + + choices = [M[row,col-1], # Left + M[row-1,col-1]+abs(atlas1[row-1] - atlas2[col])] # Diagonal + M[row][col] = min(choices) + DIR[row][col] = np.argmin(choices) + +M = M[1:,:] +DIR = DIR[1:,:] +#%% Path Backtracking +im = np.zeros((DIR.shape[0], DIR.shape[1], 3), dtype=np.uint8) +for row in range(DIR.shape[0]): + for col in range(DIR.shape[1]): + if row > col: + im[row, col] = [0, 100, 50] # Dark Green + elif DIR[row][col] == 0: # Left + im[row,col] = [200, 0, 0] # Red + elif DIR[row][col] == 1: # Diagonal + im[row, col] = [0, 255, 0] # Green + elif DIR[row][col] == 2: # Unused + im[row, col] = [0, 100, 50] # Dark Green + else: + im[row, col] = [0, 0, 0] # Black + +c = [148, 0, 211] # Purple +im[6-1][8-1] = c +im[11-1][11-1] = c +im[23-1][42-1] = c +im[33-1][68-1] = c +for row in range(DIR.shape[0]): + col = np.argmin(M[row]) + # PW8 S6, PW11 S11, PW42 S23, PW68 S33, + if (row == 6-1 and col == 8-1) or (row == 11-1 and col == 11-1) or (row == 23-1 and col == 42-1) or (row == 33-1 and col == 68-1): + im[row][col] = [255, 255, 255] # White + else: + im[row][col] = [0, 0, 255] # Blue + +fig, ax = plt.subplots() +ax.set_title("DIR - Best Path") +ax.imshow(im) \ No newline at end of file diff --git a/feature_matching_v3/exp_planes.py b/feature_matching_v3/exp_planes.py new file mode 100644 index 0000000..445e88d --- /dev/null +++ b/feature_matching_v3/exp_planes.py @@ -0,0 +1,69 @@ +import numpy as np +import os +import pylab as plt +import cv2 +from skimage.transform import warp, PiecewiseAffineTransform +from PIL import Image +from timeit import default_timer as timer + +def load(filename): + WIDTH = 800 + HEIGHT = 400 + im = Image.open(filename) + im = im.resize((WIDTH, HEIGHT), Image.LANCZOS) + P = np.array(im, dtype=np.uint8) + return P[:, 0:P.shape[1] // 2, :] + +def to_gray(P): + return P.mean(axis=2) + + +#%% Load images +print("Loading images") +dir1 = 'C:/Users/xeroj/Dropbox/Training data sets - Khan-Fuentes/Paxinos and Watson, 2014 (7th Edition) Image set/' +dir2 = 'C:/Users/xeroj/Downloads/Processed' + +P1 = load(os.path.join(dir1, 'RBSC7-068.jpg')) +P2 = load(os.path.join(dir1, 'RBSC7-070.jpg')) +FACE = np.array(Image.open('face.jpg')) + +PM1 = load(os.path.join(dir2, '18-016 LHA s4t2.tif')) +PM2 = load(os.path.join(dir2, '18-016 LHA s4t3.tif')) +PM3 = load(os.path.join(dir2, '18-016 LHA s4t4.tif')) + +# data = np.load('P1P2.npz') +# S1_pts = data['src'] +# S2_pts = data['dst'] + +data = np.load('face.npz') +S1_pts = data['src'] +S2_pts = data['dst'] +S1 = FACE +S2 = FACE + +#%% Scipy Warping +tform = PiecewiseAffineTransform() +e1 = tform.estimate(np.array(S2_pts), np.array(S1_pts)) +im_warp1 = warp(S1, tform) +im_warp1 = to_gray((im_warp1 * 255).astype(np.uint8)) + +plt.figure() +plt.suptitle('warp') +plt.imshow(im_warp1) +#%% Inverse Warping with KNN Interpolation +src = S1 +dst = np.zeros_like(src) +for x in range(dst.shape[0]): + for y in range(dst.shape[1]): + cp_idx = np.argmin(np.sum((S1_pts - [x,y]) ** 2, axis=1)) + diff = [x,y] - S2_pts[cp_idx] + disp = S1_pts[cp_idx] - S2_pts[cp_idx] + dist = np.linalg.norm(diff) + w = np.exp(-dist/100) + (dx,dy) = (disp[0]*w, disp[1]*w) + u = min(int(round(x+dy)),dst.shape[0]-1) + v = min(int(round(y+dx)),dst.shape[1]-1) + dst[x,y] = src[u,v] + +plt.figure() +plt.imshow(dst) \ No newline at end of file diff --git a/feature_matching_v3/exp_profiling.py b/feature_matching_v3/exp_profiling.py new file mode 100644 index 0000000..fc466f5 --- /dev/null +++ b/feature_matching_v3/exp_profiling.py @@ -0,0 +1,150 @@ +import cProfile +import numpy as np +from timeit import default_timer as timer +import multiprocessing +from multiprocessing.pool import Pool +from util_sift import precompute_sift, load_sift +import itertools + +RADIUS = 25 +RADIUS_SQUARED = RADIUS ** 2 +SCALE_THRESHOLD = 3 +DISTANCE_THRESHOLD = 200 +RESPONSE_THRESHOLD = 0.01 +precompute_sift('S_BB_V1', 'PW_BB_V1') +s_im, s_label, s_kp, s_des = load_sift('S_BB_V1_SIFT.npz') +pw_im, pw_label, pw_kp, pw_des = load_sift('PW_BB_V1_SIFT.npz') + +(best_distance, best_idx2) = (float('inf'), -1) +def match_v3_helper2(kpa, dpa, kp2, des2, idx2): + global best_distance + kpb = kp2[idx2] + # (kpa_x, kpa_y, kpa_size, kpa_response, dpa) = (kpa[0], kpa[1], kpa[2], kpa[4], des1[idx1]) + # (kpb_x, kpb_y, kpb_size, kpb_response, dpb) = (kpb[0], kpb[1], kpb[2], kpb[4], des2[idx2]) + if kpb[4] < RESPONSE_THRESHOLD \ + or (kpb[0] - kpa[0]) ** 2 + (kpb[1] - kpa[1]) ** 2 >= RADIUS_SQUARED \ + or abs(kpa[2] - kpb[2]) > SCALE_THRESHOLD: + return + + # 3: Descriptor L2 Norm + d_des = np.linalg.norm(des2[idx2] - dpa) + if(d_des < best_distance): + best_distance = d_des + best_idx2 = idx2 + +def match_v3_helper(kp1, des1, kp2, des2, idx1): + global best_distance, best_idx2 + kpa = kp1[idx1] + if kpa[4] < RESPONSE_THRESHOLD: + return + + [match_v3_helper2(kpa, des1[idx1], kp2, des2, idx2) for idx2 in range(len(kp2))] + + if best_idx2 == -1 or best_distance > DISTANCE_THRESHOLD: + return + + return np.array([idx1, best_idx2, best_distance], dtype=np.int32) + +def match_v3(kp1, des1, kp2, des2): + matches = [match_v3_helper(kp1,des1,kp2,des2,idx1) for idx1 in range(len(kp1))] + +def match_v2_helper(kp1, des1, kp2, des2, idx1): + kpa = kp1[idx1] + (kpa_x, kpa_y, kpa_size, kpa_response, dpa) = (kpa[0], kpa[1], kpa[2], kpa[4], des1[idx1]) + (best_distance, best_idx2) = (float('inf'), -1) + + if kpa_response < RESPONSE_THRESHOLD: + return + + for idx2 in range(len(kp2)): + kpb = kp2[idx2] + (kpb_x, kpb_y, kpb_size, kpb_response, dpb) = (kpb[0], kpb[1], kpb[2], kpb[4], des2[idx2]) + if kpb_response < RESPONSE_THRESHOLD \ + or (kpb_x - kpa_x) ** 2 + (kpb_y - kpa_y) ** 2 >= RADIUS_SQUARED \ + or abs(kpa_size - kpb_size) > SCALE_THRESHOLD: + continue + + # 3: Descriptor L2 Norm + d_des = np.linalg.norm(dpb - dpa) + if d_des < best_distance: + best_distance = d_des + best_idx2 = idx2 + + if best_idx2 == -1 or best_distance > DISTANCE_THRESHOLD: + return + + return np.array([idx1, best_idx2, best_distance], dtype=np.int32) + +def match_v2(kp1, des1, kp2, des2): + matches = (match_v2_helper(kp1,des1,kp2,des2,idx1) for idx1 in range(len(kp1))) + +def match(kp1, des1, kp2, des2): + matches = [] + for idx1 in range(len(kp1)): + kpa = kp1[idx1] + (kpa_x, kpa_y, kpa_size, kpa_response, dpa) = (kpa[0], kpa[1], kpa[2], kpa[4], des1[idx1]) + (best_distance, best_idx2) = (float('inf'), -1) + + if kpa_response < RESPONSE_THRESHOLD: + return + + for idx2 in range(len(kp2)): + kpb = kp2[idx2] + (kpb_x, kpb_y, kpb_size, kpb_response, dpb) = (kpb[0], kpb[1], kpb[2], kpb[4], des2[idx2]) + if kpb_response < RESPONSE_THRESHOLD \ + or (kpb_x - kpa_x) ** 2 + (kpb_y - kpa_y) ** 2 >= RADIUS_SQUARED \ + or abs(kpa_size - kpb_size) > SCALE_THRESHOLD: + continue + + # 3: Descriptor L2 Norm + d_des = np.linalg.norm(dpb - dpa) + if d_des < best_distance: + best_distance = d_des + best_idx2 = idx2 + + if best_idx2 == -1 or best_distance > DISTANCE_THRESHOLD: + return + + matches.append(np.array([idx1, best_idx2, best_distance], dtype=np.int32)) + + return np.asarray(matches) + +def perform_match(s_idx): + global s_kp, s_des, pw_kp, pw_des + matches = [] + print('s_idx', s_idx) + for pw_idx in range(5): + matches.append(match(s_kp[s_idx], s_des[s_idx], pw_kp[pw_idx], pw_des[pw_idx])) + +def perform_match_v2(s_idx): + global s_kp, s_des, pw_kp, pw_des + matches = [] + print('s_idx', s_idx) + matches = [match(s_kp[s_idx], s_des[s_idx], pw_kp[pw_idx], pw_des[pw_idx]) for pw_idx in range(5)] + +def test(): + s_idx = 0 + return [match_v3(s_kp[s_idx], s_des[s_idx], pw_kp[pw_idx], pw_des[pw_idx]) for pw_idx in range(pw_kp.shape[0])] + +def perform_match_v3(s_idx): + global s_kp, s_des, pw_kp, pw_des + print('s_idx', s_idx) + # matches = (match(s_kp[s_idx], s_des[s_idx], pw_kp[pw_idx], pw_des[pw_idx]) for pw_idx in range(5)) + # matches = (match_v2(s_kp[s_idx], s_des[s_idx], pw_kp[pw_idx], pw_des[pw_idx]) for pw_idx in range(5)) + matches = (match_v3(s_kp[s_idx], s_des[s_idx], pw_kp[pw_idx], pw_des[pw_idx]) for pw_idx in range(pw_kp.shape[0])) + # np.savez_compressed(str(s_idx) + '-M', m=np.asarray(matches2)) + +if __name__ == '__main__': + print('Begin pool work') + pool = Pool() + # s_idx = range(2) + s_idx = range(s_kp.shape[0]) + time_start = timer() + # pool.map(perform_match, s_idx) + # pool.map(perform_match_v2, s_idx) + pool.map(perform_match_v3, s_idx) + time_end = timer() + pool.close() + pool.join() + duration = time_end - time_start + print("Program took %.3fs" % duration) \ No newline at end of file diff --git a/feature_matching_v3/exp_pwarp.py b/feature_matching_v3/exp_pwarp.py new file mode 100644 index 0000000..0c34e84 --- /dev/null +++ b/feature_matching_v3/exp_pwarp.py @@ -0,0 +1,79 @@ +import pylab as plt +import numpy as np +from PIL import Image +import time + +im = np.array(Image.open('face.jpg'), dtype=np.uint8) +(rows, cols, colors) = im.shape + +#%% Control point loading +data = np.load('face.npz') +src_pts = data['src'] +dst_pts = data['dst'] + +src_pts[0] = [0,0] +src_pts[1] = [im.shape[1], 0] +src_pts[2] = [0,im.shape[0]] +src_pts[3] = [im.shape[1], im.shape[0]] + +dst_pts[0] = [0,0] +dst_pts[1] = [im.shape[1], 0] +dst_pts[2] = [0,im.shape[0]] +dst_pts[3] = [im.shape[1], im.shape[0]] + + +plt.figure(1) +plt.imshow(im) +for i in range(len(src_pts)): + (x1,y1) = src_pts[i] + (x2,y2) = dst_pts[i] + plt.plot([x1,x2], [y1,y2], color='purple') + plt.plot(x1, y1, marker='x', markersize=3, color='blue') + plt.plot(x2, y2, marker='o', markersize=3, color='red') + +start = time.time() + +#%% Generate pixels coordinates in the destination image +dest_im = np.zeros(im.shape, dtype=np.uint8) +max_row = im.shape[0] - 1 +max_col = im.shape[1] - 1 +dest_rows = dest_im.shape[0] +dest_cols = dest_im.shape[1] + +# Painting outline of source image black, so out of bounds pixels can be painted black +im[0] = 0 +im[max_row] = 0 +im[:, 0] = 0 +im[:, max_col] = 0 + +# Generate pixel coordinates in the destination image +ind = np.arange(dest_rows * dest_cols) +row_vect = ind // dest_cols +col_vect = ind % dest_cols +coords = np.vstack((row_vect, col_vect)) + +# Computing pixel weights, pixels close to p[1] will have higher weights +dist = np.sqrt(np.square(p[1][1] - row_vect) + np.square(p[1][0] - col_vect)) +weight = np.exp(-dist / 100) # Constant needs to be tweaked depending on image size + +# Computing pixel weights, pixels close to p[1] will have higher weights +source_coords = np.zeros(coords.shape, dtype=np.int) +disp_r = (weight * (p[0][1] - p[1][1])).astype(int) +disp_c = (weight * (p[0][0] - p[1][0])).astype(int) +source_coords[0] = coords[0] + disp_r +source_coords[1] = coords[1] + disp_c + +# Fixing out-of-bounds coordinates +source_coords[source_coords < 0] = 0 +source_coords[0, source_coords[0] > max_row] = max_row +source_coords[1, source_coords[1] > max_col] = max_col + +dest_im = source_im[source_coords[0], source_coords[1], :].reshape(dest_rows, dest_cols, 3) + +plt.figure(2) +plt.imshow(dest_im) +plt.show() + +elapsed_time = time.time() - start +print('Elapsed time: {0:.2f} '.format(elapsed_time)) + diff --git a/feature_matching_v3/exp_sfn19.py b/feature_matching_v3/exp_sfn19.py new file mode 100644 index 0000000..15ff0ac --- /dev/null +++ b/feature_matching_v3/exp_sfn19.py @@ -0,0 +1,143 @@ +import numpy as np +import os +import pylab as plt +import cv2 +from skimage.transform import warp, PiecewiseAffineTransform +from PIL import Image +from timeit import default_timer as timer + +def load(filename, split=True): + WIDTH = 400 + HEIGHT = 400 + im = Image.open(filename) + im = im.resize((WIDTH, HEIGHT), Image.LANCZOS) + P = np.array(im, dtype=np.uint8) + if split: + return P[:, 0:P.shape[1] // 2, :] + else: + return P + +def to_gray(P): + return P.mean(axis=2) + + +#%% Load images +print("Loading images") +dir1 = r'C:\Users\xeroj\Dropbox\Training data sets - Khan-Fuentes\Paxinos and Watson, 2014 (7th Edition) Image set' +dir2 = r'C:\Users\xeroj\Desktop\Local_Schoolwork\_Research\CytoData - Processed' +dir3 = r'C:\Users\xeroj\Downloads\cne24381-sup-0011-suppinfo11\SI Folder 4 BM4 Nissls 300 dpi' + +P1 = load(os.path.join(dir1, 'RBSC7-068.jpg')) +P2 = load(os.path.join(dir1, 'RBSC7-070.jpg')) + +SW1 = load(os.path.join(dir3, 'Level 31 photo.tif'), False) +SW2 = load(os.path.join(dir3, 'Level 32 photo.tif'), False) +SW3 = load(os.path.join(dir3, 'Level 33 photo.tif'), False) + +PM1 = load(os.path.join(dir2, '18-016 LHA s4t2.tif')) +PM2 = load(os.path.join(dir2, '18-016 LHA s4t3.tif')) +PM3 = load(os.path.join(dir2, '18-016 LHA s4t4.tif')) + +#%% Plate selection +S1 = SW1 +S2 = SW3 + + +#%% Stack +plt.figure() +plt.gray() +plt.suptitle("Intermediate") +plt.imshow(SW2) + +S1_pts = [[0, 0], [S1.shape[0], 0], [0, S1.shape[1]], [S1.shape[0], S1.shape[1]]] +S2_pts = [[0, 0], [S2.shape[0], 0], [0, S2.shape[1]], [S2.shape[0], S2.shape[1]]] + +HS1 = ((S1 * 0.8) + (S2 * 0.2)).astype(np.uint8) +HS2 = ((S1 * 0.2) + (S2 * 0.8)).astype(np.uint8) + +# plt.figure() +# plt.suptitle("Originals") +# plt.imshow(np.hstack((S1, S2))) + +plt.figure() +plt.imshow(np.hstack((HS1, HS2))) +while True: + plt.figure(1) + plt.suptitle('Select point on left plate or press enter to generate warp with current points') + p1 = plt.ginput(n=1, timeout=0) + + if len(p1) == 0: + plt.suptitle("Generating warp with current points...") + + tform = PiecewiseAffineTransform() + e1 = tform.estimate(np.array(S2_pts), np.array(S1_pts)) + im_warp1 = warp(S1, tform) + # im_warp1 = to_gray((im_warp1 * 255).astype(np.uint8)) + im_warp1 = ((im_warp1 * 255).astype(np.uint8)) + + tform = PiecewiseAffineTransform() + e2 = tform.estimate(np.array(S1_pts), np.array(S2_pts)) + im_warp2 = warp(S2, tform) + # im_warp2 = to_gray((im_warp2 * 255).astype(np.uint8)) + im_warp2 = ((im_warp2 * 255).astype(np.uint8)) + + # plt.figure() + # plt.suptitle("Warps") + # plt.imshow(np.hstack((im_warp1, im_warp2)), cmap='gray') + + # plt.figure() + # plt.suptitle("Original Plate (Left), Warped Plate (Right)") + # plt.imshow(np.hstack((to_gray(S1), im_warp1)), cmap='gray') + # + # plt.figure() + # plt.suptitle("Original Plate (Left), Warped Plate (Right)") + # plt.imshow(np.hstack((to_gray(S2), im_warp2)), cmap='gray') + + plt.figure() + plt.suptitle("Cross-dissolve") + im_gen = (im_warp1 * 0.5) + (im_warp2 * 0.5) + plt.imshow(im_gen, cmap='gray') + + continue + + c = np.random.uniform(0, 1, 3) + (x1, y1) = (p1[0][0], p1[0][1]) + l1 = plt.plot(x1, y1, marker='x', markersize=10, markeredgewidth=5, color=c) + plt.suptitle('Select point on right plate') + + p2 = plt.ginput(n=1, timeout=0) + if len(p2) == 0: + l1.pop(0).remove() + plt.suptitle("Breaking out of infinite loop") + break + + # Translate + (x2, y2) = (p2[0][0], p2[0][1]) + xviz = x2 + yviz = y2 + + # If you click on the right side + if x2 > S1.shape[0]: + x2 = x2 - S1.shape[0] + print("Right side click") + else: + print("Left side click") + + # x2 = (x2 + x1) / 2 + # y2 = (y2 + y1) / 2 + + x2 = (x2 + x1) / 2 + y2 = (y2 + y1) / 2 + + plt.plot(xviz, yviz, marker='x', markersize=10, markeredgewidth=5, color=c) + + S1_pts.append([x1, y1]) + S2_pts.append([x2, y2]) + print("Total points so far: ", len(S1_pts)) + # plt.figure(2) + # plt.imshow(S1) + # plt.plot(x1, y1, marker='x', markersize=5, color='red') + # + # plt.figure(3) + # plt.imshow(S2) + # plt.plot(x2, y2, marker='x', markersize=5, color='red') \ No newline at end of file diff --git a/feature_matching_v3/exp_similarity_matrix.py b/feature_matching_v3/exp_similarity_matrix.py new file mode 100644 index 0000000..49205da --- /dev/null +++ b/feature_matching_v3/exp_similarity_matrix.py @@ -0,0 +1,80 @@ +# Author: Jose G Perez +# Version 1.0 +# Last Modified: January 31, 2018 +from util_visualization import imshow_matches +from util_sm import load_sm, norm_sm +from util_sift import precompute_sift, load_sift +import pylab as plt +import numpy as np +precompute_sift('S_BB_V4', 'PW_BB_V4') +s_im, s_label, s_kp, s_des = load_sift('S_BB_V4_SIFT.npz') +pw_im, pw_label, pw_kp, pw_des = load_sift('PW_BB_V4_SIFT.npz') + +# sm_v1_match, sm_v1_metric = load_sm('sm_v1', s_kp, pw_kp) +sm_matches, sm_metric = load_sm('sm_v4', s_kp, pw_kp) + +# imshow_matches(norm_sm(sm_v1_match), 'Experiment 1: Matches Count') +# imshow_matches(norm_sm(sm_v1_metric), 'Experiment 1: Metric') +# +# imshow_matches(norm_sm(sm_v2_match), 'Experiment 2: Matches Count') +# imshow_matches(norm_sm(sm_v2_metric), 'Experiment 2: Metric') + +#%% +pw_ticks_idxs = [0] +pw_ticks_vals = [pw_label[0]] +for x in range(len(pw_label)): + try: + diff = pw_label[x+1] - pw_label[x] + if diff > 1: + pw_ticks_idxs.append(x) + pw_ticks_vals.append(pw_label[x]) + # print("IDX: ", x, "DIFF:", diff) + except: + continue + +pw_ticks_idxs.append(len(pw_label)-1) +pw_ticks_vals.append(pw_label[-1]) + +#%% +plt.figure() +ax = plt.gca() +ax.set_title('Similarity Matrix (Matches)') +plt.setp(ax.get_xticklabels(), rotation=90, horizontalalignment='right') +plt.imshow(sm_matches) +plt.xticks(pw_ticks_idxs, pw_ticks_vals) +plt.yticks(np.arange(0, len(s_label)), np.arange(1, len(s_label)+1)) + +for tick in ax.xaxis.get_major_ticks(): + tick.label.set_fontsize(8) + +for tick in ax.yaxis.get_major_ticks(): + tick.label.set_fontsize(8) + # tick.label.set_rotation('vertical') + +plt.xlabel('PW Level') +plt.ylabel('S Level') +# heatmap = plt.pcolor(sm_matches) +colorbar = plt.colorbar() +colorbar.set_label('# of Matches') + +#%% +plt.figure() +ax = plt.gca() +ax.set_title('Similarity Matrix (Metric)') +plt.setp(ax.get_xticklabels(), rotation=90, horizontalalignment='right') +plt.imshow(sm_metric) +plt.xticks(pw_ticks_idxs, pw_ticks_vals) +plt.yticks(np.arange(0, len(s_label)), np.arange(1, len(s_label)+1)) + +for tick in ax.xaxis.get_major_ticks(): + tick.label.set_fontsize(8) + +for tick in ax.yaxis.get_major_ticks(): + tick.label.set_fontsize(8) + # tick.label.set_rotation('vertical') + +plt.xlabel('PW Level') +plt.ylabel('S Level') +# heatmap = plt.pcolor(sm_matches) +colorbar = plt.colorbar() +colorbar.set_label('Metric Value') \ No newline at end of file diff --git a/feature_matching_v3/exp_svg.py b/feature_matching_v3/exp_svg.py new file mode 100644 index 0000000..30586e2 --- /dev/null +++ b/feature_matching_v3/exp_svg.py @@ -0,0 +1,16 @@ +import numpy as np +import pylab as plt +from PIL import Image +import random +from svgpathtools import svg2paths2, wsvg +paths, attributes, svg_attributes = svg2paths2('Level33.svg') + +for i in range(len(attributes)): + attributes[i]['fill'] = "#%06x" % random.randint(0, 0xFFFFFF) + +#%% +wsvg(paths[0:5], attributes=attributes[0:5], svg_attributes=svg_attributes, filename='output.svg') + +#%% +for i in range(len(paths)): + wsvg(paths[i], attributes=[attributes[i]], svg_attributes=svg_attributes, filename='output'+str(i)+'.svg') \ No newline at end of file diff --git a/feature_matching_v3/experimental/18-016 LHA s1t6.tif b/feature_matching_v3/experimental/18-016 LHA s1t6.tif new file mode 100644 index 0000000..04cefcc Binary files /dev/null and b/feature_matching_v3/experimental/18-016 LHA s1t6.tif differ diff --git a/feature_matching_v3/experimental/18-016 LHA s2t3.tif b/feature_matching_v3/experimental/18-016 LHA s2t3.tif new file mode 100644 index 0000000..5e541ef Binary files /dev/null and b/feature_matching_v3/experimental/18-016 LHA s2t3.tif differ diff --git a/feature_matching_v3/experimental/18-016 LHA s3t3.tif b/feature_matching_v3/experimental/18-016 LHA s3t3.tif new file mode 100644 index 0000000..8d55c41 Binary files /dev/null and b/feature_matching_v3/experimental/18-016 LHA s3t3.tif differ diff --git a/feature_matching_v3/experimental/18-016 LHA s4t2.tif b/feature_matching_v3/experimental/18-016 LHA s4t2.tif new file mode 100644 index 0000000..7d97fa6 Binary files /dev/null and b/feature_matching_v3/experimental/18-016 LHA s4t2.tif differ diff --git a/feature_matching_v3/face.jpg b/feature_matching_v3/face.jpg new file mode 100644 index 0000000..b2ea370 Binary files /dev/null and b/feature_matching_v3/face.jpg differ diff --git a/feature_matching_v3/face.npz b/feature_matching_v3/face.npz new file mode 100644 index 0000000..876787a Binary files /dev/null and b/feature_matching_v3/face.npz differ diff --git a/feature_matching_v3/norm-M.npz b/feature_matching_v3/norm-M.npz new file mode 100644 index 0000000..cb7fead Binary files /dev/null and b/feature_matching_v3/norm-M.npz differ diff --git a/feature_matching_v3/norm.npz b/feature_matching_v3/norm.npz new file mode 100644 index 0000000..351bf91 Binary files /dev/null and b/feature_matching_v3/norm.npz differ diff --git a/feature_matching_v3/output.svg b/feature_matching_v3/output.svg new file mode 100644 index 0000000..ed454eb --- /dev/null +++ b/feature_matching_v3/output.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/feature_matching_v3/similarity_matrix.npz b/feature_matching_v3/similarity_matrix.npz new file mode 100644 index 0000000..16c418d Binary files /dev/null and b/feature_matching_v3/similarity_matrix.npz differ diff --git a/feature_matching_v3/slider.py b/feature_matching_v3/slider.py new file mode 100644 index 0000000..70e6cb8 --- /dev/null +++ b/feature_matching_v3/slider.py @@ -0,0 +1,48 @@ +import numpy as np +import matplotlib.pyplot as plt +from matplotlib.widgets import Slider, Button, RadioButtons + +fig, ax = plt.subplots() +plt.subplots_adjust(left=0.25, bottom=0.25) +t = np.arange(0.0, 1.0, 0.001) +a0 = 5 +f0 = 3 +s = a0*np.sin(2*np.pi*f0*t) +l, = plt.plot(t, s, lw=2, color='red') +plt.axis([0, 1, -10, 10]) + +axcolor = 'lightgoldenrodyellow' +axfreq = plt.axes([0.25, 0.1, 0.65, 0.03], facecolor=axcolor) +axamp = plt.axes([0.25, 0.15, 0.65, 0.03], facecolor=axcolor) + +sfreq = Slider(axfreq, 'Freq', 0.1, 30.0, valinit=f0) +samp = Slider(axamp, 'Amp', 0.1, 10.0, valinit=a0) + + +def update(val): + amp = samp.val + freq = sfreq.val + l.set_ydata(amp*np.sin(2*np.pi*freq*t)) + fig.canvas.draw_idle() +sfreq.on_changed(update) +samp.on_changed(update) + +resetax = plt.axes([0.8, 0.025, 0.1, 0.04]) +button = Button(resetax, 'Reset', color=axcolor, hovercolor='0.975') + + +def reset(event): + sfreq.reset() + samp.reset() +button.on_clicked(reset) + +rax = plt.axes([0.025, 0.5, 0.15, 0.15], facecolor=axcolor) +radio = RadioButtons(rax, ('red', 'blue', 'green'), active=0) + + +def colorfunc(label): + l.set_color(label) + fig.canvas.draw_idle() +radio.on_clicked(colorfunc) + +plt.show() diff --git a/feature_matching_v3/sm_matches.csv b/feature_matching_v3/sm_matches.csv new file mode 100644 index 0000000..a589f5f --- /dev/null +++ b/feature_matching_v3/sm_matches.csv @@ -0,0 +1,74 @@ +0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85 +1,16,8,1,1,0,1,0,0,0,0,1,0,1,0,0,0,0,0,2,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,1,0,0,0,0,1,2,0,0,0,0,1,0,0,1,0,3,4,4,2,1,1,1,2,0,0,3,0,1,4,8,0,8,14,5,4,4,1,0,0,0,0,0 +2,20,9,1,1,5,0,0,0,2,0,3,0,0,1,0,1,4,0,1,1,3,1,2,0,2,0,2,1,0,0,2,4,5,4,1,6,2,5,2,3,2,3,1,3,2,7,4,2,0,1,1,2,0,2,0,0,0,0,6,4,1,3,1,0,2,2,2,0,4,0,4,2,4,4,9,5,1,3,0,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1,3,3,4,3,1,2,3,0,1,1,0,0,3,0,0,0,2,4,0,4,1,0,0,0,0,2,1,1,0,1,0,0,0 +27,1,0,0,0,2,2,1,0,2,6,1,1,2,1,0,2,0,0,0,1,7,0,3,4,4,9,3,3,18,35,34,32,32,19,15,23,22,20,31,23,7,3,0,5,3,13,19,11,16,7,6,5,5,1,0,1,0,0,7,1,3,1,0,1,4,15,4,5,1,9,10,12,6,3,3,3,9,1,0,0,4,1,1,0,0 +28,0,0,0,0,0,0,0,0,1,1,0,0,0,1,0,1,0,0,0,0,4,0,2,0,0,5,1,0,4,8,24,33,31,24,32,37,17,12,20,8,11,7,12,4,3,6,8,13,11,10,3,0,1,1,2,3,1,0,9,0,5,8,2,6,2,7,4,2,2,8,14,14,9,8,9,0,8,2,0,0,1,0,4,0,0 +29,0,0,0,0,0,1,0,0,2,6,1,5,5,0,0,2,1,0,0,2,6,5,2,0,4,5,2,0,4,7,12,39,39,31,36,40,24,29,26,9,25,10,18,13,11,9,8,9,6,8,12,4,1,5,5,4,4,0,11,0,1,5,1,4,0,5,5,1,2,8,13,13,4,5,5,2,4,0,1,0,1,2,2,1,0 +30,0,0,0,0,0,1,1,0,1,0,0,1,1,1,0,2,0,0,0,3,10,3,5,0,5,4,6,2,5,13,18,45,53,57,68,60,47,42,45,14,43,26,29,26,9,7,7,11,11,9,7,0,1,1,1,3,0,0,17,4,8,8,5,8,3,16,12,3,3,8,10,17,11,9,23,7,10,3,1,0,4,0,4,0,0 +31,1,0,0,0,0,2,2,1,1,1,0,0,2,1,0,3,0,0,0,5,6,7,2,3,5,7,5,0,0,5,6,15,20,32,39,37,39,21,29,21,28,21,28,28,10,5,5,6,8,12,8,3,3,0,1,0,0,3,19,1,2,0,5,4,5,5,2,0,1,13,8,12,10,4,16,4,0,0,1,0,0,2,1,0,0 +32,0,1,0,0,0,2,2,1,0,3,0,2,1,1,0,3,0,0,0,3,5,5,0,3,3,8,2,3,1,1,11,15,19,24,38,39,50,39,38,23,32,21,24,20,13,14,8,13,11,8,8,1,6,3,6,3,1,2,12,8,2,3,9,3,3,9,4,0,5,10,11,20,13,4,23,3,4,0,0,0,1,3,1,0,0 +33,0,0,0,0,0,3,3,2,1,7,1,2,2,0,0,3,0,0,0,1,9,3,2,5,5,3,4,0,5,11,9,14,17,11,28,38,39,33,50,26,31,19,25,21,12,23,12,10,18,16,11,4,8,1,2,2,1,1,22,2,0,5,10,10,5,11,6,4,3,8,11,27,26,7,21,6,8,3,0,0,2,3,1,0,0 +34,0,3,2,1,0,2,6,2,3,13,1,2,6,0,1,4,0,1,0,2,3,3,0,3,2,7,2,3,2,16,16,29,20,14,30,35,37,51,75,83,99,74,83,63,42,34,21,11,15,14,6,2,5,2,5,1,2,5,20,9,8,1,11,12,5,14,5,5,11,28,18,31,28,13,38,5,4,3,0,0,2,11,2,0,1 +35,2,2,1,1,0,3,3,2,1,11,1,5,4,1,0,2,0,5,0,2,1,3,3,4,1,0,1,4,2,2,10,8,7,3,12,16,23,22,47,67,78,77,83,47,38,32,20,14,15,7,6,1,6,11,8,6,2,2,14,15,13,2,13,16,14,21,10,2,14,26,17,29,27,23,43,11,4,1,0,0,1,9,1,0,0 +36,2,0,0,0,4,2,3,4,4,8,0,3,7,1,0,3,0,0,0,1,1,7,0,6,1,4,3,3,2,10,5,10,7,9,16,20,20,22,30,19,48,79,82,64,44,37,24,8,12,7,9,2,11,9,17,5,2,2,3,12,6,18,18,15,15,9,6,1,20,36,18,20,22,8,28,2,0,0,0,0,8,9,1,0,0 +37,1,0,0,1,2,2,2,0,0,9,0,2,0,0,1,2,0,1,2,1,1,0,0,1,1,1,3,0,0,2,3,2,4,7,8,8,11,12,21,21,51,81,92,73,56,45,30,9,7,1,4,1,9,7,12,3,7,1,8,15,12,21,17,13,16,15,4,0,24,34,19,13,34,22,28,4,1,2,3,0,6,15,0,0,0 +38,0,0,0,1,0,5,3,4,7,8,0,5,7,3,0,4,0,2,1,0,2,0,1,7,2,3,2,2,1,8,3,1,2,2,5,12,18,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0,6,0,0,2,1,0,0,0,0,3,1,4,0,1,0,1,5,1,4,3,2,1,2,1,0,0,1,0,2,1,0,0,0,3,10,14,10,4,6,13,7,0,6,12,6,8,15,7,11,13,21,21,11,6,10,10,4,4,0,1,0 +51,4,4,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,3,0,1,0,0,0,0,0,0,2,1,0,0,0,0,1,2,4,8,4,5,5,7,4,7,10,7,5,3,2,0,2,3,2,0,0,0,4,4,11,27,39,24,12,16,6,3,10,3,14,8,19,19,12,24,41,26,16,18,9,13,0,3,2,0,0 +52,4,2,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,2,2,2,3,6,2,3,3,4,9,10,12,6,8,10,9,2,0,0,5,3,0,0,0,0,2,2,15,21,49,36,23,27,14,9,13,2,11,12,31,20,14,22,20,22,19,12,15,13,13,8,0,0,0 +53,0,1,0,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,3,8,4,8,7,9,3,3,4,4,13,7,8,9,11,7,4,1,0,1,1,2,0,0,0,0,1,3,9,23,46,41,39,39,18,22,6,6,6,12,33,23,27,25,34,10,10,10,2,8,2,6,0,0,0 +54,0,1,0,0,0,1,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,3,1,0,0,0,1,2,3,4,12,2,3,6,9,7,8,8,5,6,4,5,7,5,3,2,2,2,1,1,0,1,0,1,1,1,4,10,35,44,44,28,34,27,32,22,21,14,19,34,23,33,35,46,34,29,18,9,19,6,8,0,0,0 +55,0,0,0,2,0,0,2,2,0,0,0,0,1,0,0,0,0,0,0,1,0,0,1,1,0,0,0,0,1,2,6,9,5,7,2,5,3,3,3,4,3,1,0,2,1,2,1,3,3,1,1,1,0,1,2,0,1,1,6,6,8,20,25,32,21,15,14,9,9,17,11,13,20,15,24,15,13,5,2,5,0,4,0,1,0 +56,2,2,0,1,0,0,0,0,0,0,0,1,0,2,2,0,0,0,0,0,1,0,0,1,0,0,0,1,2,2,2,4,1,0,0,2,2,3,1,1,1,2,1,3,2,1,2,2,2,2,3,2,0,0,2,0,1,2,4,3,7,17,9,22,18,12,9,6,9,8,14,8,11,7,19,20,9,22,6,11,5,4,0,0,0 +57,1,0,0,1,0,0,0,0,0,0,1,0,1,1,1,0,0,2,1,2,0,1,1,2,0,0,0,0,0,4,2,4,2,1,0,1,1,0,2,1,2,0,2,0,2,4,3,1,2,2,2,0,1,0,1,0,1,3,3,20,13,14,1,16,27,25,10,17,12,16,23,13,12,16,24,24,16,21,7,16,7,9,0,0,0 +58,0,0,0,0,0,0,0,0,0,0,1,0,2,1,1,0,0,0,0,1,2,0,3,1,0,0,0,0,4,6,2,2,0,1,2,3,3,5,7,1,1,3,2,8,6,5,3,2,1,0,0,0,0,0,1,1,0,5,2,14,9,14,14,17,16,19,11,10,20,11,18,6,13,10,20,11,10,12,1,6,5,3,0,0,0 +59,0,2,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,1,2,0,6,1,0,0,0,0,1,3,3,4,0,2,5,8,5,6,6,0,1,6,3,14,11,2,1,0,1,0,0,0,1,0,0,0,1,4,6,13,12,20,15,23,12,17,16,18,25,13,36,21,14,11,16,19,13,16,4,11,8,7,0,0,0 +60,0,2,1,7,0,0,0,0,0,0,2,3,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,2,0,3,4,5,4,3,2,4,10,5,5,9,8,3,3,1,1,0,0,0,0,0,2,0,3,11,12,13,17,24,13,21,18,20,11,19,19,32,38,34,27,25,23,25,15,22,2,11,7,10,0,0,0 +61,2,11,6,2,0,0,1,0,0,0,7,1,2,0,0,1,1,2,1,0,0,0,0,0,1,0,0,0,1,8,4,5,1,1,9,10,8,3,2,2,8,1,7,6,8,3,1,3,1,0,2,1,0,0,1,1,4,14,27,58,51,20,8,17,19,21,10,17,14,49,107,98,55,63,39,34,23,23,3,17,2,4,0,0,0 +62,4,5,0,4,0,0,0,0,0,0,3,1,5,0,2,8,0,0,5,0,2,4,1,0,0,0,2,3,9,6,9,13,5,7,15,11,11,11,6,11,13,18,16,19,22,11,7,13,6,0,2,2,8,3,4,1,5,10,27,73,72,25,20,22,26,19,13,38,27,58,102,146,95,130,65,57,40,21,2,19,0,8,2,0,0 +63,6,12,3,6,0,0,0,1,0,0,0,0,3,1,0,4,4,2,4,1,1,7,0,0,0,0,0,2,7,0,2,11,0,7,8,6,3,8,4,6,5,5,4,7,4,2,3,5,7,1,0,1,3,2,2,1,0,21,25,41,31,32,13,25,15,19,23,22,18,27,58,60,78,107,70,45,40,13,2,13,5,8,0,1,0 +64,3,1,2,1,0,0,0,0,0,0,0,0,3,1,1,3,2,0,4,2,4,2,4,1,2,0,1,1,6,0,2,2,0,1,4,4,3,5,2,4,4,9,7,10,9,9,9,10,10,2,0,3,1,3,0,0,4,14,12,41,22,26,16,21,20,22,10,14,16,25,43,46,77,68,87,51,39,15,3,13,1,6,0,0,0 +65,1,7,0,2,0,0,0,1,0,0,1,2,3,2,2,5,0,1,5,1,3,2,5,0,2,0,0,1,3,0,3,6,3,8,13,10,0,4,4,2,3,4,4,0,1,3,1,6,3,2,1,1,7,1,2,0,3,9,10,44,39,31,9,12,19,17,17,30,22,17,43,56,46,52,84,87,47,38,10,32,4,10,0,1,0 +66,2,9,1,3,0,0,0,0,0,0,1,0,6,0,1,7,1,2,7,3,2,1,9,1,1,0,0,3,6,6,9,6,1,5,5,6,4,5,2,4,5,12,0,6,6,2,1,6,10,0,0,3,4,0,2,0,1,17,18,44,25,24,14,12,8,16,18,17,22,32,48,63,63,52,98,69,44,23,9,12,3,0,0,1,0 +67,1,8,6,2,0,0,0,0,0,0,3,1,4,1,4,4,3,1,2,2,0,2,10,0,0,0,3,4,3,2,5,1,0,0,1,2,0,4,1,4,5,6,2,6,1,0,0,1,5,0,0,0,1,1,1,0,5,18,22,47,50,33,6,27,16,13,21,25,21,28,71,63,56,55,68,62,61,40,7,16,12,9,0,0,0 +68,4,6,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,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 diff --git a/feature_matching_v3/sm_ransac/0-R.npz b/feature_matching_v3/sm_ransac/0-R.npz new file mode 100644 index 0000000..416a706 Binary files /dev/null and b/feature_matching_v3/sm_ransac/0-R.npz differ diff --git a/feature_matching_v3/sm_ransac/1-R.npz b/feature_matching_v3/sm_ransac/1-R.npz new file mode 100644 index 0000000..689bc1a Binary files /dev/null and b/feature_matching_v3/sm_ransac/1-R.npz differ diff --git a/feature_matching_v3/sm_ransac/10-R.npz b/feature_matching_v3/sm_ransac/10-R.npz new file mode 100644 index 0000000..fc18c98 Binary files /dev/null and b/feature_matching_v3/sm_ransac/10-R.npz differ diff --git a/feature_matching_v3/sm_ransac/11-R.npz b/feature_matching_v3/sm_ransac/11-R.npz new file mode 100644 index 0000000..8e412ef Binary files /dev/null and b/feature_matching_v3/sm_ransac/11-R.npz differ diff --git a/feature_matching_v3/sm_ransac/12-R.npz b/feature_matching_v3/sm_ransac/12-R.npz new file mode 100644 index 0000000..94ce9e4 Binary files /dev/null and b/feature_matching_v3/sm_ransac/12-R.npz differ diff --git a/feature_matching_v3/sm_ransac/13-R.npz b/feature_matching_v3/sm_ransac/13-R.npz new file mode 100644 index 0000000..596986b Binary files /dev/null and b/feature_matching_v3/sm_ransac/13-R.npz differ diff --git a/feature_matching_v3/sm_ransac/14-R.npz b/feature_matching_v3/sm_ransac/14-R.npz new file mode 100644 index 0000000..b5c1da1 Binary files /dev/null and b/feature_matching_v3/sm_ransac/14-R.npz differ diff --git a/feature_matching_v3/sm_ransac/15-R.npz b/feature_matching_v3/sm_ransac/15-R.npz new file mode 100644 index 0000000..da89f55 Binary files /dev/null and b/feature_matching_v3/sm_ransac/15-R.npz differ diff --git a/feature_matching_v3/sm_ransac/16-R.npz b/feature_matching_v3/sm_ransac/16-R.npz new file mode 100644 index 0000000..bc03c9d Binary files /dev/null and b/feature_matching_v3/sm_ransac/16-R.npz differ diff --git a/feature_matching_v3/sm_ransac/17-R.npz b/feature_matching_v3/sm_ransac/17-R.npz new file mode 100644 index 0000000..60759d3 Binary files /dev/null and b/feature_matching_v3/sm_ransac/17-R.npz differ diff --git a/feature_matching_v3/sm_ransac/18-R.npz b/feature_matching_v3/sm_ransac/18-R.npz new file mode 100644 index 0000000..480fd25 Binary files /dev/null and b/feature_matching_v3/sm_ransac/18-R.npz differ diff --git a/feature_matching_v3/sm_ransac/19-R.npz b/feature_matching_v3/sm_ransac/19-R.npz new file mode 100644 index 0000000..28baf96 Binary files /dev/null and b/feature_matching_v3/sm_ransac/19-R.npz differ diff --git a/feature_matching_v3/sm_ransac/2-R.npz b/feature_matching_v3/sm_ransac/2-R.npz new file mode 100644 index 0000000..f54c460 Binary files /dev/null and b/feature_matching_v3/sm_ransac/2-R.npz differ diff --git a/feature_matching_v3/sm_ransac/20-R.npz b/feature_matching_v3/sm_ransac/20-R.npz new file mode 100644 index 0000000..170aadc Binary files /dev/null and b/feature_matching_v3/sm_ransac/20-R.npz differ diff --git a/feature_matching_v3/sm_ransac/21-R.npz b/feature_matching_v3/sm_ransac/21-R.npz new file mode 100644 index 0000000..ed6f42c Binary files /dev/null and b/feature_matching_v3/sm_ransac/21-R.npz differ diff --git a/feature_matching_v3/sm_ransac/22-R.npz b/feature_matching_v3/sm_ransac/22-R.npz new file mode 100644 index 0000000..28282ac Binary files /dev/null and b/feature_matching_v3/sm_ransac/22-R.npz differ diff --git a/feature_matching_v3/sm_ransac/23-R.npz b/feature_matching_v3/sm_ransac/23-R.npz new file mode 100644 index 0000000..4bf46eb Binary files /dev/null and b/feature_matching_v3/sm_ransac/23-R.npz differ diff --git a/feature_matching_v3/sm_ransac/24-R.npz b/feature_matching_v3/sm_ransac/24-R.npz new file mode 100644 index 0000000..b3f722a Binary files /dev/null and b/feature_matching_v3/sm_ransac/24-R.npz differ diff --git a/feature_matching_v3/sm_ransac/25-R.npz b/feature_matching_v3/sm_ransac/25-R.npz new file mode 100644 index 0000000..8ac14d8 Binary files /dev/null and b/feature_matching_v3/sm_ransac/25-R.npz differ diff --git a/feature_matching_v3/sm_ransac/26-R.npz b/feature_matching_v3/sm_ransac/26-R.npz new file mode 100644 index 0000000..076f2c4 Binary files /dev/null and b/feature_matching_v3/sm_ransac/26-R.npz differ diff --git a/feature_matching_v3/sm_ransac/27-R.npz b/feature_matching_v3/sm_ransac/27-R.npz new file mode 100644 index 0000000..add9223 Binary files /dev/null and b/feature_matching_v3/sm_ransac/27-R.npz differ diff --git a/feature_matching_v3/sm_ransac/28-R.npz b/feature_matching_v3/sm_ransac/28-R.npz new file mode 100644 index 0000000..9044b27 Binary files /dev/null and b/feature_matching_v3/sm_ransac/28-R.npz differ diff --git a/feature_matching_v3/sm_ransac/29-R.npz b/feature_matching_v3/sm_ransac/29-R.npz new file mode 100644 index 0000000..7db09d6 Binary files /dev/null and b/feature_matching_v3/sm_ransac/29-R.npz differ diff --git a/feature_matching_v3/sm_ransac/3-R.npz b/feature_matching_v3/sm_ransac/3-R.npz new file mode 100644 index 0000000..f0dd4a1 Binary files /dev/null and b/feature_matching_v3/sm_ransac/3-R.npz differ diff --git a/feature_matching_v3/sm_ransac/30-R.npz b/feature_matching_v3/sm_ransac/30-R.npz new file mode 100644 index 0000000..4a38f8d Binary files /dev/null and b/feature_matching_v3/sm_ransac/30-R.npz differ diff --git a/feature_matching_v3/sm_ransac/31-R.npz b/feature_matching_v3/sm_ransac/31-R.npz new file mode 100644 index 0000000..bc1f10d Binary files /dev/null and b/feature_matching_v3/sm_ransac/31-R.npz differ diff --git a/feature_matching_v3/sm_ransac/32-R.npz b/feature_matching_v3/sm_ransac/32-R.npz new file mode 100644 index 0000000..df63675 Binary files /dev/null and b/feature_matching_v3/sm_ransac/32-R.npz differ diff --git a/feature_matching_v3/sm_ransac/33-R.npz b/feature_matching_v3/sm_ransac/33-R.npz new file mode 100644 index 0000000..d3e0479 Binary files /dev/null and b/feature_matching_v3/sm_ransac/33-R.npz differ diff --git a/feature_matching_v3/sm_ransac/34-R.npz b/feature_matching_v3/sm_ransac/34-R.npz new file mode 100644 index 0000000..260c854 Binary files /dev/null and b/feature_matching_v3/sm_ransac/34-R.npz differ diff --git a/feature_matching_v3/sm_ransac/35-R.npz b/feature_matching_v3/sm_ransac/35-R.npz new file mode 100644 index 0000000..02b21fd Binary files /dev/null and b/feature_matching_v3/sm_ransac/35-R.npz differ diff --git a/feature_matching_v3/sm_ransac/36-R.npz b/feature_matching_v3/sm_ransac/36-R.npz new file mode 100644 index 0000000..064a552 Binary files /dev/null and b/feature_matching_v3/sm_ransac/36-R.npz differ diff --git a/feature_matching_v3/sm_ransac/37-R.npz b/feature_matching_v3/sm_ransac/37-R.npz new file mode 100644 index 0000000..4d83fa6 Binary files /dev/null and b/feature_matching_v3/sm_ransac/37-R.npz differ diff --git a/feature_matching_v3/sm_ransac/38-R.npz b/feature_matching_v3/sm_ransac/38-R.npz new file mode 100644 index 0000000..8537739 Binary files /dev/null and b/feature_matching_v3/sm_ransac/38-R.npz differ diff --git a/feature_matching_v3/sm_ransac/39-R.npz b/feature_matching_v3/sm_ransac/39-R.npz new file mode 100644 index 0000000..a25761d Binary files /dev/null and b/feature_matching_v3/sm_ransac/39-R.npz differ diff --git a/feature_matching_v3/sm_ransac/4-R.npz b/feature_matching_v3/sm_ransac/4-R.npz new file mode 100644 index 0000000..ea7c4e5 Binary files /dev/null and b/feature_matching_v3/sm_ransac/4-R.npz differ diff --git a/feature_matching_v3/sm_ransac/40-R.npz b/feature_matching_v3/sm_ransac/40-R.npz new file mode 100644 index 0000000..5a06f4d Binary files /dev/null and b/feature_matching_v3/sm_ransac/40-R.npz differ diff --git a/feature_matching_v3/sm_ransac/41-R.npz b/feature_matching_v3/sm_ransac/41-R.npz new file mode 100644 index 0000000..25ba875 Binary files /dev/null and b/feature_matching_v3/sm_ransac/41-R.npz differ diff --git a/feature_matching_v3/sm_ransac/42-R.npz b/feature_matching_v3/sm_ransac/42-R.npz new file mode 100644 index 0000000..7fb37d9 Binary files /dev/null and b/feature_matching_v3/sm_ransac/42-R.npz differ diff --git a/feature_matching_v3/sm_ransac/43-R.npz b/feature_matching_v3/sm_ransac/43-R.npz new file mode 100644 index 0000000..4a478cb Binary files /dev/null and b/feature_matching_v3/sm_ransac/43-R.npz differ diff --git a/feature_matching_v3/sm_ransac/44-R.npz b/feature_matching_v3/sm_ransac/44-R.npz new file mode 100644 index 0000000..27f78cf Binary files /dev/null and b/feature_matching_v3/sm_ransac/44-R.npz differ diff --git a/feature_matching_v3/sm_ransac/45-R.npz b/feature_matching_v3/sm_ransac/45-R.npz new file mode 100644 index 0000000..910846f Binary files /dev/null and b/feature_matching_v3/sm_ransac/45-R.npz differ diff --git a/feature_matching_v3/sm_ransac/46-R.npz b/feature_matching_v3/sm_ransac/46-R.npz new file mode 100644 index 0000000..3c0a147 Binary files /dev/null and b/feature_matching_v3/sm_ransac/46-R.npz differ diff --git a/feature_matching_v3/sm_ransac/47-R.npz b/feature_matching_v3/sm_ransac/47-R.npz new file mode 100644 index 0000000..637e684 Binary files /dev/null and b/feature_matching_v3/sm_ransac/47-R.npz differ diff --git a/feature_matching_v3/sm_ransac/48-R.npz b/feature_matching_v3/sm_ransac/48-R.npz new file mode 100644 index 0000000..78c0c75 Binary files /dev/null and b/feature_matching_v3/sm_ransac/48-R.npz differ diff --git a/feature_matching_v3/sm_ransac/49-R.npz b/feature_matching_v3/sm_ransac/49-R.npz new file mode 100644 index 0000000..10444f7 Binary files /dev/null and b/feature_matching_v3/sm_ransac/49-R.npz differ diff --git a/feature_matching_v3/sm_ransac/5-R.npz b/feature_matching_v3/sm_ransac/5-R.npz new file mode 100644 index 0000000..9de853b Binary files /dev/null and b/feature_matching_v3/sm_ransac/5-R.npz differ diff --git a/feature_matching_v3/sm_ransac/50-R.npz b/feature_matching_v3/sm_ransac/50-R.npz new file mode 100644 index 0000000..fdbcf0c Binary files /dev/null and b/feature_matching_v3/sm_ransac/50-R.npz differ diff --git a/feature_matching_v3/sm_ransac/51-R.npz b/feature_matching_v3/sm_ransac/51-R.npz new file mode 100644 index 0000000..13f9a5e Binary files /dev/null and b/feature_matching_v3/sm_ransac/51-R.npz differ diff --git a/feature_matching_v3/sm_ransac/52-R.npz b/feature_matching_v3/sm_ransac/52-R.npz new file mode 100644 index 0000000..42de041 Binary files /dev/null and b/feature_matching_v3/sm_ransac/52-R.npz differ diff --git a/feature_matching_v3/sm_ransac/53-R.npz b/feature_matching_v3/sm_ransac/53-R.npz new file mode 100644 index 0000000..12dd7fc Binary files /dev/null and b/feature_matching_v3/sm_ransac/53-R.npz differ diff --git a/feature_matching_v3/sm_ransac/54-R.npz b/feature_matching_v3/sm_ransac/54-R.npz new file mode 100644 index 0000000..47993d4 Binary files /dev/null and b/feature_matching_v3/sm_ransac/54-R.npz differ diff --git a/feature_matching_v3/sm_ransac/55-R.npz b/feature_matching_v3/sm_ransac/55-R.npz new file mode 100644 index 0000000..05918fd Binary files /dev/null and b/feature_matching_v3/sm_ransac/55-R.npz differ diff --git a/feature_matching_v3/sm_ransac/56-R.npz b/feature_matching_v3/sm_ransac/56-R.npz new file mode 100644 index 0000000..8518ab8 Binary files /dev/null and b/feature_matching_v3/sm_ransac/56-R.npz differ diff --git a/feature_matching_v3/sm_ransac/57-R.npz b/feature_matching_v3/sm_ransac/57-R.npz new file mode 100644 index 0000000..4189699 Binary files /dev/null and b/feature_matching_v3/sm_ransac/57-R.npz differ diff --git a/feature_matching_v3/sm_ransac/58-R.npz b/feature_matching_v3/sm_ransac/58-R.npz new file mode 100644 index 0000000..1d7179c Binary files /dev/null and b/feature_matching_v3/sm_ransac/58-R.npz differ diff --git a/feature_matching_v3/sm_ransac/59-R.npz b/feature_matching_v3/sm_ransac/59-R.npz new file mode 100644 index 0000000..bd5eae3 Binary files /dev/null and b/feature_matching_v3/sm_ransac/59-R.npz differ diff --git a/feature_matching_v3/sm_ransac/6-R.npz b/feature_matching_v3/sm_ransac/6-R.npz new file mode 100644 index 0000000..f127d7c Binary files /dev/null and b/feature_matching_v3/sm_ransac/6-R.npz differ diff --git a/feature_matching_v3/sm_ransac/60-R.npz b/feature_matching_v3/sm_ransac/60-R.npz new file mode 100644 index 0000000..95afd3f Binary files /dev/null and b/feature_matching_v3/sm_ransac/60-R.npz differ diff --git a/feature_matching_v3/sm_ransac/61-R.npz b/feature_matching_v3/sm_ransac/61-R.npz new file mode 100644 index 0000000..2a3f8fc Binary files /dev/null and b/feature_matching_v3/sm_ransac/61-R.npz differ diff --git a/feature_matching_v3/sm_ransac/62-R.npz b/feature_matching_v3/sm_ransac/62-R.npz new file mode 100644 index 0000000..d5fcbcd Binary files /dev/null and b/feature_matching_v3/sm_ransac/62-R.npz differ diff --git a/feature_matching_v3/sm_ransac/63-R.npz b/feature_matching_v3/sm_ransac/63-R.npz new file mode 100644 index 0000000..0f28ca8 Binary files /dev/null and b/feature_matching_v3/sm_ransac/63-R.npz differ diff --git a/feature_matching_v3/sm_ransac/64-R.npz b/feature_matching_v3/sm_ransac/64-R.npz new file mode 100644 index 0000000..c39ced9 Binary files /dev/null and b/feature_matching_v3/sm_ransac/64-R.npz differ diff --git a/feature_matching_v3/sm_ransac/65-R.npz b/feature_matching_v3/sm_ransac/65-R.npz new file mode 100644 index 0000000..a029997 Binary files /dev/null and b/feature_matching_v3/sm_ransac/65-R.npz differ diff --git a/feature_matching_v3/sm_ransac/66-R.npz b/feature_matching_v3/sm_ransac/66-R.npz new file mode 100644 index 0000000..98ea3ae Binary files /dev/null and b/feature_matching_v3/sm_ransac/66-R.npz differ diff --git a/feature_matching_v3/sm_ransac/67-R.npz b/feature_matching_v3/sm_ransac/67-R.npz new file mode 100644 index 0000000..dd695ee Binary files /dev/null and b/feature_matching_v3/sm_ransac/67-R.npz differ diff --git a/feature_matching_v3/sm_ransac/68-R.npz b/feature_matching_v3/sm_ransac/68-R.npz new file mode 100644 index 0000000..33ab60f Binary files /dev/null and b/feature_matching_v3/sm_ransac/68-R.npz differ diff --git a/feature_matching_v3/sm_ransac/69-R.npz b/feature_matching_v3/sm_ransac/69-R.npz new file mode 100644 index 0000000..768a5ef Binary files /dev/null and b/feature_matching_v3/sm_ransac/69-R.npz differ diff --git a/feature_matching_v3/sm_ransac/7-R.npz b/feature_matching_v3/sm_ransac/7-R.npz new file mode 100644 index 0000000..1941789 Binary files /dev/null and b/feature_matching_v3/sm_ransac/7-R.npz differ diff --git a/feature_matching_v3/sm_ransac/70-R.npz b/feature_matching_v3/sm_ransac/70-R.npz new file mode 100644 index 0000000..809198c Binary files /dev/null and b/feature_matching_v3/sm_ransac/70-R.npz differ diff --git a/feature_matching_v3/sm_ransac/71-R.npz b/feature_matching_v3/sm_ransac/71-R.npz new file mode 100644 index 0000000..e921379 Binary files /dev/null and b/feature_matching_v3/sm_ransac/71-R.npz differ diff --git a/feature_matching_v3/sm_ransac/72-R.npz b/feature_matching_v3/sm_ransac/72-R.npz new file mode 100644 index 0000000..d2f6da8 Binary files /dev/null and b/feature_matching_v3/sm_ransac/72-R.npz differ diff --git a/feature_matching_v3/sm_ransac/8-R.npz b/feature_matching_v3/sm_ransac/8-R.npz new file mode 100644 index 0000000..21f62e6 Binary files /dev/null and b/feature_matching_v3/sm_ransac/8-R.npz differ diff --git a/feature_matching_v3/sm_ransac/9-R.npz b/feature_matching_v3/sm_ransac/9-R.npz new file mode 100644 index 0000000..b0125a0 Binary files /dev/null and b/feature_matching_v3/sm_ransac/9-R.npz differ diff --git a/feature_matching_v3/sm_v1/0-M.npz b/feature_matching_v3/sm_v1/0-M.npz new file mode 100644 index 0000000..2fe00e5 Binary files /dev/null and b/feature_matching_v3/sm_v1/0-M.npz differ diff --git a/feature_matching_v3/sm_v1/1-M.npz b/feature_matching_v3/sm_v1/1-M.npz new file mode 100644 index 0000000..2769e14 Binary files /dev/null and b/feature_matching_v3/sm_v1/1-M.npz differ diff --git a/feature_matching_v3/sm_v1/10-M.npz b/feature_matching_v3/sm_v1/10-M.npz new file mode 100644 index 0000000..9c65e1b Binary files /dev/null and b/feature_matching_v3/sm_v1/10-M.npz differ diff --git a/feature_matching_v3/sm_v1/11-M.npz b/feature_matching_v3/sm_v1/11-M.npz new file mode 100644 index 0000000..4be40bc Binary files /dev/null and b/feature_matching_v3/sm_v1/11-M.npz differ diff --git a/feature_matching_v3/sm_v1/12-M.npz b/feature_matching_v3/sm_v1/12-M.npz new file mode 100644 index 0000000..5e8c52c Binary files /dev/null and b/feature_matching_v3/sm_v1/12-M.npz differ diff --git a/feature_matching_v3/sm_v1/13-M.npz b/feature_matching_v3/sm_v1/13-M.npz new file mode 100644 index 0000000..8b2507b Binary files /dev/null and b/feature_matching_v3/sm_v1/13-M.npz differ diff --git a/feature_matching_v3/sm_v1/14-M.npz b/feature_matching_v3/sm_v1/14-M.npz new file mode 100644 index 0000000..e4f147b Binary files /dev/null and b/feature_matching_v3/sm_v1/14-M.npz differ diff --git a/feature_matching_v3/sm_v1/15-M.npz b/feature_matching_v3/sm_v1/15-M.npz new file mode 100644 index 0000000..6f33465 Binary files /dev/null and b/feature_matching_v3/sm_v1/15-M.npz differ diff --git a/feature_matching_v3/sm_v1/16-M.npz b/feature_matching_v3/sm_v1/16-M.npz new file mode 100644 index 0000000..7780c41 Binary files /dev/null and b/feature_matching_v3/sm_v1/16-M.npz differ diff --git a/feature_matching_v3/sm_v1/17-M.npz b/feature_matching_v3/sm_v1/17-M.npz new file mode 100644 index 0000000..ef85207 Binary files /dev/null and b/feature_matching_v3/sm_v1/17-M.npz differ diff --git a/feature_matching_v3/sm_v1/18-M.npz b/feature_matching_v3/sm_v1/18-M.npz new file mode 100644 index 0000000..ce4cc05 Binary files /dev/null and b/feature_matching_v3/sm_v1/18-M.npz differ diff --git a/feature_matching_v3/sm_v1/19-M.npz b/feature_matching_v3/sm_v1/19-M.npz new file mode 100644 index 0000000..66fff77 Binary files /dev/null and b/feature_matching_v3/sm_v1/19-M.npz differ diff --git a/feature_matching_v3/sm_v1/2-M.npz b/feature_matching_v3/sm_v1/2-M.npz new file mode 100644 index 0000000..a1f6ec6 Binary files /dev/null and b/feature_matching_v3/sm_v1/2-M.npz differ diff --git a/feature_matching_v3/sm_v1/20-M.npz b/feature_matching_v3/sm_v1/20-M.npz new file mode 100644 index 0000000..9c6e616 Binary files /dev/null and b/feature_matching_v3/sm_v1/20-M.npz differ diff --git a/feature_matching_v3/sm_v1/21-M.npz b/feature_matching_v3/sm_v1/21-M.npz new file mode 100644 index 0000000..382d976 Binary files /dev/null and b/feature_matching_v3/sm_v1/21-M.npz differ diff --git a/feature_matching_v3/sm_v1/22-M.npz b/feature_matching_v3/sm_v1/22-M.npz new file mode 100644 index 0000000..ddc5b50 Binary files /dev/null and b/feature_matching_v3/sm_v1/22-M.npz differ diff --git a/feature_matching_v3/sm_v1/23-M.npz b/feature_matching_v3/sm_v1/23-M.npz new file mode 100644 index 0000000..1f1d783 Binary files /dev/null and b/feature_matching_v3/sm_v1/23-M.npz differ diff --git a/feature_matching_v3/sm_v1/24-M.npz b/feature_matching_v3/sm_v1/24-M.npz new file mode 100644 index 0000000..989c709 Binary files /dev/null and b/feature_matching_v3/sm_v1/24-M.npz differ diff --git a/feature_matching_v3/sm_v1/25-M.npz b/feature_matching_v3/sm_v1/25-M.npz new file mode 100644 index 0000000..474bdd0 Binary files /dev/null and b/feature_matching_v3/sm_v1/25-M.npz differ diff --git a/feature_matching_v3/sm_v1/26-M.npz b/feature_matching_v3/sm_v1/26-M.npz new file mode 100644 index 0000000..be9b396 Binary files /dev/null and b/feature_matching_v3/sm_v1/26-M.npz differ diff --git a/feature_matching_v3/sm_v1/27-M.npz b/feature_matching_v3/sm_v1/27-M.npz new file mode 100644 index 0000000..53f7bf5 Binary files /dev/null and b/feature_matching_v3/sm_v1/27-M.npz differ diff --git a/feature_matching_v3/sm_v1/28-M.npz b/feature_matching_v3/sm_v1/28-M.npz new file mode 100644 index 0000000..19c729b Binary files /dev/null and b/feature_matching_v3/sm_v1/28-M.npz differ diff --git a/feature_matching_v3/sm_v1/29-M.npz b/feature_matching_v3/sm_v1/29-M.npz new file mode 100644 index 0000000..eb5f885 Binary files /dev/null and b/feature_matching_v3/sm_v1/29-M.npz differ diff --git a/feature_matching_v3/sm_v1/3-M.npz b/feature_matching_v3/sm_v1/3-M.npz new file mode 100644 index 0000000..8437e12 Binary files /dev/null and b/feature_matching_v3/sm_v1/3-M.npz differ diff --git a/feature_matching_v3/sm_v1/30-M.npz b/feature_matching_v3/sm_v1/30-M.npz new file mode 100644 index 0000000..b1a1259 Binary files /dev/null and b/feature_matching_v3/sm_v1/30-M.npz differ diff --git a/feature_matching_v3/sm_v1/31-M.npz b/feature_matching_v3/sm_v1/31-M.npz new file mode 100644 index 0000000..44b198c Binary files /dev/null and b/feature_matching_v3/sm_v1/31-M.npz differ diff --git a/feature_matching_v3/sm_v1/32-M.npz b/feature_matching_v3/sm_v1/32-M.npz new file mode 100644 index 0000000..7408459 Binary files /dev/null and b/feature_matching_v3/sm_v1/32-M.npz differ diff --git a/feature_matching_v3/sm_v1/33-M.npz b/feature_matching_v3/sm_v1/33-M.npz new file mode 100644 index 0000000..13b4021 Binary files /dev/null and b/feature_matching_v3/sm_v1/33-M.npz differ diff --git a/feature_matching_v3/sm_v1/34-M.npz b/feature_matching_v3/sm_v1/34-M.npz new file mode 100644 index 0000000..26a1944 Binary files /dev/null and b/feature_matching_v3/sm_v1/34-M.npz differ diff --git a/feature_matching_v3/sm_v1/35-M.npz b/feature_matching_v3/sm_v1/35-M.npz new file mode 100644 index 0000000..a41b720 Binary files /dev/null and b/feature_matching_v3/sm_v1/35-M.npz differ diff --git a/feature_matching_v3/sm_v1/36-M.npz b/feature_matching_v3/sm_v1/36-M.npz new file mode 100644 index 0000000..4b181e6 Binary files /dev/null and b/feature_matching_v3/sm_v1/36-M.npz differ diff --git a/feature_matching_v3/sm_v1/37-M.npz b/feature_matching_v3/sm_v1/37-M.npz new file mode 100644 index 0000000..71ef909 Binary files /dev/null and b/feature_matching_v3/sm_v1/37-M.npz differ diff --git a/feature_matching_v3/sm_v1/38-M.npz b/feature_matching_v3/sm_v1/38-M.npz new file mode 100644 index 0000000..0f2817a Binary files /dev/null and b/feature_matching_v3/sm_v1/38-M.npz differ diff --git a/feature_matching_v3/sm_v1/39-M.npz b/feature_matching_v3/sm_v1/39-M.npz new file mode 100644 index 0000000..bc7b8e9 Binary files /dev/null and b/feature_matching_v3/sm_v1/39-M.npz differ diff --git a/feature_matching_v3/sm_v1/4-M.npz b/feature_matching_v3/sm_v1/4-M.npz new file mode 100644 index 0000000..66435a3 Binary files /dev/null and b/feature_matching_v3/sm_v1/4-M.npz differ diff --git a/feature_matching_v3/sm_v1/40-M.npz b/feature_matching_v3/sm_v1/40-M.npz new file mode 100644 index 0000000..9804a3f Binary files /dev/null and b/feature_matching_v3/sm_v1/40-M.npz differ diff --git a/feature_matching_v3/sm_v1/41-M.npz b/feature_matching_v3/sm_v1/41-M.npz new file mode 100644 index 0000000..74c641e Binary files /dev/null and b/feature_matching_v3/sm_v1/41-M.npz differ diff --git a/feature_matching_v3/sm_v1/42-M.npz b/feature_matching_v3/sm_v1/42-M.npz new file mode 100644 index 0000000..b238e58 Binary files /dev/null and b/feature_matching_v3/sm_v1/42-M.npz differ diff --git a/feature_matching_v3/sm_v1/43-M.npz b/feature_matching_v3/sm_v1/43-M.npz new file mode 100644 index 0000000..542c95c Binary files /dev/null and b/feature_matching_v3/sm_v1/43-M.npz differ diff --git a/feature_matching_v3/sm_v1/44-M.npz b/feature_matching_v3/sm_v1/44-M.npz new file mode 100644 index 0000000..e49d157 Binary files /dev/null and b/feature_matching_v3/sm_v1/44-M.npz differ diff --git a/feature_matching_v3/sm_v1/45-M.npz b/feature_matching_v3/sm_v1/45-M.npz new file mode 100644 index 0000000..9b82032 Binary files /dev/null and b/feature_matching_v3/sm_v1/45-M.npz differ diff --git a/feature_matching_v3/sm_v1/46-M.npz b/feature_matching_v3/sm_v1/46-M.npz new file mode 100644 index 0000000..dff8724 Binary files /dev/null and b/feature_matching_v3/sm_v1/46-M.npz differ diff --git a/feature_matching_v3/sm_v1/47-M.npz b/feature_matching_v3/sm_v1/47-M.npz new file mode 100644 index 0000000..cfdcb12 Binary files /dev/null and b/feature_matching_v3/sm_v1/47-M.npz differ diff --git a/feature_matching_v3/sm_v1/48-M.npz b/feature_matching_v3/sm_v1/48-M.npz new file mode 100644 index 0000000..d539880 Binary files /dev/null and b/feature_matching_v3/sm_v1/48-M.npz differ diff --git a/feature_matching_v3/sm_v1/49-M.npz b/feature_matching_v3/sm_v1/49-M.npz new file mode 100644 index 0000000..1fff16f Binary files /dev/null and b/feature_matching_v3/sm_v1/49-M.npz differ diff --git a/feature_matching_v3/sm_v1/5-M.npz b/feature_matching_v3/sm_v1/5-M.npz new file mode 100644 index 0000000..2bcc609 Binary files /dev/null and b/feature_matching_v3/sm_v1/5-M.npz differ diff --git a/feature_matching_v3/sm_v1/50-M.npz b/feature_matching_v3/sm_v1/50-M.npz new file mode 100644 index 0000000..03e3a6e Binary files /dev/null and b/feature_matching_v3/sm_v1/50-M.npz differ diff --git a/feature_matching_v3/sm_v1/51-M.npz b/feature_matching_v3/sm_v1/51-M.npz new file mode 100644 index 0000000..bc3c9bf Binary files /dev/null and b/feature_matching_v3/sm_v1/51-M.npz differ diff --git a/feature_matching_v3/sm_v1/52-M.npz b/feature_matching_v3/sm_v1/52-M.npz new file mode 100644 index 0000000..a7faa55 Binary files /dev/null and b/feature_matching_v3/sm_v1/52-M.npz differ diff --git a/feature_matching_v3/sm_v1/53-M.npz b/feature_matching_v3/sm_v1/53-M.npz new file mode 100644 index 0000000..d5dc895 Binary files /dev/null and b/feature_matching_v3/sm_v1/53-M.npz differ diff --git a/feature_matching_v3/sm_v1/54-M.npz b/feature_matching_v3/sm_v1/54-M.npz new file mode 100644 index 0000000..1fbaeb4 Binary files /dev/null and b/feature_matching_v3/sm_v1/54-M.npz differ diff --git a/feature_matching_v3/sm_v1/55-M.npz b/feature_matching_v3/sm_v1/55-M.npz new file mode 100644 index 0000000..cf7c280 Binary files /dev/null and b/feature_matching_v3/sm_v1/55-M.npz differ diff --git a/feature_matching_v3/sm_v1/56-M.npz b/feature_matching_v3/sm_v1/56-M.npz new file mode 100644 index 0000000..409a08a Binary files /dev/null and b/feature_matching_v3/sm_v1/56-M.npz differ diff --git a/feature_matching_v3/sm_v1/57-M.npz b/feature_matching_v3/sm_v1/57-M.npz new file mode 100644 index 0000000..501c28f Binary files /dev/null and b/feature_matching_v3/sm_v1/57-M.npz differ diff --git a/feature_matching_v3/sm_v1/58-M.npz b/feature_matching_v3/sm_v1/58-M.npz new file mode 100644 index 0000000..32b4f4d Binary files /dev/null and b/feature_matching_v3/sm_v1/58-M.npz differ diff --git a/feature_matching_v3/sm_v1/59-M.npz b/feature_matching_v3/sm_v1/59-M.npz new file mode 100644 index 0000000..5c6ce0a Binary files /dev/null and b/feature_matching_v3/sm_v1/59-M.npz differ diff --git a/feature_matching_v3/sm_v1/6-M.npz b/feature_matching_v3/sm_v1/6-M.npz new file mode 100644 index 0000000..d7f4c81 Binary files /dev/null and b/feature_matching_v3/sm_v1/6-M.npz differ diff --git a/feature_matching_v3/sm_v1/60-M.npz b/feature_matching_v3/sm_v1/60-M.npz new file mode 100644 index 0000000..ca8e531 Binary files /dev/null and b/feature_matching_v3/sm_v1/60-M.npz differ diff --git a/feature_matching_v3/sm_v1/61-M.npz b/feature_matching_v3/sm_v1/61-M.npz new file mode 100644 index 0000000..68f8862 Binary files /dev/null and b/feature_matching_v3/sm_v1/61-M.npz differ diff --git a/feature_matching_v3/sm_v1/62-M.npz b/feature_matching_v3/sm_v1/62-M.npz new file mode 100644 index 0000000..5677275 Binary files /dev/null and b/feature_matching_v3/sm_v1/62-M.npz differ diff --git a/feature_matching_v3/sm_v1/63-M.npz b/feature_matching_v3/sm_v1/63-M.npz new file mode 100644 index 0000000..01b06b0 Binary files /dev/null and b/feature_matching_v3/sm_v1/63-M.npz differ diff --git a/feature_matching_v3/sm_v1/64-M.npz b/feature_matching_v3/sm_v1/64-M.npz new file mode 100644 index 0000000..2e31b85 Binary files /dev/null and b/feature_matching_v3/sm_v1/64-M.npz differ diff --git a/feature_matching_v3/sm_v1/65-M.npz b/feature_matching_v3/sm_v1/65-M.npz new file mode 100644 index 0000000..bda4ba2 Binary files /dev/null and b/feature_matching_v3/sm_v1/65-M.npz differ diff --git a/feature_matching_v3/sm_v1/66-M.npz b/feature_matching_v3/sm_v1/66-M.npz new file mode 100644 index 0000000..67bc80e Binary files /dev/null and b/feature_matching_v3/sm_v1/66-M.npz differ diff --git a/feature_matching_v3/sm_v1/67-M.npz b/feature_matching_v3/sm_v1/67-M.npz new file mode 100644 index 0000000..6b9196c Binary files /dev/null and b/feature_matching_v3/sm_v1/67-M.npz differ diff --git a/feature_matching_v3/sm_v1/68-M.npz b/feature_matching_v3/sm_v1/68-M.npz new file mode 100644 index 0000000..2800ecc Binary files /dev/null and b/feature_matching_v3/sm_v1/68-M.npz differ diff --git a/feature_matching_v3/sm_v1/69-M.npz b/feature_matching_v3/sm_v1/69-M.npz new file mode 100644 index 0000000..0cb8eb6 Binary files /dev/null and b/feature_matching_v3/sm_v1/69-M.npz differ diff --git a/feature_matching_v3/sm_v1/7-M.npz b/feature_matching_v3/sm_v1/7-M.npz new file mode 100644 index 0000000..091e499 Binary files /dev/null and b/feature_matching_v3/sm_v1/7-M.npz differ diff --git a/feature_matching_v3/sm_v1/70-M.npz b/feature_matching_v3/sm_v1/70-M.npz new file mode 100644 index 0000000..45481b7 Binary files /dev/null and b/feature_matching_v3/sm_v1/70-M.npz differ diff --git a/feature_matching_v3/sm_v1/71-M.npz b/feature_matching_v3/sm_v1/71-M.npz new file mode 100644 index 0000000..277dc08 Binary files /dev/null and b/feature_matching_v3/sm_v1/71-M.npz differ diff --git a/feature_matching_v3/sm_v1/72-M.npz b/feature_matching_v3/sm_v1/72-M.npz new file mode 100644 index 0000000..8a5cc45 Binary files /dev/null and b/feature_matching_v3/sm_v1/72-M.npz differ diff --git a/feature_matching_v3/sm_v1/8-M.npz b/feature_matching_v3/sm_v1/8-M.npz new file mode 100644 index 0000000..3e2d8c8 Binary files /dev/null and b/feature_matching_v3/sm_v1/8-M.npz differ diff --git a/feature_matching_v3/sm_v1/9-M.npz b/feature_matching_v3/sm_v1/9-M.npz new file mode 100644 index 0000000..1b88f45 Binary files /dev/null and b/feature_matching_v3/sm_v1/9-M.npz differ diff --git a/Vision-Rat-Brain-F/PW_BB_V1.npz b/feature_matching_v3/sm_v1/PW_BB_V1_SIFT.npz similarity index 66% rename from Vision-Rat-Brain-F/PW_BB_V1.npz rename to feature_matching_v3/sm_v1/PW_BB_V1_SIFT.npz index 9bf57c1..eb47855 100644 Binary files a/Vision-Rat-Brain-F/PW_BB_V1.npz and b/feature_matching_v3/sm_v1/PW_BB_V1_SIFT.npz differ diff --git a/feature_matching_v3/sm_v1/S_BB_V1_SIFT.npz b/feature_matching_v3/sm_v1/S_BB_V1_SIFT.npz new file mode 100644 index 0000000..5698db4 Binary files /dev/null and b/feature_matching_v3/sm_v1/S_BB_V1_SIFT.npz differ diff --git a/feature_matching_v3/sm_v2/0-M.npz b/feature_matching_v3/sm_v2/0-M.npz new file mode 100644 index 0000000..aa350bf Binary files /dev/null and b/feature_matching_v3/sm_v2/0-M.npz differ diff --git a/feature_matching_v3/sm_v2/1-M.npz b/feature_matching_v3/sm_v2/1-M.npz new file mode 100644 index 0000000..2dcc845 Binary files /dev/null and b/feature_matching_v3/sm_v2/1-M.npz differ diff --git a/feature_matching_v3/sm_v2/10-M.npz b/feature_matching_v3/sm_v2/10-M.npz new file mode 100644 index 0000000..290c856 Binary files /dev/null and b/feature_matching_v3/sm_v2/10-M.npz differ diff --git a/feature_matching_v3/sm_v2/11-M.npz b/feature_matching_v3/sm_v2/11-M.npz new file mode 100644 index 0000000..582b194 Binary files /dev/null and b/feature_matching_v3/sm_v2/11-M.npz differ diff --git a/feature_matching_v3/sm_v2/12-M.npz b/feature_matching_v3/sm_v2/12-M.npz new file mode 100644 index 0000000..8c0568e Binary files /dev/null and b/feature_matching_v3/sm_v2/12-M.npz differ diff --git a/feature_matching_v3/sm_v2/13-M.npz b/feature_matching_v3/sm_v2/13-M.npz new file mode 100644 index 0000000..51e614d Binary files /dev/null and b/feature_matching_v3/sm_v2/13-M.npz differ diff --git a/feature_matching_v3/sm_v2/14-M.npz b/feature_matching_v3/sm_v2/14-M.npz new file mode 100644 index 0000000..af212f2 Binary files /dev/null and b/feature_matching_v3/sm_v2/14-M.npz differ diff --git a/feature_matching_v3/sm_v2/15-M.npz b/feature_matching_v3/sm_v2/15-M.npz new file mode 100644 index 0000000..d8a3a41 Binary files /dev/null and b/feature_matching_v3/sm_v2/15-M.npz differ diff --git a/feature_matching_v3/sm_v2/16-M.npz b/feature_matching_v3/sm_v2/16-M.npz new file mode 100644 index 0000000..a01e8ad Binary files /dev/null and b/feature_matching_v3/sm_v2/16-M.npz differ diff --git a/feature_matching_v3/sm_v2/17-M.npz b/feature_matching_v3/sm_v2/17-M.npz new file mode 100644 index 0000000..2d46bb0 Binary files /dev/null and b/feature_matching_v3/sm_v2/17-M.npz differ diff --git a/feature_matching_v3/sm_v2/18-M.npz b/feature_matching_v3/sm_v2/18-M.npz new file mode 100644 index 0000000..ebf8e10 Binary files /dev/null and b/feature_matching_v3/sm_v2/18-M.npz differ diff --git a/feature_matching_v3/sm_v2/19-M.npz b/feature_matching_v3/sm_v2/19-M.npz new file mode 100644 index 0000000..5f50e14 Binary files /dev/null and b/feature_matching_v3/sm_v2/19-M.npz differ diff --git a/feature_matching_v3/sm_v2/2-M.npz b/feature_matching_v3/sm_v2/2-M.npz new file mode 100644 index 0000000..c615385 Binary files /dev/null and b/feature_matching_v3/sm_v2/2-M.npz differ diff --git a/feature_matching_v3/sm_v2/20-M.npz b/feature_matching_v3/sm_v2/20-M.npz new file mode 100644 index 0000000..5bb7793 Binary files /dev/null and b/feature_matching_v3/sm_v2/20-M.npz differ diff --git a/feature_matching_v3/sm_v2/21-M.npz b/feature_matching_v3/sm_v2/21-M.npz new file mode 100644 index 0000000..6c8ccab Binary files /dev/null and b/feature_matching_v3/sm_v2/21-M.npz differ diff --git a/feature_matching_v3/sm_v2/22-M.npz b/feature_matching_v3/sm_v2/22-M.npz new file mode 100644 index 0000000..700f850 Binary files /dev/null and b/feature_matching_v3/sm_v2/22-M.npz differ diff --git a/feature_matching_v3/sm_v2/23-M.npz b/feature_matching_v3/sm_v2/23-M.npz new file mode 100644 index 0000000..9529dc5 Binary files /dev/null and b/feature_matching_v3/sm_v2/23-M.npz differ diff --git a/feature_matching_v3/sm_v2/24-M.npz b/feature_matching_v3/sm_v2/24-M.npz new file mode 100644 index 0000000..43739df Binary files /dev/null and b/feature_matching_v3/sm_v2/24-M.npz differ diff --git a/feature_matching_v3/sm_v2/25-M.npz b/feature_matching_v3/sm_v2/25-M.npz new file mode 100644 index 0000000..1b10bbf Binary files /dev/null and b/feature_matching_v3/sm_v2/25-M.npz differ diff --git a/feature_matching_v3/sm_v2/26-M.npz b/feature_matching_v3/sm_v2/26-M.npz new file mode 100644 index 0000000..752790d Binary files /dev/null and b/feature_matching_v3/sm_v2/26-M.npz differ diff --git a/feature_matching_v3/sm_v2/27-M.npz b/feature_matching_v3/sm_v2/27-M.npz new file mode 100644 index 0000000..3897fd6 Binary files /dev/null and b/feature_matching_v3/sm_v2/27-M.npz differ diff --git a/feature_matching_v3/sm_v2/28-M.npz b/feature_matching_v3/sm_v2/28-M.npz new file mode 100644 index 0000000..18dd73a Binary files /dev/null and b/feature_matching_v3/sm_v2/28-M.npz differ diff --git a/feature_matching_v3/sm_v2/29-M.npz b/feature_matching_v3/sm_v2/29-M.npz new file mode 100644 index 0000000..a71ec11 Binary files /dev/null and b/feature_matching_v3/sm_v2/29-M.npz differ diff --git a/feature_matching_v3/sm_v2/3-M.npz b/feature_matching_v3/sm_v2/3-M.npz new file mode 100644 index 0000000..5c28c20 Binary files /dev/null and b/feature_matching_v3/sm_v2/3-M.npz differ diff --git a/feature_matching_v3/sm_v2/30-M.npz b/feature_matching_v3/sm_v2/30-M.npz new file mode 100644 index 0000000..10fed89 Binary files /dev/null and b/feature_matching_v3/sm_v2/30-M.npz differ diff --git a/feature_matching_v3/sm_v2/31-M.npz b/feature_matching_v3/sm_v2/31-M.npz new file mode 100644 index 0000000..d522ab2 Binary files /dev/null and b/feature_matching_v3/sm_v2/31-M.npz differ diff --git a/feature_matching_v3/sm_v2/32-M.npz b/feature_matching_v3/sm_v2/32-M.npz new file mode 100644 index 0000000..d1501fd Binary files /dev/null and b/feature_matching_v3/sm_v2/32-M.npz differ diff --git a/feature_matching_v3/sm_v2/33-M.npz b/feature_matching_v3/sm_v2/33-M.npz new file mode 100644 index 0000000..71f0a6e Binary files /dev/null and b/feature_matching_v3/sm_v2/33-M.npz differ diff --git a/feature_matching_v3/sm_v2/34-M.npz b/feature_matching_v3/sm_v2/34-M.npz new file mode 100644 index 0000000..42fa690 Binary files /dev/null and b/feature_matching_v3/sm_v2/34-M.npz differ diff --git a/feature_matching_v3/sm_v2/35-M.npz b/feature_matching_v3/sm_v2/35-M.npz new file mode 100644 index 0000000..45b4ceb Binary files /dev/null and b/feature_matching_v3/sm_v2/35-M.npz differ diff --git a/feature_matching_v3/sm_v2/36-M.npz b/feature_matching_v3/sm_v2/36-M.npz new file mode 100644 index 0000000..72d491d Binary files /dev/null and b/feature_matching_v3/sm_v2/36-M.npz differ diff --git a/feature_matching_v3/sm_v2/37-M.npz b/feature_matching_v3/sm_v2/37-M.npz new file mode 100644 index 0000000..2fa27bf Binary files /dev/null and b/feature_matching_v3/sm_v2/37-M.npz differ diff --git a/feature_matching_v3/sm_v2/38-M.npz b/feature_matching_v3/sm_v2/38-M.npz new file mode 100644 index 0000000..8e92374 Binary files /dev/null and b/feature_matching_v3/sm_v2/38-M.npz differ diff --git a/feature_matching_v3/sm_v2/39-M.npz b/feature_matching_v3/sm_v2/39-M.npz new file mode 100644 index 0000000..3b6e3b3 Binary files /dev/null and b/feature_matching_v3/sm_v2/39-M.npz differ diff --git a/feature_matching_v3/sm_v2/4-M.npz b/feature_matching_v3/sm_v2/4-M.npz new file mode 100644 index 0000000..6fe6667 Binary files /dev/null and b/feature_matching_v3/sm_v2/4-M.npz differ diff --git a/feature_matching_v3/sm_v2/40-M.npz b/feature_matching_v3/sm_v2/40-M.npz new file mode 100644 index 0000000..7a27a07 Binary files /dev/null and b/feature_matching_v3/sm_v2/40-M.npz differ diff --git a/feature_matching_v3/sm_v2/41-M.npz b/feature_matching_v3/sm_v2/41-M.npz new file mode 100644 index 0000000..c1a9399 Binary files /dev/null and b/feature_matching_v3/sm_v2/41-M.npz differ diff --git a/feature_matching_v3/sm_v2/42-M.npz b/feature_matching_v3/sm_v2/42-M.npz new file mode 100644 index 0000000..4dc03a3 Binary files /dev/null and b/feature_matching_v3/sm_v2/42-M.npz differ diff --git a/feature_matching_v3/sm_v2/43-M.npz b/feature_matching_v3/sm_v2/43-M.npz new file mode 100644 index 0000000..b41251c Binary files /dev/null and b/feature_matching_v3/sm_v2/43-M.npz differ diff --git a/feature_matching_v3/sm_v2/44-M.npz b/feature_matching_v3/sm_v2/44-M.npz new file mode 100644 index 0000000..813e507 Binary files /dev/null and b/feature_matching_v3/sm_v2/44-M.npz differ diff --git a/feature_matching_v3/sm_v2/45-M.npz b/feature_matching_v3/sm_v2/45-M.npz new file mode 100644 index 0000000..b71f4ba Binary files /dev/null and b/feature_matching_v3/sm_v2/45-M.npz differ diff --git a/feature_matching_v3/sm_v2/46-M.npz b/feature_matching_v3/sm_v2/46-M.npz new file mode 100644 index 0000000..a49469d Binary files /dev/null and b/feature_matching_v3/sm_v2/46-M.npz differ diff --git a/feature_matching_v3/sm_v2/47-M.npz b/feature_matching_v3/sm_v2/47-M.npz new file mode 100644 index 0000000..77e4078 Binary files /dev/null and b/feature_matching_v3/sm_v2/47-M.npz differ diff --git a/feature_matching_v3/sm_v2/48-M.npz b/feature_matching_v3/sm_v2/48-M.npz new file mode 100644 index 0000000..cf2c4c6 Binary files /dev/null and b/feature_matching_v3/sm_v2/48-M.npz differ diff --git a/feature_matching_v3/sm_v2/49-M.npz b/feature_matching_v3/sm_v2/49-M.npz new file mode 100644 index 0000000..246b302 Binary files /dev/null and b/feature_matching_v3/sm_v2/49-M.npz differ diff --git a/feature_matching_v3/sm_v2/5-M.npz b/feature_matching_v3/sm_v2/5-M.npz new file mode 100644 index 0000000..bd6b086 Binary files /dev/null and b/feature_matching_v3/sm_v2/5-M.npz differ diff --git a/feature_matching_v3/sm_v2/50-M.npz b/feature_matching_v3/sm_v2/50-M.npz new file mode 100644 index 0000000..f743f15 Binary files /dev/null and b/feature_matching_v3/sm_v2/50-M.npz differ diff --git a/feature_matching_v3/sm_v2/51-M.npz b/feature_matching_v3/sm_v2/51-M.npz new file mode 100644 index 0000000..222e84a Binary files /dev/null and b/feature_matching_v3/sm_v2/51-M.npz differ diff --git a/feature_matching_v3/sm_v2/52-M.npz b/feature_matching_v3/sm_v2/52-M.npz new file mode 100644 index 0000000..aba178f Binary files /dev/null and b/feature_matching_v3/sm_v2/52-M.npz differ diff --git a/feature_matching_v3/sm_v2/53-M.npz b/feature_matching_v3/sm_v2/53-M.npz new file mode 100644 index 0000000..bf36821 Binary files /dev/null and b/feature_matching_v3/sm_v2/53-M.npz differ diff --git a/feature_matching_v3/sm_v2/54-M.npz b/feature_matching_v3/sm_v2/54-M.npz new file mode 100644 index 0000000..f637730 Binary files /dev/null and b/feature_matching_v3/sm_v2/54-M.npz differ diff --git a/feature_matching_v3/sm_v2/55-M.npz b/feature_matching_v3/sm_v2/55-M.npz new file mode 100644 index 0000000..4f7ecfc Binary files /dev/null and b/feature_matching_v3/sm_v2/55-M.npz differ diff --git a/feature_matching_v3/sm_v2/56-M.npz b/feature_matching_v3/sm_v2/56-M.npz new file mode 100644 index 0000000..7b8a982 Binary files /dev/null and b/feature_matching_v3/sm_v2/56-M.npz differ diff --git a/feature_matching_v3/sm_v2/57-M.npz b/feature_matching_v3/sm_v2/57-M.npz new file mode 100644 index 0000000..f5c59cb Binary files /dev/null and b/feature_matching_v3/sm_v2/57-M.npz differ diff --git a/feature_matching_v3/sm_v2/58-M.npz b/feature_matching_v3/sm_v2/58-M.npz new file mode 100644 index 0000000..c7552f5 Binary files /dev/null and b/feature_matching_v3/sm_v2/58-M.npz differ diff --git a/feature_matching_v3/sm_v2/59-M.npz b/feature_matching_v3/sm_v2/59-M.npz new file mode 100644 index 0000000..f9bb82d Binary files /dev/null and b/feature_matching_v3/sm_v2/59-M.npz differ diff --git a/feature_matching_v3/sm_v2/6-M.npz b/feature_matching_v3/sm_v2/6-M.npz new file mode 100644 index 0000000..44227f6 Binary files /dev/null and b/feature_matching_v3/sm_v2/6-M.npz differ diff --git a/feature_matching_v3/sm_v2/60-M.npz b/feature_matching_v3/sm_v2/60-M.npz new file mode 100644 index 0000000..26ce441 Binary files /dev/null and b/feature_matching_v3/sm_v2/60-M.npz differ diff --git a/feature_matching_v3/sm_v2/61-M.npz b/feature_matching_v3/sm_v2/61-M.npz new file mode 100644 index 0000000..5becb04 Binary files /dev/null and b/feature_matching_v3/sm_v2/61-M.npz differ diff --git a/feature_matching_v3/sm_v2/62-M.npz b/feature_matching_v3/sm_v2/62-M.npz new file mode 100644 index 0000000..fa28c3e Binary files /dev/null and b/feature_matching_v3/sm_v2/62-M.npz differ diff --git a/feature_matching_v3/sm_v2/63-M.npz b/feature_matching_v3/sm_v2/63-M.npz new file mode 100644 index 0000000..d01a7d6 Binary files /dev/null and b/feature_matching_v3/sm_v2/63-M.npz differ diff --git a/feature_matching_v3/sm_v2/64-M.npz b/feature_matching_v3/sm_v2/64-M.npz new file mode 100644 index 0000000..e29d8b4 Binary files /dev/null and b/feature_matching_v3/sm_v2/64-M.npz differ diff --git a/feature_matching_v3/sm_v2/65-M.npz b/feature_matching_v3/sm_v2/65-M.npz new file mode 100644 index 0000000..135a40c Binary files /dev/null and b/feature_matching_v3/sm_v2/65-M.npz differ diff --git a/feature_matching_v3/sm_v2/66-M.npz b/feature_matching_v3/sm_v2/66-M.npz new file mode 100644 index 0000000..e1c7242 Binary files /dev/null and b/feature_matching_v3/sm_v2/66-M.npz differ diff --git a/feature_matching_v3/sm_v2/67-M.npz b/feature_matching_v3/sm_v2/67-M.npz new file mode 100644 index 0000000..dcf9723 Binary files /dev/null and b/feature_matching_v3/sm_v2/67-M.npz differ diff --git a/feature_matching_v3/sm_v2/68-M.npz b/feature_matching_v3/sm_v2/68-M.npz new file mode 100644 index 0000000..66cac01 Binary files /dev/null and b/feature_matching_v3/sm_v2/68-M.npz differ diff --git a/feature_matching_v3/sm_v2/69-M.npz b/feature_matching_v3/sm_v2/69-M.npz new file mode 100644 index 0000000..675460f Binary files /dev/null and b/feature_matching_v3/sm_v2/69-M.npz differ diff --git a/feature_matching_v3/sm_v2/7-M.npz b/feature_matching_v3/sm_v2/7-M.npz new file mode 100644 index 0000000..2f758f8 Binary files /dev/null and b/feature_matching_v3/sm_v2/7-M.npz differ diff --git a/feature_matching_v3/sm_v2/70-M.npz b/feature_matching_v3/sm_v2/70-M.npz new file mode 100644 index 0000000..28feb49 Binary files /dev/null and b/feature_matching_v3/sm_v2/70-M.npz differ diff --git a/feature_matching_v3/sm_v2/71-M.npz b/feature_matching_v3/sm_v2/71-M.npz new file mode 100644 index 0000000..426d18d Binary files /dev/null and b/feature_matching_v3/sm_v2/71-M.npz differ diff --git a/feature_matching_v3/sm_v2/72-M.npz b/feature_matching_v3/sm_v2/72-M.npz new file mode 100644 index 0000000..37e7505 Binary files /dev/null and b/feature_matching_v3/sm_v2/72-M.npz differ diff --git a/feature_matching_v3/sm_v2/8-M.npz b/feature_matching_v3/sm_v2/8-M.npz new file mode 100644 index 0000000..f012a38 Binary files /dev/null and b/feature_matching_v3/sm_v2/8-M.npz differ diff --git a/feature_matching_v3/sm_v2/9-M.npz b/feature_matching_v3/sm_v2/9-M.npz new file mode 100644 index 0000000..3328abb Binary files /dev/null and b/feature_matching_v3/sm_v2/9-M.npz differ diff --git a/feature_matching_v3/sm_v3/0-M.npz b/feature_matching_v3/sm_v3/0-M.npz new file mode 100644 index 0000000..317d1e1 Binary files /dev/null and b/feature_matching_v3/sm_v3/0-M.npz differ diff --git a/feature_matching_v3/sm_v3/1-M.npz b/feature_matching_v3/sm_v3/1-M.npz new file mode 100644 index 0000000..4453a3f Binary files /dev/null and b/feature_matching_v3/sm_v3/1-M.npz differ diff --git a/feature_matching_v3/sm_v3/10-M.npz b/feature_matching_v3/sm_v3/10-M.npz new file mode 100644 index 0000000..adc0428 Binary files /dev/null and b/feature_matching_v3/sm_v3/10-M.npz differ diff --git a/feature_matching_v3/sm_v3/11-M.npz b/feature_matching_v3/sm_v3/11-M.npz new file mode 100644 index 0000000..7bbe8a1 Binary files /dev/null and b/feature_matching_v3/sm_v3/11-M.npz differ diff --git a/feature_matching_v3/sm_v3/12-M.npz b/feature_matching_v3/sm_v3/12-M.npz new file mode 100644 index 0000000..d848534 Binary files /dev/null and b/feature_matching_v3/sm_v3/12-M.npz differ diff --git a/feature_matching_v3/sm_v3/13-M.npz b/feature_matching_v3/sm_v3/13-M.npz new file mode 100644 index 0000000..1d6bd91 Binary files /dev/null and b/feature_matching_v3/sm_v3/13-M.npz differ diff --git a/feature_matching_v3/sm_v3/14-M.npz b/feature_matching_v3/sm_v3/14-M.npz new file mode 100644 index 0000000..0d2db64 Binary files /dev/null and b/feature_matching_v3/sm_v3/14-M.npz differ diff --git a/feature_matching_v3/sm_v3/15-M.npz b/feature_matching_v3/sm_v3/15-M.npz new file mode 100644 index 0000000..822f561 Binary files /dev/null and b/feature_matching_v3/sm_v3/15-M.npz differ diff --git a/feature_matching_v3/sm_v3/16-M.npz b/feature_matching_v3/sm_v3/16-M.npz new file mode 100644 index 0000000..710b7eb Binary files /dev/null and b/feature_matching_v3/sm_v3/16-M.npz differ diff --git a/feature_matching_v3/sm_v3/17-M.npz b/feature_matching_v3/sm_v3/17-M.npz new file mode 100644 index 0000000..30cfc79 Binary files /dev/null and b/feature_matching_v3/sm_v3/17-M.npz differ diff --git a/feature_matching_v3/sm_v3/18-M.npz b/feature_matching_v3/sm_v3/18-M.npz new file mode 100644 index 0000000..24b47c1 Binary files /dev/null and b/feature_matching_v3/sm_v3/18-M.npz differ diff --git a/feature_matching_v3/sm_v3/19-M.npz b/feature_matching_v3/sm_v3/19-M.npz new file mode 100644 index 0000000..0512dd2 Binary files /dev/null and b/feature_matching_v3/sm_v3/19-M.npz differ diff --git a/feature_matching_v3/sm_v3/2-M.npz b/feature_matching_v3/sm_v3/2-M.npz new file mode 100644 index 0000000..5d7e3f8 Binary files /dev/null and b/feature_matching_v3/sm_v3/2-M.npz differ diff --git a/feature_matching_v3/sm_v3/20-M.npz b/feature_matching_v3/sm_v3/20-M.npz new file mode 100644 index 0000000..a94a17c Binary files /dev/null and b/feature_matching_v3/sm_v3/20-M.npz differ diff --git a/feature_matching_v3/sm_v3/21-M.npz b/feature_matching_v3/sm_v3/21-M.npz new file mode 100644 index 0000000..4683b0e Binary files /dev/null and b/feature_matching_v3/sm_v3/21-M.npz differ diff --git a/feature_matching_v3/sm_v3/22-M.npz b/feature_matching_v3/sm_v3/22-M.npz new file mode 100644 index 0000000..edca5db Binary files /dev/null and b/feature_matching_v3/sm_v3/22-M.npz differ diff --git a/feature_matching_v3/sm_v3/23-M.npz b/feature_matching_v3/sm_v3/23-M.npz new file mode 100644 index 0000000..51c3820 Binary files /dev/null and b/feature_matching_v3/sm_v3/23-M.npz differ diff --git a/feature_matching_v3/sm_v3/24-M.npz b/feature_matching_v3/sm_v3/24-M.npz new file mode 100644 index 0000000..7bb3bda Binary files /dev/null and b/feature_matching_v3/sm_v3/24-M.npz differ diff --git a/feature_matching_v3/sm_v3/25-M.npz b/feature_matching_v3/sm_v3/25-M.npz new file mode 100644 index 0000000..7037cb6 Binary files /dev/null and b/feature_matching_v3/sm_v3/25-M.npz differ diff --git a/feature_matching_v3/sm_v3/26-M.npz b/feature_matching_v3/sm_v3/26-M.npz new file mode 100644 index 0000000..b74e2e6 Binary files /dev/null and b/feature_matching_v3/sm_v3/26-M.npz differ diff --git a/feature_matching_v3/sm_v3/27-M.npz b/feature_matching_v3/sm_v3/27-M.npz new file mode 100644 index 0000000..e4d1f06 Binary files /dev/null and b/feature_matching_v3/sm_v3/27-M.npz differ diff --git a/feature_matching_v3/sm_v3/28-M.npz b/feature_matching_v3/sm_v3/28-M.npz new file mode 100644 index 0000000..2fcf9c3 Binary files /dev/null and b/feature_matching_v3/sm_v3/28-M.npz differ diff --git a/feature_matching_v3/sm_v3/29-M.npz b/feature_matching_v3/sm_v3/29-M.npz new file mode 100644 index 0000000..b78ecdc Binary files /dev/null and b/feature_matching_v3/sm_v3/29-M.npz differ diff --git a/feature_matching_v3/sm_v3/3-M.npz b/feature_matching_v3/sm_v3/3-M.npz new file mode 100644 index 0000000..3c5769a Binary files /dev/null and b/feature_matching_v3/sm_v3/3-M.npz differ diff --git a/feature_matching_v3/sm_v3/30-M.npz b/feature_matching_v3/sm_v3/30-M.npz new file mode 100644 index 0000000..1217b24 Binary files /dev/null and b/feature_matching_v3/sm_v3/30-M.npz differ diff --git a/feature_matching_v3/sm_v3/31-M.npz b/feature_matching_v3/sm_v3/31-M.npz new file mode 100644 index 0000000..192f6b2 Binary files /dev/null and b/feature_matching_v3/sm_v3/31-M.npz differ diff --git a/feature_matching_v3/sm_v3/32-M.npz b/feature_matching_v3/sm_v3/32-M.npz new file mode 100644 index 0000000..3633221 Binary files /dev/null and b/feature_matching_v3/sm_v3/32-M.npz differ diff --git a/feature_matching_v3/sm_v3/33-M.npz b/feature_matching_v3/sm_v3/33-M.npz new file mode 100644 index 0000000..ae738b0 Binary files /dev/null and b/feature_matching_v3/sm_v3/33-M.npz differ diff --git a/feature_matching_v3/sm_v3/34-M.npz b/feature_matching_v3/sm_v3/34-M.npz new file mode 100644 index 0000000..4d49388 Binary files /dev/null and b/feature_matching_v3/sm_v3/34-M.npz differ diff --git a/feature_matching_v3/sm_v3/35-M.npz b/feature_matching_v3/sm_v3/35-M.npz new file mode 100644 index 0000000..b6cdbc7 Binary files /dev/null and b/feature_matching_v3/sm_v3/35-M.npz differ diff --git a/feature_matching_v3/sm_v3/36-M.npz b/feature_matching_v3/sm_v3/36-M.npz new file mode 100644 index 0000000..c68b1c4 Binary files /dev/null and b/feature_matching_v3/sm_v3/36-M.npz differ diff --git a/feature_matching_v3/sm_v3/37-M.npz b/feature_matching_v3/sm_v3/37-M.npz new file mode 100644 index 0000000..b9f4b51 Binary files /dev/null and b/feature_matching_v3/sm_v3/37-M.npz differ diff --git a/feature_matching_v3/sm_v3/38-M.npz b/feature_matching_v3/sm_v3/38-M.npz new file mode 100644 index 0000000..0c07b00 Binary files /dev/null and b/feature_matching_v3/sm_v3/38-M.npz differ diff --git a/feature_matching_v3/sm_v3/39-M.npz b/feature_matching_v3/sm_v3/39-M.npz new file mode 100644 index 0000000..4319b03 Binary files /dev/null and b/feature_matching_v3/sm_v3/39-M.npz differ diff --git a/feature_matching_v3/sm_v3/4-M.npz b/feature_matching_v3/sm_v3/4-M.npz new file mode 100644 index 0000000..4e240ec Binary files /dev/null and b/feature_matching_v3/sm_v3/4-M.npz differ diff --git a/feature_matching_v3/sm_v3/40-M.npz b/feature_matching_v3/sm_v3/40-M.npz new file mode 100644 index 0000000..8b43171 Binary files /dev/null and b/feature_matching_v3/sm_v3/40-M.npz differ diff --git a/feature_matching_v3/sm_v3/41-M.npz b/feature_matching_v3/sm_v3/41-M.npz new file mode 100644 index 0000000..52f9f19 Binary files /dev/null and b/feature_matching_v3/sm_v3/41-M.npz differ diff --git a/feature_matching_v3/sm_v3/42-M.npz b/feature_matching_v3/sm_v3/42-M.npz new file mode 100644 index 0000000..d798074 Binary files /dev/null and b/feature_matching_v3/sm_v3/42-M.npz differ diff --git a/feature_matching_v3/sm_v3/43-M.npz b/feature_matching_v3/sm_v3/43-M.npz new file mode 100644 index 0000000..a9cf4c4 Binary files /dev/null and b/feature_matching_v3/sm_v3/43-M.npz differ diff --git a/feature_matching_v3/sm_v3/44-M.npz b/feature_matching_v3/sm_v3/44-M.npz new file mode 100644 index 0000000..839f649 Binary files /dev/null and b/feature_matching_v3/sm_v3/44-M.npz differ diff --git a/feature_matching_v3/sm_v3/45-M.npz b/feature_matching_v3/sm_v3/45-M.npz new file mode 100644 index 0000000..e2fea34 Binary files /dev/null and b/feature_matching_v3/sm_v3/45-M.npz differ diff --git a/feature_matching_v3/sm_v3/46-M.npz b/feature_matching_v3/sm_v3/46-M.npz new file mode 100644 index 0000000..7a3841f Binary files /dev/null and b/feature_matching_v3/sm_v3/46-M.npz differ diff --git a/feature_matching_v3/sm_v3/47-M.npz b/feature_matching_v3/sm_v3/47-M.npz new file mode 100644 index 0000000..df87557 Binary files /dev/null and b/feature_matching_v3/sm_v3/47-M.npz differ diff --git a/feature_matching_v3/sm_v3/48-M.npz b/feature_matching_v3/sm_v3/48-M.npz new file mode 100644 index 0000000..39bc35e Binary files /dev/null and b/feature_matching_v3/sm_v3/48-M.npz differ diff --git a/feature_matching_v3/sm_v3/49-M.npz b/feature_matching_v3/sm_v3/49-M.npz new file mode 100644 index 0000000..60b5cfa Binary files /dev/null and b/feature_matching_v3/sm_v3/49-M.npz differ diff --git a/feature_matching_v3/sm_v3/5-M.npz b/feature_matching_v3/sm_v3/5-M.npz new file mode 100644 index 0000000..34ab846 Binary files /dev/null and b/feature_matching_v3/sm_v3/5-M.npz differ diff --git a/feature_matching_v3/sm_v3/50-M.npz b/feature_matching_v3/sm_v3/50-M.npz new file mode 100644 index 0000000..d2616f4 Binary files /dev/null and b/feature_matching_v3/sm_v3/50-M.npz differ diff --git a/feature_matching_v3/sm_v3/51-M.npz b/feature_matching_v3/sm_v3/51-M.npz new file mode 100644 index 0000000..fc44a53 Binary files /dev/null and b/feature_matching_v3/sm_v3/51-M.npz differ diff --git a/feature_matching_v3/sm_v3/52-M.npz b/feature_matching_v3/sm_v3/52-M.npz new file mode 100644 index 0000000..8328699 Binary files /dev/null and b/feature_matching_v3/sm_v3/52-M.npz differ diff --git a/feature_matching_v3/sm_v3/53-M.npz b/feature_matching_v3/sm_v3/53-M.npz new file mode 100644 index 0000000..5f0335f Binary files /dev/null and b/feature_matching_v3/sm_v3/53-M.npz differ diff --git a/feature_matching_v3/sm_v3/54-M.npz b/feature_matching_v3/sm_v3/54-M.npz new file mode 100644 index 0000000..27e3e65 Binary files /dev/null and b/feature_matching_v3/sm_v3/54-M.npz differ diff --git a/feature_matching_v3/sm_v3/55-M.npz b/feature_matching_v3/sm_v3/55-M.npz new file mode 100644 index 0000000..8094578 Binary files /dev/null and b/feature_matching_v3/sm_v3/55-M.npz differ diff --git a/feature_matching_v3/sm_v3/56-M.npz b/feature_matching_v3/sm_v3/56-M.npz new file mode 100644 index 0000000..df272d6 Binary files /dev/null and b/feature_matching_v3/sm_v3/56-M.npz differ diff --git a/feature_matching_v3/sm_v3/57-M.npz b/feature_matching_v3/sm_v3/57-M.npz new file mode 100644 index 0000000..7a6486c Binary files /dev/null and b/feature_matching_v3/sm_v3/57-M.npz differ diff --git a/feature_matching_v3/sm_v3/58-M.npz b/feature_matching_v3/sm_v3/58-M.npz new file mode 100644 index 0000000..8d8b656 Binary files /dev/null and b/feature_matching_v3/sm_v3/58-M.npz differ diff --git a/feature_matching_v3/sm_v3/59-M.npz b/feature_matching_v3/sm_v3/59-M.npz new file mode 100644 index 0000000..f6a1211 Binary files /dev/null and b/feature_matching_v3/sm_v3/59-M.npz differ diff --git a/feature_matching_v3/sm_v3/6-M.npz b/feature_matching_v3/sm_v3/6-M.npz new file mode 100644 index 0000000..01f0322 Binary files /dev/null and b/feature_matching_v3/sm_v3/6-M.npz differ diff --git a/feature_matching_v3/sm_v3/60-M.npz b/feature_matching_v3/sm_v3/60-M.npz new file mode 100644 index 0000000..e7bc8a7 Binary files /dev/null and b/feature_matching_v3/sm_v3/60-M.npz differ diff --git a/feature_matching_v3/sm_v3/61-M.npz b/feature_matching_v3/sm_v3/61-M.npz new file mode 100644 index 0000000..d7ae08e Binary files /dev/null and b/feature_matching_v3/sm_v3/61-M.npz differ diff --git a/feature_matching_v3/sm_v3/62-M.npz b/feature_matching_v3/sm_v3/62-M.npz new file mode 100644 index 0000000..9685c8f Binary files /dev/null and b/feature_matching_v3/sm_v3/62-M.npz differ diff --git a/feature_matching_v3/sm_v3/63-M.npz b/feature_matching_v3/sm_v3/63-M.npz new file mode 100644 index 0000000..9a7a7f1 Binary files /dev/null and b/feature_matching_v3/sm_v3/63-M.npz differ diff --git a/feature_matching_v3/sm_v3/64-M.npz b/feature_matching_v3/sm_v3/64-M.npz new file mode 100644 index 0000000..f572610 Binary files /dev/null and b/feature_matching_v3/sm_v3/64-M.npz differ diff --git a/feature_matching_v3/sm_v3/65-M.npz b/feature_matching_v3/sm_v3/65-M.npz new file mode 100644 index 0000000..03420a0 Binary files /dev/null and b/feature_matching_v3/sm_v3/65-M.npz differ diff --git a/feature_matching_v3/sm_v3/66-M.npz b/feature_matching_v3/sm_v3/66-M.npz new file mode 100644 index 0000000..931cf5d Binary files /dev/null and b/feature_matching_v3/sm_v3/66-M.npz differ diff --git a/feature_matching_v3/sm_v3/67-M.npz b/feature_matching_v3/sm_v3/67-M.npz new file mode 100644 index 0000000..80ce7f9 Binary files /dev/null and b/feature_matching_v3/sm_v3/67-M.npz differ diff --git a/feature_matching_v3/sm_v3/68-M.npz b/feature_matching_v3/sm_v3/68-M.npz new file mode 100644 index 0000000..e40388f Binary files /dev/null and b/feature_matching_v3/sm_v3/68-M.npz differ diff --git a/feature_matching_v3/sm_v3/69-M.npz b/feature_matching_v3/sm_v3/69-M.npz new file mode 100644 index 0000000..a2ecc02 Binary files /dev/null and b/feature_matching_v3/sm_v3/69-M.npz differ diff --git a/feature_matching_v3/sm_v3/7-M.npz b/feature_matching_v3/sm_v3/7-M.npz new file mode 100644 index 0000000..a673623 Binary files /dev/null and b/feature_matching_v3/sm_v3/7-M.npz differ diff --git a/feature_matching_v3/sm_v3/70-M.npz b/feature_matching_v3/sm_v3/70-M.npz new file mode 100644 index 0000000..db88ee1 Binary files /dev/null and b/feature_matching_v3/sm_v3/70-M.npz differ diff --git a/feature_matching_v3/sm_v3/71-M.npz b/feature_matching_v3/sm_v3/71-M.npz new file mode 100644 index 0000000..c16b915 Binary files /dev/null and b/feature_matching_v3/sm_v3/71-M.npz differ diff --git a/feature_matching_v3/sm_v3/72-M.npz b/feature_matching_v3/sm_v3/72-M.npz new file mode 100644 index 0000000..26a546c Binary files /dev/null and b/feature_matching_v3/sm_v3/72-M.npz differ diff --git a/feature_matching_v3/sm_v3/8-M.npz b/feature_matching_v3/sm_v3/8-M.npz new file mode 100644 index 0000000..b95e86c Binary files /dev/null and b/feature_matching_v3/sm_v3/8-M.npz differ diff --git a/feature_matching_v3/sm_v3/9-M.npz b/feature_matching_v3/sm_v3/9-M.npz new file mode 100644 index 0000000..97c3a1e Binary files /dev/null and b/feature_matching_v3/sm_v3/9-M.npz differ diff --git a/feature_matching_v3/sm_v4/0-M.npz b/feature_matching_v3/sm_v4/0-M.npz new file mode 100644 index 0000000..80c2e59 Binary files /dev/null and b/feature_matching_v3/sm_v4/0-M.npz differ diff --git a/feature_matching_v3/sm_v4/1-M.npz b/feature_matching_v3/sm_v4/1-M.npz new file mode 100644 index 0000000..82d2671 Binary files /dev/null and b/feature_matching_v3/sm_v4/1-M.npz differ diff --git a/feature_matching_v3/sm_v4/10-M.npz b/feature_matching_v3/sm_v4/10-M.npz new file mode 100644 index 0000000..e8b006d Binary files /dev/null and b/feature_matching_v3/sm_v4/10-M.npz differ diff --git a/feature_matching_v3/sm_v4/11-M.npz b/feature_matching_v3/sm_v4/11-M.npz new file mode 100644 index 0000000..720a52d Binary files /dev/null and b/feature_matching_v3/sm_v4/11-M.npz differ diff --git a/feature_matching_v3/sm_v4/12-M.npz b/feature_matching_v3/sm_v4/12-M.npz new file mode 100644 index 0000000..038aab2 Binary files /dev/null and b/feature_matching_v3/sm_v4/12-M.npz differ diff --git a/feature_matching_v3/sm_v4/13-M.npz b/feature_matching_v3/sm_v4/13-M.npz new file mode 100644 index 0000000..d456bda Binary files /dev/null and b/feature_matching_v3/sm_v4/13-M.npz differ diff --git a/feature_matching_v3/sm_v4/14-M.npz b/feature_matching_v3/sm_v4/14-M.npz new file mode 100644 index 0000000..5ddf97f Binary files /dev/null and b/feature_matching_v3/sm_v4/14-M.npz differ diff --git a/feature_matching_v3/sm_v4/15-M.npz b/feature_matching_v3/sm_v4/15-M.npz new file mode 100644 index 0000000..36a1988 Binary files /dev/null and b/feature_matching_v3/sm_v4/15-M.npz differ diff --git a/feature_matching_v3/sm_v4/16-M.npz b/feature_matching_v3/sm_v4/16-M.npz new file mode 100644 index 0000000..792b019 Binary files /dev/null and b/feature_matching_v3/sm_v4/16-M.npz differ diff --git a/feature_matching_v3/sm_v4/17-M.npz b/feature_matching_v3/sm_v4/17-M.npz new file mode 100644 index 0000000..b85c813 Binary files /dev/null and b/feature_matching_v3/sm_v4/17-M.npz differ diff --git a/feature_matching_v3/sm_v4/18-M.npz b/feature_matching_v3/sm_v4/18-M.npz new file mode 100644 index 0000000..be6a0fa Binary files /dev/null and b/feature_matching_v3/sm_v4/18-M.npz differ diff --git a/feature_matching_v3/sm_v4/19-M.npz b/feature_matching_v3/sm_v4/19-M.npz new file mode 100644 index 0000000..5d20aba Binary files /dev/null and b/feature_matching_v3/sm_v4/19-M.npz differ diff --git a/feature_matching_v3/sm_v4/2-M.npz b/feature_matching_v3/sm_v4/2-M.npz new file mode 100644 index 0000000..af95b84 Binary files /dev/null and b/feature_matching_v3/sm_v4/2-M.npz differ diff --git a/feature_matching_v3/sm_v4/20-M.npz b/feature_matching_v3/sm_v4/20-M.npz new file mode 100644 index 0000000..0fe782b Binary files /dev/null and b/feature_matching_v3/sm_v4/20-M.npz differ diff --git a/feature_matching_v3/sm_v4/21-M.npz b/feature_matching_v3/sm_v4/21-M.npz new file mode 100644 index 0000000..d8e20bf Binary files /dev/null and b/feature_matching_v3/sm_v4/21-M.npz differ diff --git a/feature_matching_v3/sm_v4/22-M.npz b/feature_matching_v3/sm_v4/22-M.npz new file mode 100644 index 0000000..59f2106 Binary files /dev/null and b/feature_matching_v3/sm_v4/22-M.npz differ diff --git a/feature_matching_v3/sm_v4/23-M.npz b/feature_matching_v3/sm_v4/23-M.npz new file mode 100644 index 0000000..04f1e1e Binary files /dev/null and b/feature_matching_v3/sm_v4/23-M.npz differ diff --git a/feature_matching_v3/sm_v4/24-M.npz b/feature_matching_v3/sm_v4/24-M.npz new file mode 100644 index 0000000..f30cc19 Binary files /dev/null and b/feature_matching_v3/sm_v4/24-M.npz differ diff --git a/feature_matching_v3/sm_v4/25-M.npz b/feature_matching_v3/sm_v4/25-M.npz new file mode 100644 index 0000000..74940e3 Binary files /dev/null and b/feature_matching_v3/sm_v4/25-M.npz differ diff --git a/feature_matching_v3/sm_v4/26-M.npz b/feature_matching_v3/sm_v4/26-M.npz new file mode 100644 index 0000000..62441df Binary files /dev/null and b/feature_matching_v3/sm_v4/26-M.npz differ diff --git a/feature_matching_v3/sm_v4/27-M.npz b/feature_matching_v3/sm_v4/27-M.npz new file mode 100644 index 0000000..74d92e3 Binary files /dev/null and b/feature_matching_v3/sm_v4/27-M.npz differ diff --git a/feature_matching_v3/sm_v4/28-M.npz b/feature_matching_v3/sm_v4/28-M.npz new file mode 100644 index 0000000..9536b2c Binary files /dev/null and b/feature_matching_v3/sm_v4/28-M.npz differ diff --git a/feature_matching_v3/sm_v4/29-M.npz b/feature_matching_v3/sm_v4/29-M.npz new file mode 100644 index 0000000..813668d Binary files /dev/null and b/feature_matching_v3/sm_v4/29-M.npz differ diff --git a/feature_matching_v3/sm_v4/3-M.npz b/feature_matching_v3/sm_v4/3-M.npz new file mode 100644 index 0000000..8c5fa66 Binary files /dev/null and b/feature_matching_v3/sm_v4/3-M.npz differ diff --git a/feature_matching_v3/sm_v4/30-M.npz b/feature_matching_v3/sm_v4/30-M.npz new file mode 100644 index 0000000..3af9810 Binary files /dev/null and b/feature_matching_v3/sm_v4/30-M.npz differ diff --git a/feature_matching_v3/sm_v4/31-M.npz b/feature_matching_v3/sm_v4/31-M.npz new file mode 100644 index 0000000..c8be4aa Binary files /dev/null and b/feature_matching_v3/sm_v4/31-M.npz differ diff --git a/feature_matching_v3/sm_v4/32-M.npz b/feature_matching_v3/sm_v4/32-M.npz new file mode 100644 index 0000000..7ec09f5 Binary files /dev/null and b/feature_matching_v3/sm_v4/32-M.npz differ diff --git a/feature_matching_v3/sm_v4/33-M.npz b/feature_matching_v3/sm_v4/33-M.npz new file mode 100644 index 0000000..5d0dca8 Binary files /dev/null and b/feature_matching_v3/sm_v4/33-M.npz differ diff --git a/feature_matching_v3/sm_v4/34-M.npz b/feature_matching_v3/sm_v4/34-M.npz new file mode 100644 index 0000000..13789d7 Binary files /dev/null and b/feature_matching_v3/sm_v4/34-M.npz differ diff --git a/feature_matching_v3/sm_v4/35-M.npz b/feature_matching_v3/sm_v4/35-M.npz new file mode 100644 index 0000000..0a0fe73 Binary files /dev/null and b/feature_matching_v3/sm_v4/35-M.npz differ diff --git a/feature_matching_v3/sm_v4/36-M.npz b/feature_matching_v3/sm_v4/36-M.npz new file mode 100644 index 0000000..9ccdedf Binary files /dev/null and b/feature_matching_v3/sm_v4/36-M.npz differ diff --git a/feature_matching_v3/sm_v4/37-M.npz b/feature_matching_v3/sm_v4/37-M.npz new file mode 100644 index 0000000..8e2a665 Binary files /dev/null and b/feature_matching_v3/sm_v4/37-M.npz differ diff --git a/feature_matching_v3/sm_v4/38-M.npz b/feature_matching_v3/sm_v4/38-M.npz new file mode 100644 index 0000000..4bc56e1 Binary files /dev/null and b/feature_matching_v3/sm_v4/38-M.npz differ diff --git a/feature_matching_v3/sm_v4/39-M.npz b/feature_matching_v3/sm_v4/39-M.npz new file mode 100644 index 0000000..92c81e7 Binary files /dev/null and b/feature_matching_v3/sm_v4/39-M.npz differ diff --git a/feature_matching_v3/sm_v4/4-M.npz b/feature_matching_v3/sm_v4/4-M.npz new file mode 100644 index 0000000..227dd8b Binary files /dev/null and b/feature_matching_v3/sm_v4/4-M.npz differ diff --git a/feature_matching_v3/sm_v4/40-M.npz b/feature_matching_v3/sm_v4/40-M.npz new file mode 100644 index 0000000..1470096 Binary files /dev/null and b/feature_matching_v3/sm_v4/40-M.npz differ diff --git a/feature_matching_v3/sm_v4/41-M.npz b/feature_matching_v3/sm_v4/41-M.npz new file mode 100644 index 0000000..5610c7e Binary files /dev/null and b/feature_matching_v3/sm_v4/41-M.npz differ diff --git a/feature_matching_v3/sm_v4/42-M.npz b/feature_matching_v3/sm_v4/42-M.npz new file mode 100644 index 0000000..cb9795c Binary files /dev/null and b/feature_matching_v3/sm_v4/42-M.npz differ diff --git a/feature_matching_v3/sm_v4/43-M.npz b/feature_matching_v3/sm_v4/43-M.npz new file mode 100644 index 0000000..49ba8e2 Binary files /dev/null and b/feature_matching_v3/sm_v4/43-M.npz differ diff --git a/feature_matching_v3/sm_v4/44-M.npz b/feature_matching_v3/sm_v4/44-M.npz new file mode 100644 index 0000000..10f16e2 Binary files /dev/null and b/feature_matching_v3/sm_v4/44-M.npz differ diff --git a/feature_matching_v3/sm_v4/45-M.npz b/feature_matching_v3/sm_v4/45-M.npz new file mode 100644 index 0000000..38a6dd3 Binary files /dev/null and b/feature_matching_v3/sm_v4/45-M.npz differ diff --git a/feature_matching_v3/sm_v4/46-M.npz b/feature_matching_v3/sm_v4/46-M.npz new file mode 100644 index 0000000..5b5dabc Binary files /dev/null and b/feature_matching_v3/sm_v4/46-M.npz differ diff --git a/feature_matching_v3/sm_v4/47-M.npz b/feature_matching_v3/sm_v4/47-M.npz new file mode 100644 index 0000000..3f4a514 Binary files /dev/null and b/feature_matching_v3/sm_v4/47-M.npz differ diff --git a/feature_matching_v3/sm_v4/48-M.npz b/feature_matching_v3/sm_v4/48-M.npz new file mode 100644 index 0000000..915c758 Binary files /dev/null and b/feature_matching_v3/sm_v4/48-M.npz differ diff --git a/feature_matching_v3/sm_v4/49-M.npz b/feature_matching_v3/sm_v4/49-M.npz new file mode 100644 index 0000000..e0e65f7 Binary files /dev/null and b/feature_matching_v3/sm_v4/49-M.npz differ diff --git a/feature_matching_v3/sm_v4/5-M.npz b/feature_matching_v3/sm_v4/5-M.npz new file mode 100644 index 0000000..6266a11 Binary files /dev/null and b/feature_matching_v3/sm_v4/5-M.npz differ diff --git a/feature_matching_v3/sm_v4/50-M.npz b/feature_matching_v3/sm_v4/50-M.npz new file mode 100644 index 0000000..982799f Binary files /dev/null and b/feature_matching_v3/sm_v4/50-M.npz differ diff --git a/feature_matching_v3/sm_v4/51-M.npz b/feature_matching_v3/sm_v4/51-M.npz new file mode 100644 index 0000000..10077a4 Binary files /dev/null and b/feature_matching_v3/sm_v4/51-M.npz differ diff --git a/feature_matching_v3/sm_v4/52-M.npz b/feature_matching_v3/sm_v4/52-M.npz new file mode 100644 index 0000000..8cf38f2 Binary files /dev/null and b/feature_matching_v3/sm_v4/52-M.npz differ diff --git a/feature_matching_v3/sm_v4/53-M.npz b/feature_matching_v3/sm_v4/53-M.npz new file mode 100644 index 0000000..2e25ddf Binary files /dev/null and b/feature_matching_v3/sm_v4/53-M.npz differ diff --git a/feature_matching_v3/sm_v4/54-M.npz b/feature_matching_v3/sm_v4/54-M.npz new file mode 100644 index 0000000..b250d52 Binary files /dev/null and b/feature_matching_v3/sm_v4/54-M.npz differ diff --git a/feature_matching_v3/sm_v4/55-M.npz b/feature_matching_v3/sm_v4/55-M.npz new file mode 100644 index 0000000..d17291a Binary files /dev/null and b/feature_matching_v3/sm_v4/55-M.npz differ diff --git a/feature_matching_v3/sm_v4/56-M.npz b/feature_matching_v3/sm_v4/56-M.npz new file mode 100644 index 0000000..38b3d2d Binary files /dev/null and b/feature_matching_v3/sm_v4/56-M.npz differ diff --git a/feature_matching_v3/sm_v4/57-M.npz b/feature_matching_v3/sm_v4/57-M.npz new file mode 100644 index 0000000..84e1ece Binary files /dev/null and b/feature_matching_v3/sm_v4/57-M.npz differ diff --git a/feature_matching_v3/sm_v4/58-M.npz b/feature_matching_v3/sm_v4/58-M.npz new file mode 100644 index 0000000..66cd3eb Binary files /dev/null and b/feature_matching_v3/sm_v4/58-M.npz differ diff --git a/feature_matching_v3/sm_v4/59-M.npz b/feature_matching_v3/sm_v4/59-M.npz new file mode 100644 index 0000000..1b5a777 Binary files /dev/null and b/feature_matching_v3/sm_v4/59-M.npz differ diff --git a/feature_matching_v3/sm_v4/6-M.npz b/feature_matching_v3/sm_v4/6-M.npz new file mode 100644 index 0000000..7b32da7 Binary files /dev/null and b/feature_matching_v3/sm_v4/6-M.npz differ diff --git a/feature_matching_v3/sm_v4/60-M.npz b/feature_matching_v3/sm_v4/60-M.npz new file mode 100644 index 0000000..5136954 Binary files /dev/null and b/feature_matching_v3/sm_v4/60-M.npz differ diff --git a/feature_matching_v3/sm_v4/61-M.npz b/feature_matching_v3/sm_v4/61-M.npz new file mode 100644 index 0000000..9abfe06 Binary files /dev/null and b/feature_matching_v3/sm_v4/61-M.npz differ diff --git a/feature_matching_v3/sm_v4/62-M.npz b/feature_matching_v3/sm_v4/62-M.npz new file mode 100644 index 0000000..c7ea003 Binary files /dev/null and b/feature_matching_v3/sm_v4/62-M.npz differ diff --git a/feature_matching_v3/sm_v4/63-M.npz b/feature_matching_v3/sm_v4/63-M.npz new file mode 100644 index 0000000..5426ad1 Binary files /dev/null and b/feature_matching_v3/sm_v4/63-M.npz differ diff --git a/feature_matching_v3/sm_v4/64-M.npz b/feature_matching_v3/sm_v4/64-M.npz new file mode 100644 index 0000000..71adea8 Binary files /dev/null and b/feature_matching_v3/sm_v4/64-M.npz differ diff --git a/feature_matching_v3/sm_v4/65-M.npz b/feature_matching_v3/sm_v4/65-M.npz new file mode 100644 index 0000000..4e267fb Binary files /dev/null and b/feature_matching_v3/sm_v4/65-M.npz differ diff --git a/feature_matching_v3/sm_v4/66-M.npz b/feature_matching_v3/sm_v4/66-M.npz new file mode 100644 index 0000000..4e2cd22 Binary files /dev/null and b/feature_matching_v3/sm_v4/66-M.npz differ diff --git a/feature_matching_v3/sm_v4/67-M.npz b/feature_matching_v3/sm_v4/67-M.npz new file mode 100644 index 0000000..d13435a Binary files /dev/null and b/feature_matching_v3/sm_v4/67-M.npz differ diff --git a/feature_matching_v3/sm_v4/68-M.npz b/feature_matching_v3/sm_v4/68-M.npz new file mode 100644 index 0000000..51f3c44 Binary files /dev/null and b/feature_matching_v3/sm_v4/68-M.npz differ diff --git a/feature_matching_v3/sm_v4/69-M.npz b/feature_matching_v3/sm_v4/69-M.npz new file mode 100644 index 0000000..da4facd Binary files /dev/null and b/feature_matching_v3/sm_v4/69-M.npz differ diff --git a/feature_matching_v3/sm_v4/7-M.npz b/feature_matching_v3/sm_v4/7-M.npz new file mode 100644 index 0000000..05be70e Binary files /dev/null and b/feature_matching_v3/sm_v4/7-M.npz differ diff --git a/feature_matching_v3/sm_v4/70-M.npz b/feature_matching_v3/sm_v4/70-M.npz new file mode 100644 index 0000000..8d09bd0 Binary files /dev/null and b/feature_matching_v3/sm_v4/70-M.npz differ diff --git a/feature_matching_v3/sm_v4/71-M.npz b/feature_matching_v3/sm_v4/71-M.npz new file mode 100644 index 0000000..75407e9 Binary files /dev/null and b/feature_matching_v3/sm_v4/71-M.npz differ diff --git a/feature_matching_v3/sm_v4/72-M.npz b/feature_matching_v3/sm_v4/72-M.npz new file mode 100644 index 0000000..3f2b74d Binary files /dev/null and b/feature_matching_v3/sm_v4/72-M.npz differ diff --git a/feature_matching_v3/sm_v4/8-M.npz b/feature_matching_v3/sm_v4/8-M.npz new file mode 100644 index 0000000..c204fa2 Binary files /dev/null and b/feature_matching_v3/sm_v4/8-M.npz differ diff --git a/feature_matching_v3/sm_v4/9-M.npz b/feature_matching_v3/sm_v4/9-M.npz new file mode 100644 index 0000000..ac02cc4 Binary files /dev/null and b/feature_matching_v3/sm_v4/9-M.npz differ diff --git a/feature_matching_v3/util_cv.py b/feature_matching_v3/util_cv.py new file mode 100644 index 0000000..1eb5f2d --- /dev/null +++ b/feature_matching_v3/util_cv.py @@ -0,0 +1,12 @@ +import cv2 +def match_to_cv(matches): + cv = [] + for i in range(matches.shape[0]): + m = matches[i] + temp = cv2.DMatch() + temp.queryIdx = int(m[0]) + temp.imgIdx = int(m[0]) + temp.trainIdx = int(m[1]) + temp.distance = int(m[2]) + cv.append(temp) + return cv \ No newline at end of file diff --git a/feature_matching_v3/util_matching.py b/feature_matching_v3/util_matching.py new file mode 100644 index 0000000..34c7841 --- /dev/null +++ b/feature_matching_v3/util_matching.py @@ -0,0 +1,151 @@ +# Author: Jose G Perez +# Version 1.0 +# Last Modified: January 31, 2018 +import numpy as np +import cv2 +import cProfile +RADIUS = 25 # 25 +RADIUS_SQUARED = RADIUS ** 2 +SCALE_THRESHOLD = 3 # 3 +DISTANCE_THRESHOLD = 200 # 200 +RESPONSE_THRESHOLD = 0.01 # 0.01 + +def perform_match(s_idx): + global s_kp, s_des, pw_kp, pw_des + matches = [] + print('s_idx', s_idx) + for pw_idx in range(pw_kp.shape[0]): + matches.append(match(s_kp[s_idx], s_des[s_idx], pw_kp[pw_idx], pw_des[pw_idx])) + + np.savez_compressed(str(s_idx) + '-M', m=matches) + +def match(kp1, des1, kp2, des2): + matches = [] + for idx1 in range(len(kp1)): + kpa = kp1[idx1] + kpa_response = kpa[4] + if kpa_response < RESPONSE_THRESHOLD: + continue + + kpa_x = kpa[0] + kpa_y = kpa[1] + kpa_size = kpa[2] + #kpa_angle = kpa[3] + dpa = des1[idx1] + + best_distance = float('inf') + best_idx2 = -1 + + for idx2 in range(len(kp2)): + kpb = kp2[idx2] + # 0: Response Strength + kpb_response = kpb[4] + if kpb_response < RESPONSE_THRESHOLD: + continue + + # 1: Distance/Radius Check + kpb_x = kpb[0] + kpb_y = kpb[1] + d_pt_squared = (kpb_x - kpa_x) ** 2 + (kpb_y - kpa_y) ** 2 + if d_pt_squared >= RADIUS_SQUARED: + continue + + # 2: Scale Difference + kpb_size = kpb[2] + scale_diff = abs(kpa_size - kpb_size) + if scale_diff > SCALE_THRESHOLD: + continue + + # 3: Descriptor L2 Norm + dpb = des2[idx2] + d_des = np.linalg.norm(dpb - dpa) + if d_des < best_distance: + best_distance = d_des + best_idx2 = idx2 + + # 4: ?? Angle ?? + #kpb_angle = kpb[3] + + if best_idx2 == -1 or best_distance > DISTANCE_THRESHOLD: + continue + + match = np.array([idx1, best_idx2, best_distance], dtype=np.int32) + matches.append(match) + + return np.asarray(matches) + +def match_details(kp1, des1, kp2, des2): + matches = [] + matches_cv = [] + stat_s_diff = set() + stat_d_dist = set() + stat_resp_kp1 = set() + stat_resp_kp2 = set() + stat_rad = set() + for idx1 in range(len(kp1)): + kpa = kp1[idx1] + kpa_response = kpa[4] + stat_resp_kp1.add(kpa_response) + if kpa_response < RESPONSE_THRESHOLD: + continue + + kpa_x = kpa[0] + kpa_y = kpa[1] + kpa_size = kpa[2] + #kpa_angle = kpa[3] + dpa = des1[idx1] + + best_distance = float('inf') + best_idx2 = -1 + + for idx2 in range(len(kp2)): + kpb = kp2[idx2] + # 0: Response Strength + kpb_response = kpb[4] + stat_resp_kp2.add(kpb_response) + if kpb_response < RESPONSE_THRESHOLD: + continue + + # 1: Distance/Radius Check + kpb_x = kpb[0] + kpb_y = kpb[1] + d_pt_squared = (kpb_x - kpa_x) ** 2 + (kpb_y - kpa_y) ** 2 + stat_rad.add(np.linalg.norm(np.array([kpb_x,kpb_y]) - np.array([kpa_x,kpa_y]))) + if d_pt_squared >= RADIUS_SQUARED: + continue + + # 2: Scale Difference + kpb_size = kpb[2] + scale_diff = abs(kpa_size - kpb_size) + stat_s_diff.add(scale_diff) + if scale_diff > SCALE_THRESHOLD: + continue + + # 3: Descriptor L2 Norm + dpb = des2[idx2] + d_des = np.linalg.norm(dpb - dpa) + stat_d_dist.add(d_des) + if d_des < best_distance: + best_distance = d_des + best_idx2 = idx2 + + # 4: ?? Angle ?? + # kpb_angle = kpb[3] + + if best_idx2 == -1 or best_distance > DISTANCE_THRESHOLD: + continue + + match = np.array([idx1, best_idx2, best_distance], dtype=np.int32) + matches.append(match) + + match = cv2.DMatch() + match.queryIdx = idx1 + match.imgIdx = idx1 + match.trainIdx = best_idx2 + match.distance = best_distance + matches_cv.append(match) + + return np.asarray(matches), np.asarray(matches_cv), \ + np.asarray(stat_s_diff), np.asarray(stat_d_dist), \ + np.asarray(stat_resp_kp1), np.asarray(stat_resp_kp2), \ + np.asarray(stat_rad) \ No newline at end of file diff --git a/feature_matching_v3/util_ransac.py b/feature_matching_v3/util_ransac.py new file mode 100644 index 0000000..333d81e --- /dev/null +++ b/feature_matching_v3/util_ransac.py @@ -0,0 +1,46 @@ +import numpy as np +import cv2 + +DISTANCE_RATIO = 0.95 +RANSAC_REPROJ_TRESHHOLD = 10 # The higher the threshold, the lower the inliers +RANSAC_MAX_ITERS = 2000 +RANSAC_CONFIDENCE = 0.99 +BF = cv2.BFMatcher(normType=cv2.NORM_L2) + +def perform_ransac(s_idx): + global s_kp, s_des, pw_kp, pw_des + matches = [] + print('s_idx', s_idx) + for pw_idx in range(pw_kp.shape[0]): + mat = BF.knnMatch(s_des[s_idx], pw_des[pw_idx], k=2) + mat = [m[0] for m in mat if len(m) == 2 and m[0].distance < m[1].distance * DISTANCE_RATIO] + src_pts = np.float32([(s_kp[s_idx][m.queryIdx][0],s_kp[s_idx][m.queryIdx][1]) for m in mat]) + dst_pts = np.float32([(pw_kp[pw_idx][m.trainIdx][0],pw_kp[pw_idx][m.trainIdx][1]) for m in mat]) + H, mask = cv2.findHomography(src_pts, dst_pts, method=cv2.RANSAC, ransacReprojThreshold=RANSAC_REPROJ_TRESHHOLD,maxIters=RANSAC_MAX_ITERS, confidence=RANSAC_CONFIDENCE) + matches.append(np.array([mask.sum()])) + + np.savez_compressed(str(s_idx) + '-R', m=matches) + +def imshow_ransac(): + import os + import pylab as plt + im_inliers = np.zeros((73, 89)) + for sidx in range(73): + path = os.path.join('sm_ransac', str(sidx) + '-R.npz') + m = np.load(path)['m'] + inliers = [] + for pidx in range(89): + pw_matches = m[pidx] + inliers.append(pw_matches[0]) + inlier_norm = np.array(inliers) / np.max(inliers) + im_inliers[sidx] = (inlier_norm * 255).reshape(1, 89) + + fig = plt.figure(0) + ax = fig.add_subplot(111) + ax.set_xlabel('PW Level') + ax.set_ylabel('S Level') + ax.set_xticks(np.arange(0,89,5)) + ax.set_yticks(np.arange(0,72,5)) + ax.set_title('Inliers') + plt.set_cmap(plt.get_cmap('hot')) + plt.imshow(im_inliers) \ No newline at end of file diff --git a/feature_matching_v3/util_sift.py b/feature_matching_v3/util_sift.py new file mode 100644 index 0000000..54235dc --- /dev/null +++ b/feature_matching_v3/util_sift.py @@ -0,0 +1,49 @@ +# Author: Jose G Perez +# Version 1.0 +# Last Modified: January 31, 2018 +import numpy as np +import cv2 +import os +SIFT = cv2.xfeatures2d.SIFT_create(contrastThreshold=0.05, edgeThreshold=100, sigma=2) + +def kp_to_array(kp): + array = np.zeros((len(kp), 7), dtype=np.float32) + for idx in range(array.shape[0]): + k = kp[idx] + array[idx] = np.array([k.pt[0], k.pt[1], k.size,k.angle,k.response,k.octave,k.class_id]) + return array + +def array_to_kp(array): + kp = [] + for idx in range(array.shape[0]): + k = array[idx] + kp.append(cv2.KeyPoint(k[0],k[1],k[2],k[3],k[4],k[5],k[6])) + return kp + +def __precompute_atlas(name): + if not os.path.isfile(name + '_SIFT.npz'): + print('Precomputing SIFT for ', name) + atlas_data = np.load(name + ".npz") + atlas_im = atlas_data['images'] + atlas_labels = atlas_data['labels'] + atlas_kp = [] + atlas_des = [] + + for i in range(0, atlas_im.shape[0]): + kp, des = SIFT.detectAndCompute(atlas_im[i], None) + kp = kp_to_array(kp) + atlas_kp.append(kp) + atlas_des.append(des) + + atlas_kp = np.asarray(atlas_kp) + atlas_des = np.asarray(atlas_des) + + np.savez_compressed(name + '_SIFT', images=atlas_im, labels=atlas_labels, kp=atlas_kp, des=atlas_des) + +def precompute_sift(S_NAME, PW_NAME): + __precompute_atlas(S_NAME) + __precompute_atlas(PW_NAME) + +def load_sift(path): + data = np.load(path) + return data['images'], data['labels'], data['kp'], data['des'] \ No newline at end of file diff --git a/feature_matching_v3/util_sm.py b/feature_matching_v3/util_sm.py new file mode 100644 index 0000000..b157549 --- /dev/null +++ b/feature_matching_v3/util_sm.py @@ -0,0 +1,42 @@ +# Author: Jose G Perez +# Version 1.0 +# Last Modified: January 31, 2018 +import numpy as np +import os + +def load_sm(folder, s_kp, pw_kp): + sm_match = np.zeros((s_kp.shape[0],pw_kp.shape[0])) + sm_metric = np.zeros((s_kp.shape[0],pw_kp.shape[0])) + for sidx in range(sm_match.shape[0]): + path = os.path.join(folder, str(sidx) + '-M.npz') + m = np.load(path)['m'] + count = [] + metric = [] + for pidx in range(sm_match.shape[1]): + pw_matches = m[pidx] + count.append(len(pw_matches)) + metric.append(len(pw_matches) / (len(s_kp[sidx]) + len(pw_kp[pidx]) - len(pw_matches))) + sm_match[sidx] = np.asarray(count) + sm_metric[sidx] = np.asarray(metric) + return sm_match, sm_metric + +def norm2_sm(sm, max_value=255): + im_result = np.zeros_like(sm) + for idx in range(sm.shape[0]): + norm = sm[idx] / np.max(sm[idx]) + im_result[idx] = (norm*max_value).reshape(1, sm.shape[1]) + return im_result + +def norm_prob_sm(sm): + norm = np.zeros_like(sm) + for idx in range(sm.shape[0]): + norm[idx] = sm[idx] / np.sum(sm[idx]) + return norm + +def norm_sm(sm, max_value=255, min_value=0): + im_result = np.zeros_like(sm) + for idx in range(sm.shape[0]): + x = sm[idx] + norm = ((x - np.min(x))*(max_value-min_value)) / (np.max(x)-np.min(x)) + min_value + im_result[idx] = (norm).reshape(1, sm.shape[1]) + return im_result diff --git a/feature_matching_v3/util_visualization.py b/feature_matching_v3/util_visualization.py new file mode 100644 index 0000000..dce860a --- /dev/null +++ b/feature_matching_v3/util_visualization.py @@ -0,0 +1,84 @@ +#%% Visualization utilities for experiments +# Author: Jose G Perez +# Version 1.0 +# Last Modified: March 20, 2020 +from skimage import color +import pylab as plt +import numpy as np + + +def imshow(im, title=''): + figure = plt.figure() + plt.axis('off') + plt.tick_params(axis='both', + left='off', top='off', right='off', bottom='off', + labelleft='off', labeltop='off', labelright='off', labelbottom='off') + + plt.title(title) + plt.imshow(im) + return figure + + +def imshow_matches__(im, title): + fig = plt.figure() + ax = fig.add_subplot(111) + ax.set_xlabel('PW Level') + ax.set_ylabel('S Level') + ax.set_title(title) + plt.set_cmap(plt.get_cmap('hot')) + plt.imshow(im) + + +def imshow_matches(im, title): + fig = plt.figure() + ax = fig.add_subplot(111) + # ax.set_xlabel('PW Level') + # ax.set_ylabel('S Level') + # ax.set_xticks(s_label) + # ax.set_yticks(pw_label) + ax.set_title(title) + plt.set_cmap(plt.get_cmap('hot')) + plt.imshow(im) + + +def overlay(im_bg, im_fg): + img_color = np.stack((im_bg,)*3,axis=2) + img_hsv = color.rgb2hsv(img_color) + color_mask_hsv = color.rgb2hsv(im_fg) + img_hsv[..., 0] = color_mask_hsv[..., 0] + img_hsv[..., 1] = color_mask_hsv[..., 1] + im_overlay = color.hsv2rgb(img_hsv) + + return im_overlay + + +def imshow_detailed(np_arr, title, axis_xlabel, axis_ylabel, xlabel_arr, ylabel_arr, value_to_str_func=lambda i, j, val: val): + fig = plt.figure() + ax = fig.gca() + + plt.setp(ax.get_xticklabels(), rotation=90, horizontalalignment='right') + for tick in ax.xaxis.get_major_ticks(): + tick.label.set_fontsize(8) + + for tick in ax.yaxis.get_major_ticks(): + tick.label.set_fontsize(8) + + ax.set_title(title) + ax.set_xlabel(axis_xlabel) + ax.set_ylabel(axis_ylabel) + + # Show all ticks + ax.set_xticks(np.arange(len(xlabel_arr))) + ax.set_yticks(np.arange(len(ylabel_arr))) + + # Proper labels + ax.set_xticklabels(xlabel_arr) + ax.set_yticklabels(ylabel_arr) + + # Show values + if value_to_str_func is not None: + for i in range(np_arr.shape[0]): + for j in range(np_arr.shape[1]): + text = ax.text(j, i, value_to_str_func(i, j, np_arr[i, j]), ha="center", va="center", color="w") + + ax.imshow(np_arr) \ No newline at end of file diff --git a/matching_networks/LICENSE b/matching_networks/LICENSE deleted file mode 100644 index 5295f51..0000000 --- a/matching_networks/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 AntreasAntoniou - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/matching_networks/README.md b/matching_networks/README.md deleted file mode 100644 index daa6ac4..0000000 --- a/matching_networks/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# MatchingNetworks Tensorflow Implementation -This repo provides code that replicated the results of the Matching Networks for One Shot Learning paper on the Omniglot dataset. - -# Training a model -To train a model simply modify the experiment parameters in the [train_one_shot_learning_matching_network.py](https://github.com/AntreasAntoniou/MatchingNetworks/blob/master/train_one_shot_learning_matching_network.py) to match your requirements, for a one shot, 20-way experiment leave the parameters to default, for a 5-way one shot learning modify -``` -classes_per_set = 20 -samples_per_class = 1 -``` -to -``` -classes_per_set = 5 -samples_per_class = 1 -``` -And then run `python train_one_shot_learning_matching_network.py` - -# Features -The code supports automatic checkpointing as well as statistics saving. It uses 1200 classes for training, 300 classes for testing and 122 classes for validation. We check for a better validation score at each epoch and produce test statistics when the validation score has improved. Furthermore the number of classes and samples per class can be modified and the code will be able to handle any combinations that do not exceed the available memory. As an additional feature we have added support for full context embeddings in our implementation. - -Our implementation uses the omniglot dataset, but one can easily add a new data provider and then build a new experiment by passing the data provider to the ExperimentBuilder class and the system should work with it, as long as it provides the batches in the same way as our data provider, more details can be found in data.py - -# Acknowledgements -Special thanks to https://github.com/zergylord for his Matching Networks implementation of which parts were used for this implementation. More details at https://github.com/zergylord/oneshot - -Additional thanks to my colleagues https://github.com/gngdb, https://github.com/ZackHodari and https://github.com/artur-bekasov for reviewing my code and providing pointers. diff --git a/matching_networks/saved_models/README b/matching_networks/saved_models/README deleted file mode 100644 index 2651cc4..0000000 --- a/matching_networks/saved_models/README +++ /dev/null @@ -1 +0,0 @@ -This is where we save our model checkpoints. \ No newline at end of file diff --git a/siamese_network/atlas_pw.npz b/siamese_network/atlas_pw.npz deleted file mode 100644 index 41cb051..0000000 Binary files a/siamese_network/atlas_pw.npz and /dev/null differ diff --git a/siamese_network/atlas_sw.npz b/siamese_network/atlas_sw.npz deleted file mode 100644 index 520367b..0000000 Binary files a/siamese_network/atlas_sw.npz and /dev/null differ