FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Port ifremer features by BryonLewis · Pull Request #1348 · Kitware/dive · GitHub

/ dive Public

Port ifremer features - #1348

Open
BryonLewis wants to merge 15 commits into
Kitware:mainfrom
bourdaisj:port-ifremer-features
Open

BryonLewis wants to merge 15 commits into
Kitware:mainfrom
bourdaisj:port-ifremer-features

Conversation

Copy link
Copy Markdown
Collaborator

No description provided.

BryonLewis left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Did a first pass looking at the code and running it.
I mostly avoided looking closely at the track_3d_viewer/ folder files mostly because it's specific logic for the implementation.

Most of my changes are mentioned to make sure that the 3D implementation doesn't interfere or impact the current versions of data. Mostly hiding things that aren't needed unless you have a stereo configuration file.

Comment on lines +939 to +942
<v-btn
color="secondary"
@click="tracks3d = !tracks3d"
>

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I'm guessing this should only be visible when there is a stereoconfiguration file? Regular stereo probably won't support this viewing type? Is there some type of requirement for this to be enabled at all?
Also a quick look at it has the button visible in standard (non-multicam mode)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

On toggle this should reset the camera area for the display. The video/images are resized and subsequent calls to reset the camera reset it back to it's original size instead of the 50% size.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Also since this is being used a toggle button it should probably have two states to indicate on vs off.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I agree, that is common sense. I'll update this. Thank you

bourdaisj Jun 21, 2023
edited
Loading

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

this should probably be enabled only if at least one detection has the x,y,z attributes

bourdaisj Jun 27, 2023
edited by Louis-Pagnier-KW
Loading

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
  • make it visible only in stereo config mode
  • enable it only if we have at least one detection with stereo3d_* attributes

wdyt?

BryonLewis Jun 27, 2023
edited
Loading

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think it should only be visible if you have stereo config mode (being that it is stereo with your specific configuration file to enable 3D). I don't know if we need both for the button to be available because I don't understand the full context behind this feature. I.E: Does it make sense to have a track3d visible if you don't have stereo3d attributes or if you are going to create them at some point?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Yep, let me explain better this feature.
Basically when you activate the 3D mode, it is going to query every tracks that are not filtered out, and create 3d object if it makes sense to do so, e.g, the track contains at least one detection with the stereo3d_* attributes with defined value. Otherwise it is going to show a gray background and nothing interesting since there's no 3D coordinates information.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Comment on lines +210 to +247

<v-row>
<v-col class="py-1">
<v-switch
v-model="
clientSettings.trackSettings.newTrackSettings.modeSettings.Track.stereoMatching"
class="my-0 ml-1 pt-0"
dense
label="Stereo Matching"
hide-details
/>
</v-col>
<v-col
class="py-1 shrink"
align="right"
>
<v-tooltip
open-delay="200"
bottom
>
<template #activator="{ on }">
<v-icon
small
v-on="on"
>
mdi-help
</v-icon>
</template>
<span>Help</span>
</v-tooltip>
</v-col>
</v-row>

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This should probably only be viewable when in multicam or stereo mode and there is a stereo configuration file to enable matching.

Comment on lines +51 to +58
[TrackViewerSettings.name]: {
description: 'Track Viewer Settings',
component: TrackViewerSettings,
},

BryonLewis May 24, 2023
edited
Loading

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This should probably be moved into viewer and removed/added if the system is in multicam mode. No reason in adding this sidebar if not in multicam/stereo mode or even more specific, stereo with a configuration file.
You can check on how the multicam options are added to see how these options can be removed/added only when certain conditions are met.

import moment from 'moment';
import {
computed, defineComponent, ref, Ref,
computed, defineComponent, ref, Ref, reactive,

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

remove reactive, it's not used.

Comment on lines +42 to +58
// Set default attributes for a stereo calibration configuration
if (argCopy.value.jsonMeta.stereoConfigurationFile) {
argCopy.value.jsonMeta.attributes = {};

// Create x, y, z attributes
['x', 'y', 'z'].forEach((attributeKey) => {
// ugly but necessary to avoid typescript error
(argCopy.value.jsonMeta.attributes as Record<string, Attribute>)[attributeKey] = {
belongs: 'detection',
datatype: 'number',
key: `detection_${attributeKey}`,
name: attributeKey,
values: [],
};
});
}

BryonLewis May 24, 2023
edited
Loading

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

should these attribute keys be more specific about being stereo3D attribute keys. There are other users who do use attributes like this already.
I may be convinced that anyone utilizing stereoConfigurationFile will just know that these attributes are reserved.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

agree to update the naming. where is the best place to update the documentation about what attributes are "reserved"?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

does stereo3d_x, stereo3d_y, stereo3d_z looks ok to you?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Yeah that would be perfect. If you want to indicate that these attributes in combination with a stereoConfiguration file are reserved that could be added here: https://github.com/Kitware/dive/blob/main/docs/UI-Attributes.md

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

updated in the two last commits

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thibault opened a PR for VIAME as well here: VIAME/VIAME#162

Copy link
Copy Markdown

started addressing comments in 584394a

Copy link
Copy Markdown

Hey @BryonLewis
Do we have any more issues to address regarding this work?

Copy link
Copy Markdown
Collaborator Author

I believe I'll need to re-review it. I never had any actual 3D display before (I could get the renderer up and see the new panel but there wasn't a visbile display of 3D tracks before). If I can find some time for testing to make sure the feature works properly when given some test data it should be good. Just been a bit busy with some other projects.

Copy link
Copy Markdown

Thanks for the update Bryon. I'm going to send you test data that hopefully should work out of the box to test the feature by the end of next week. (I'm on vacation right now)

- Automatically add corresponding track on other camera
- Add geometry/feature on other track
- Add a new setting to enable automatic track/geometry creation
- add @kitware/vtk.js dep
- display tracks and detections (3d pos using detection attributes)
- color the tracks according to their types
- highlight the currently selected track
- highlight the detections corresponding to the current frame
- reload view after leaving 3d viewer
this shutdowns useless errors when checking VTK.js
- fix track color lookup
- handle showing only selected track
- draw only filtered track
- show cube axes actor
- fix: show track by default
- fix: features are no longer exposed on track since Kitware#1287
so we now use a different mechanism to get the feature set of a track
- use getTracksMerged since we don't care about cameras in this mode, we just want the detections
and their attributes
- align camera, camera mode, reset camera
- show 3d/2d views at the same time
- better track viewer settings menu (in sidebar)
- use one single lut per track type
- make detection glyph size configurable
- make cube axes actor bounds configurable
- draw detection glyph label with track id

- fix: feature coordinates yz inversion
- show stereo matching only in multicam mode
- show 3d track viewer toggle only in stereo config mode
- trigger annotator resize on 3d track viewer toggling
- add track viewer settings to right sidebar only in stereo config mode
bourdaisj force-pushed the port-ifremer-features branch from 9c220b8 to d9bd775 Compare April 17, 2024 16:05
bourdaisj force-pushed the port-ifremer-features branch from bb9b2b5 to 275a436 Compare April 23, 2024 16:17

Copy link
Copy Markdown

Trying to revive this PR @BryonLewis
Noticed that the attribute value lookup for multicam is based on cameraStore.getAnyTrack, which cause issues if you have paired tracks with only one of them containing attributes. This happens if you have the stereo3d_* stuff only on the left camera dataset

bourdaisj force-pushed the port-ifremer-features branch from 275a436 to 9b5c777 Compare April 23, 2024 16:27
bourdaisj force-pushed the port-ifremer-features branch from 9b5c777 to 857d29d Compare April 23, 2024 16:45

Copy link
Copy Markdown
Collaborator

Hello @BryonLewis,

With @bourdaisj, we updated this PR from main and fixed related issues.
I also wrote a small guide to test this PR, with provided data, that I can share you.

Do you have time to review it ?

Copy link
Copy Markdown
Member

Resolved the conflicts with main on dev/port-ifremer-features (192e14d): https://github.com/Kitware/dive/tree/dev/port-ifremer-features

This fork branch doesn't allow maintainer edits, so it couldn't be pushed here directly. Either pull that branch into this PR or we can open a replacement PR from it.

Notes on the resolution:

  • 3D track viewer, stereo matching, and .conf calibration kept; adapted to main's calibration rework (meta.calibration, JSON conversion at import, # Calibration Keys:).
  • getTracksMerged was removed on main; the viewer now uses getTrackProjection.
  • Draw hook moved into useAnnotationClickHandling (LayerManager handler was refactored on main).
  • -c <calibration> and cameras_calibration:tracks_* args are only added for .conf calibrations, reusing the per-camera track files main already writes.
  • stereo3d_* attribute seeding and the 3D viewer switch/panel now only apply to .conf rigs / datasets that have those attributes, so other stereo datasets are unaffected.
  • Dropped unused stereoConfiguration open type and the never-set calibration dialog prop; yarn.lock replaced by package-lock.json (vtk.js added via npm).

This branch has not been deployed

No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

4 participants


Back | FazBrowse Home | New Git URL