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

Port ifremer features #1348

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open
7 changes: 4 additions & 3 deletions client/dive-common/apispec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export interface MultiCamImportFolderArgs {
sourcePath: string;
trackFile: string;
}>; // path/track file per camera
calibrationFile?: string; // NPZ calibation matrix file
calibrationFile?: string; // NPZ calibation matrix file or kwivier *.conf file
type: 'image-sequence' | 'video';
}

Expand All @@ -92,7 +92,7 @@ export interface MultiCamImportKeywordArgs {
glob: string;
trackFile: string;
}>; // glob pattern for base folder
calibrationFile?: string; // NPZ calibation matrix file
calibrationFile?: string; // NPZ calibation matrix file or kwiver *.conf file
type: 'image-sequence'; // Always image-sequence type for glob matching
}

Expand Down Expand Up @@ -137,6 +137,7 @@ interface DatasetMeta extends DatasetMetaMutable {
originalFps?: Readonly<number>;
subType: Readonly<SubType>; // In future this could have stuff like IR/EO
multiCamMedia: Readonly<MultiCamMedia | null>;
calibrationFile?: Readonly<string>;
}

interface Api {
Expand All @@ -161,7 +162,7 @@ interface Api {
saveAttributeTrackFilters(datasetId: string,
args: SaveAttributeTrackFilterArgs): Promise<unknown>;
// Non-Endpoint shared functions
openFromDisk(datasetType: DatasetType | 'calibration' | 'annotation' | 'text' | 'zip', directory?: boolean):
openFromDisk(datasetType: DatasetType | 'calibration' | 'annotation' | 'text' | 'zip' | 'stereoConfiguration', directory?: boolean):
Promise<{canceled?: boolean; filePaths: string[]; fileList?: File[]; root?: string}>;
getTiles?(itemId: string, projection?: string): Promise<StringKeyObject>;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand Down
4 changes: 3 additions & 1 deletion client/dive-common/components/ImportButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default defineComponent({
offset-y
offset-x
nudge-left="180"
max-width="180"
max-width="250"
BryonLewis marked this conversation as resolved.
Show resolved Hide resolved
>
<template v-slot:activator="{ on }">
<v-btn
Expand Down Expand Up @@ -112,6 +112,8 @@ export default defineComponent({
<v-list-item-title>Image List</v-list-item-title>
</v-list-item-content>
</v-list-item>


<v-list-item
style="align-items':'center"
@click="$emit('multi-cam',{ stereo: true, openType })"
Expand Down
12 changes: 9 additions & 3 deletions client/dive-common/components/ImportMultiCamDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ export default defineComponent({
type: Boolean as PropType<boolean>,
required: false,
},
calibration: {
type: Boolean as PropType<boolean>,
required: false,
},
dataType: {
type: String as PropType<typeof VideoType | typeof ImageSequenceType>,
default: ImageSequenceType,
Expand Down Expand Up @@ -188,7 +192,7 @@ export default defineComponent({
}
}

async function open(dstype: DatasetType | 'calibration' | 'text', folder: string | 'calibration') {
async function open(dstype: DatasetType | 'calibration' | 'text' | 'stereoConfiguration', folder: string | 'calibration' | 'stereoConfiguration') {
const ret = await openFromDisk(dstype, dstype === 'image-sequence');
if (!ret.canceled) {
const path = ret.filePaths[0];
Expand Down Expand Up @@ -246,6 +250,7 @@ export default defineComponent({
calibrationFile: calibrationFile.value,
type: props.dataType,
};

emit('begin-multicam-import', args);
} else if (importType.value === 'keyword') {
const args: MultiCamImportKeywordArgs = {
Expand All @@ -272,6 +277,7 @@ export default defineComponent({
defaultDisplay,
displayKeys,
importAnnotationFilesCheck,
// stereoConfigurationFile,
//Methods
open,
prepForImport,
Expand Down Expand Up @@ -442,7 +448,7 @@ export default defineComponent({
</v-radio-group>
</div>
<v-row
v-if="stereo"
v-if="stereo && !calibration"
no-gutters
class="align-center"
>
Expand Down Expand Up @@ -492,7 +498,7 @@ export default defineComponent({
</v-btn>
<v-btn
color="primary"
:disabled="!nextSteps || (stereo && !calibrationFile)"
:disabled="!nextSteps || (stereo && (!calibrationFile))"
@click="prepForImport"
>
Begin Import
Expand Down
2 changes: 2 additions & 0 deletions client/dive-common/components/RunPipelineMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ export default defineComponent({
case 'utility':
case 'generate':
return 'utilities';
case 'estimates':
return 'estimators';
BryonLewis marked this conversation as resolved.
Show resolved Hide resolved
default:
return `${pipeType}s`;
}
Expand Down
1 change: 1 addition & 0 deletions client/dive-common/components/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ export default defineComponent({
:hotkeys-disabled="visible() || readOnlyMode"
:height="bottomHeight"
@track-seek="$emit('track-seek', $event)"
@track-added="$emit('track-added', $event)"
>
<template slot="settings">
<TrackSettingsPanel
Expand Down
38 changes: 38 additions & 0 deletions client/dive-common/components/TrackSettingsPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import {
computed,
} from '@vue/composition-api';
import { clientSettings } from 'dive-common/store/settings';
import { useCameraStore } from '../../src/provides';


export default defineComponent({
name: 'TrackSettingsPanel',
Expand All @@ -30,17 +32,21 @@ export default defineComponent({
interpolate: 'Whether new tracks should have interpolation enabled by default',
continuous: 'Immediately stay in detection creation mode after creating a new track. Hit Esc to exit.',
prompt: 'Prompt user before deleting a track?',
stereoMatching: 'When manually adding detections, control whether to create a mirror feature in other cameras.',
});
const modes = ref(['Track', 'Detection']);
// Add unknown as the default type to the typeList
const typeList = computed(() => ['unknown'].concat(props.allTypes));
const cameraStore = useCameraStore();
const multiCam = ref(cameraStore.camMap.value.size > 1);

return {
clientSettings,
itemHeight,
help,
modes,
typeList,
multiCam,
};
},
});
Expand Down Expand Up @@ -207,6 +213,38 @@ export default defineComponent({
</v-tooltip>
</v-col>
</v-row>

<v-row v-if="multiCam">
<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.stereoMatching }}</span>
</v-tooltip>
</v-col>
</v-row>
</template>
<v-row
v-if="clientSettings.trackSettings.newTrackSettings.mode === 'Detection'"
Expand Down
Loading
Loading