Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions client/dive-common/apispec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { TrackData } from 'vue-media-annotator/track';
import { Attribute } from 'vue-media-annotator/use/AttributeTypes';
import { CustomStyle } from 'vue-media-annotator/StyleManager';
import { AttributeTrackFilter } from 'vue-media-annotator/AttributeTrackFilterControls';
import { MultiCamDesktop } from 'platform/desktop/constants';

type DatasetType = 'image-sequence' | 'video' | 'multi' | 'large-image';
type MultiTrackRecord = Record<string, TrackData>;
Expand Down Expand Up @@ -84,7 +85,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 @@ -95,7 +96,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 @@ -140,6 +141,8 @@ interface DatasetMeta extends DatasetMetaMutable {
originalFps?: Readonly<number>;
subType: Readonly<SubType>; // In future this could have stuff like IR/EO
multiCamMedia: Readonly<MultiCamMedia | null>;
multiCam: Readonly<MultiCamDesktop | null>;
//calibrationFile?: Readonly<string>;
}

interface Api {
Expand All @@ -166,7 +169,7 @@ interface Api {
saveAttributeTrackFilters(datasetId: string,
args: SaveAttributeTrackFilterArgs): Promise<unknown>;
// Non-Endpoint shared functions
openFromDisk(datasetType: DatasetType | 'bulk' | 'calibration' | 'annotation' | 'text' | 'zip', directory?: boolean):
openFromDisk(datasetType: DatasetType | 'bulk' | '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
3 changes: 2 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"
>
<template #activator="{ on }">
<v-btn
Expand Down Expand Up @@ -112,6 +112,7 @@ 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 @@ -31,6 +31,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 @@ -187,7 +191,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 @@ -245,6 +249,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 @@ -271,6 +276,7 @@ export default defineComponent({
defaultDisplay,
displayKeys,
importAnnotationFilesCheck,
// stereoConfigurationFile,
//Methods
open,
prepForImport,
Expand Down Expand Up @@ -441,7 +447,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 @@ -491,7 +497,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 @@ -161,6 +161,8 @@ export default defineComponent({
case 'utility':
case 'generate':
return 'utilities';
case 'estimates':
return 'estimators';
case 'transcode':
return 'transcoders';
default:
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
37 changes: 37 additions & 0 deletions client/dive-common/components/TrackSettingsPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
computed,
} from 'vue';
import { clientSettings } from 'dive-common/store/settings';
import { useCameraStore } from '../../src/provides';

export default defineComponent({
name: 'TrackSettingsPanel',
Expand All @@ -30,19 +31,23 @@ 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.',
filterTracksByFrame: 'Filter the track list by those with detections in the current frame',
autoZoom: 'Automatically zoom to the track when selected',
});
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 @@ -209,6 +214,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