Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat annotation UI #1

Merged

Conversation

YonatanSimson
Copy link
Owner

Update forked repo

Manuel Lopez Antequera and others added 20 commits February 10, 2021 23:10
Summary:
pygeometry.triangulate_bearings_midpoint returns a valid flag and a possibly invalid triangulated point.

At some point in the past we expected the point to be None if it was invalid. This is no longer true. I imagine it changed during the C++ redo. Now the boolean flag returned from c++ has to be explicitly checked.

This broke object merge and also the triangulation of GCPs, where this was also not being checked.

I've also removed duplicate functionality to triangulate a gcp that I found while looking for calls of pygeometry.triangulate_bearings_midpoint and renamed usages such that the meaning of the output of this function is clearer.

Reviewed By: paulinus

Differential Revision: D26368979

fbshipit-source-id: 8effa919d1112060d38b024f74da288b7f206dea
Summary:
This Diff aims at introducing a command for creating rig definition data : `rig_models.json` and `rig_assignment.json`

To do so, we define the `rig_models.json` and `rig_assignments.json` as explained in the updated documentation.

The `create_rig` command takes a JSON dictionary as input :
```
'{"RIG-MODEL_ID1": {"RIG_CAMERA_ID1":"PATTERN1", "RIG_CAMERA_ID2 (https://github.com/mapillary/opensfm/commit/1c4872c8113fbb5e9d966eea0d22c5290b3144bf)":"PATTERN2", ...}
"RIG-MODEL_ID2 (1c4872c)": ...
}'
```
where PATTERN is the following :
 - A camera model ID if the method for assigning is `camera`
 - A REGEX with the form (.*) where the part in parenthesis identifies the camera models : would be "(left)", "(right)", ... for NCTech data, could also be "(Sensor1_)" or "(RED)" for multispectral data, when the method is `pattern`

It then creates the shots-to-rig-instances assignments, create a symlinked dataset with enough of these rig instances and run SfM on this subset dataset. From this SfM reconstruction, it then tries to infer some averaged rig models poses, which are then written to `rig_models.json`.

In a further Diff, we are going to :
 - Introduce rig datastructures
 - Rig synthetic data that leverage the above
Thanks to the above, we'll be able to test the `create_rig` command.

Reviewed By: fabianschenk

Differential Revision: D26252385

fbshipit-source-id: 55e8ba3cce0d58a606d806d834e6afce60144525
Summary:
Fix camera_test to compile on Fedora:
```
[ 89%] Linking CXX executable geometry_test
/usr/bin/ld: CMakeFiles/geometry_test.dir/test/camera_test.cc.o: in function `CameraFixture_PerspectiveReturnCorrectValues_Test::TestBody()':
camera_test.cc:(.text+0xf83): undefined reference to `CameraFixture::focal'
/usr/bin/ld: CMakeFiles/geometry_test.dir/test/camera_test.cc.o: in function `CameraFixture_FisheyeReturnCorrectValues_Test::TestBody()':
camera_test.cc:(.text+0x1133): undefined reference to `CameraFixture::focal'
/usr/bin/ld: CMakeFiles/geometry_test.dir/test/camera_test.cc.o: in function `CameraFixture_SimpleRadialReturnCorrectValues_Test::TestBody()':
camera_test.cc:(.text+0x12f0): undefined reference to `CameraFixture::focal'
/usr/bin/ld: CMakeFiles/geometry_test.dir/test/camera_test.cc.o: in function `CameraFixture_DualReturnCorrectValues_Test::TestBody()':
camera_test.cc:(.text+0x154a): undefined reference to `CameraFixture::focal'
/usr/bin/ld: CMakeFiles/geometry_test.dir/test/camera_test.cc.o: in function `CameraFixture_BrownReturnCorrectValues_Test::TestBody()':
camera_test.cc:(.text+0x5bf0): undefined reference to `CameraFixture::focal'
/usr/bin/ld: CMakeFiles/geometry_test.dir/test/camera_test.cc.o:camera_test.cc:(.text+0x5ec0): more undefined references to `CameraFixture::focal' follow
collect2: error: ld returned 1 exit status
make[2]: *** [geometry/CMakeFiles/geometry_test.dir/build.make:162: geometry/geometry_test] Error 1
make[1]: *** [CMakeFiles/Makefile2:888: geometry/CMakeFiles/geometry_test.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
```

Reviewed By: mlopezantequera

Differential Revision: D26400837

fbshipit-source-id: 2cdcee795ba3495ee0ffa05fbb6315e91ee53c10
Summary: Pull Request resolved: #705

Reviewed By: fabianschenk

Differential Revision: D26400076

Pulled By: mlopezantequera

fbshipit-source-id: 670d893875f7e020f4b28adb328ef3fd6a55b703
Reviewed By: paulinus

Differential Revision: D26400048

fbshipit-source-id: 88f0bdf238f9d534a8268f2e3629d9fda51cb900
Summary: This Diff aims at allowing constructing camera directly from their parameters types and values removing the huge switch section in pickle+pybind parts.

Reviewed By: fabianschenk, paulinus

Differential Revision: D26304145

fbshipit-source-id: 46598aad51cbd24e2f20434255f21674fb43fcc0
Summary: This Diff aims at refactoring ShotMeasurement so it becomes now OptionalValue in foundation, as some kind of std::foundation replacement (for now).

Reviewed By: fabianschenk, paulinus

Differential Revision: D26399406

fbshipit-source-id: ade68834bf25ba28f7483ecd8bd3b50084d5adbe
Summary:
This Diff aims at cleaning-up some non-used/dead code :
 - Removed legacy camera and pose types from Python opensfm.types
 - Misc map pybinding (getters mostly)
 - A bit of re-ordering of things in big files (map pybinding)
 - Landmarks unused getters

Reviewed By: fabianschenk, paulinus

Differential Revision: D26399408

fbshipit-source-id: f386dd7879ff18e8dbacdacf560b5c19fbe94156
Summary:
This Diff aims at introducing new datastructures for supporting Rigs in OpenSfM. The design is roughly the following :
 - A RigModel holds RigCamera and is then instanciated as a RigInstance by holding reference to Shots
 - Shots have a RigCamera and a RigInstance model from which they can computed their pose when GetPose*() is called. These member are read-only from the Shot, so SetPose and ref. GetPose now throw on rig-related Shots.

The bulk implementation consists in :
 - Adding RigCamera/RigModel/RigInstance in map/rig.h+cc
 - Corresponding C++ unit tests
 - Plug them in C++ map/map.h+cc
 - Add corresponding C++ unit tests. We took the opportunity to refactor all unit tests.
 - Make Python Reconstruction have two new properties : rig_models and rig_instances
 - Add corresponding Python unit tests
 - Add corresponding C++ dataviews (and their unit tests)(and Python bindings)

These structure are now unused. Next step is to plug this in the synthetic data generation.

Reviewed By: paulinus

Differential Revision: D26399407

fbshipit-source-id: dd37c884ac63c00be6dc73db47f6372b9e44702c
Summary:
This PR does what its titles says.

Pull Request resolved: #707

Reviewed By: fabianschenk, paulinus

Differential Revision: D26450501

Pulled By: YanNoun

fbshipit-source-id: a996e4ca5cc264046c91afe55f9c008c06f2bdf1
Summary:
This PR fixes the `compute_statistics` command for submodels when using the `create_submodels` command. The reports folder is missing when creating submodels and causes an error when launching the command on a submodel's folder.

Pull Request resolved: #693

Reviewed By: fabianschenk

Differential Revision: D26420628

Pulled By: YanNoun

fbshipit-source-id: 394a18c17c28c676d60464ac2105cc6866e04546
Summary:
Hello ✋

This PR proposes the addition of a new `--point-num-views` parameter to the `export_ply` command to output a new `views` containing the number of views that each point is visible from.

This lets a user generate "coverage" maps using a tool such as PDAL to identify areas that might be missing overlap.

![image](https://user-images.githubusercontent.com/1951843/104733606-f1a0bf80-570c-11eb-9c7d-a9b4a178bfe5.png)

Hope it can be useful to others.

Pull Request resolved: #692

Reviewed By: fabianschenk

Differential Revision: D26420604

Pulled By: YanNoun

fbshipit-source-id: 6516d8168c7d5255c5d0d7dc7facc3e4f18d47a0
Summary:
Pull Request resolved: #706

Since we do not know on which format the input images are, we were always adding `.jpg` to the undistorted image file name before saving them. This caused a miss-match between the undistorted images' file names and the shot IDs in the undistorted reconstruction.

We fix that by renaming the shot IDs to match the image filename.

Additionally, we do not append the file format to the file name if the filename already ends with that extension. This breaks file-level backwards compatibility.

We also add the `undistorted_shot_ids.json` file to the dataset that maps original shot IDs to the list of corresponding undistorted shot IDs.  Remember that a single shot can have multiple undistorted shots.

Reviewed By: YanNoun

Differential Revision: D26443052

fbshipit-source-id: 4042c93c434ef120cd2c3a13591087ee715a7640
Summary: Added try/except in export_report.

Reviewed By: YanNoun

Differential Revision: D26511426

fbshipit-source-id: dda07ecbffed51feaba17228f4983968eb009e29
Summary:
- Add `--dataset-type` parameter to be able to choose a dataset from the command line.
- The default value is `opensfm`

Reviewed By: YanNoun, paulinus

Differential Revision: D26311519

fbshipit-source-id: 7856b59008ca3e1bce9301408eb02cd95ed53eda
Summary:
This Diff aims at finalizing the rigs datastructures, as the synthetic rig data (next Diff) generation showed some flaws in the design.

More specifically, we :
 - Explicit the behaviour of a Shot belonging to a Rig to not be modifyable, by the use of a `PoseImmutable` type. This is used to emulate `const`ness within `python`
 - `Shot` pose is now a pointer, leveraging polymorphism to throw when the `Shot` holds an `ImmutablePose`
 - Thus, for `Rig` `Shot`, `GetPose` must be done through `const` objects, hence why we added C++17 `as_const` in `foundation`

This is seems a bit strict, but at least, `Rig` consistency is enforced.

Reviewed By: paulinus

Differential Revision: D26464243

fbshipit-source-id: 1e34c39bd110e78b900abdc96d1bd42d3608e193
Summary:
This Diff adds a synthetic scene example (by recycling an unused one) that has Rig data.

Not plugged yet, will be done in a further Diff.

Reviewed By: paulinus

Differential Revision: D26464275

fbshipit-source-id: 56a0f524798a5afaa3a87f0f2beef85b18c31832
Summary:
This PR adds a viewer using [`mapillary-js`](https://github.com/mapillary/mapillary-js). By using `mapillary-js` the client code can take advantage of new features automatically in the future.

The diff consists of:
- Shell script to download dependency files for `mapillary-js`, [`gl-matrix`](https://github.com/toji/gl-matrix), and [`dat.gui`](https://github.com/dataarts/dat.gui).
- OpenSfM data provider JS implementation for retrieving and converting OpenSfM data.
- HTML file with viewer markup and styles.
- OpenSfM JS file with logic handling initialization and options

Pull Request resolved: #698

Reviewed By: paulinus

Differential Revision: D26578308

Pulled By: oscarlorentzon

fbshipit-source-id: 8edae5040c540663b14f866c9d4ec65478338f5d
Summary: Pull Request resolved: #708

Reviewed By: DodgySpaniard, YanNoun

Differential Revision: D26578228

fbshipit-source-id: 9de0a9e4b32450a72f33591d4d685c19678248e4
@YonatanSimson YonatanSimson merged commit 881ac0f into YonatanSimson:multiple_sequences Feb 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants