Compare commits
2 Commits
d3cd940818
...
15647a47ac
| Author | SHA1 | Date | |
|---|---|---|---|
| 15647a47ac | |||
| 0a7902c2f5 |
@@ -39,9 +39,9 @@
|
||||
</div>
|
||||
<template v-else>
|
||||
<!-- Face Group -->
|
||||
<div v-if="showCluster && clusterAsPending.length" class="ms-ppl-section">
|
||||
<div v-if="showCluster && faceGroups.length" class="ms-ppl-section">
|
||||
<div class="ms-ppl-section-toolbar">
|
||||
<div class="ms-ppl-section-title">{{ t('people.section.face_group') }}: <span class="ms-ppl-section-count">({{ clusterAsPending.length }})</span></div>
|
||||
<div class="ms-ppl-section-title">{{ t('people.section.face_group') }}: <span class="ms-ppl-section-count">({{ faceGroups.length }})</span></div>
|
||||
<button v-if="!batchMode" class="ms-fm-btn ms-fm-btn-sm" @click="batchMode = true">☑ Select</button>
|
||||
<template v-else>
|
||||
<button class="ms-fm-btn ms-fm-btn-sm ms-fm-btn-primary" @click="batchMergeGroups" :disabled="selectedGroups.length < 2">⇄ Merge ({{ selectedGroups.length }})</button>
|
||||
@@ -50,7 +50,7 @@
|
||||
</template>
|
||||
</div>
|
||||
<div class="ms-ppl-face-grid">
|
||||
<div v-for="c in clusterAsPending" :key="c.identity_uuid" class="ms-ppl-face-card ms-ppl-cluster-card" :class="{ 'ms-ppl-face-card-selected': isGroupSelected(c) }" @click="batchMode ? toggleGroupSelection(c) : selectCluster(c)" title="View member faces">
|
||||
<div v-for="c in faceGroups" :key="c.identity_uuid" class="ms-ppl-face-card ms-ppl-cluster-card" :class="{ 'ms-ppl-face-card-selected': isGroupSelected(c) }" @click="batchMode ? toggleGroupSelection(c) : selectCluster(c)" title="View member faces">
|
||||
<div v-if="batchMode" class="ms-ppl-card-checkbox" @click.stop="toggleGroupSelection(c)">
|
||||
<span v-if="isGroupSelected(c)">✓</span>
|
||||
</div>
|
||||
@@ -313,7 +313,7 @@
|
||||
<hr class="ms-merge-divider">
|
||||
|
||||
<div class="ms-merge-grid">
|
||||
<div v-for="c in clusterAsPending" :key="c.identity_uuid" class="ms-merge-face-card" @click="moveToGroup(c)">
|
||||
<div v-for="c in faceGroups" :key="c.identity_uuid" class="ms-merge-face-card" @click="moveToGroup(c)">
|
||||
<div class="ms-merge-face-img">
|
||||
<img v-if="c.rep_trace && faceThumbsCache[thumbTraceKey(c.rep_trace)]" :src="faceThumbsCache[thumbTraceKey(c.rep_trace)]" alt="">
|
||||
<svg v-else viewBox="0 0 120 120" fill="none" style="width:100%;height:100%;">
|
||||
@@ -631,16 +631,16 @@ const clusterResults = computed(() => clusterResultsCache.value[selectedFileUuid
|
||||
const clusterTracesMap = ref<Record<string, any>>({})
|
||||
const clusterRunning = computed(() => isClusterRunning(selectedFileUuid.value))
|
||||
|
||||
const clusterAsPending = computed(() => {
|
||||
console.log('[clusterAsPending] computing, selectedFileUuid:', selectedFileUuid.value, 'clusterResults:', clusterResults.value.length, clusterResults.value)
|
||||
console.log('[clusterAsPending] clusterResultsCache:', clusterResultsCache.value)
|
||||
console.log('[clusterAsPending] selectedFileUuid in cache:', selectedFileUuid.value ? (selectedFileUuid.value in clusterResultsCache.value) : 'no file selected')
|
||||
const faceGroups = computed(() => {
|
||||
console.log('[faceGroups] computing, selectedFileUuid:', selectedFileUuid.value, 'clusterResults:', clusterResults.value.length, clusterResults.value)
|
||||
console.log('[faceGroups] clusterResultsCache:', clusterResultsCache.value)
|
||||
console.log('[faceGroups] selectedFileUuid in cache:', selectedFileUuid.value ? (selectedFileUuid.value in clusterResultsCache.value) : 'no file selected')
|
||||
|
||||
if (!selectedFileUuid.value || !clusterResults.value.length) {
|
||||
console.log('[clusterAsPending] empty:', { selected: selectedFileUuid.value, clusters: clusterResults.value.length })
|
||||
console.log('[faceGroups] empty:', { selected: selectedFileUuid.value, clusters: clusterResults.value.length })
|
||||
return []
|
||||
}
|
||||
console.log('[clusterAsPending] mapping', clusterResults.value.length, 'clusters')
|
||||
console.log('[faceGroups] mapping', clusterResults.value.length, 'groups')
|
||||
return clusterResults.value.map((c: any, idx: number) => {
|
||||
const traceIds = c.trace_ids || []
|
||||
const repTraceId = c.representative_trace || traceIds[0]
|
||||
@@ -1640,7 +1640,7 @@ async function batchDeleteGroups() {
|
||||
if (!selectedGroups.value.length) return
|
||||
|
||||
const groupIds = Array.from(selectedGroups.value)
|
||||
const groupsToDelete = clusterAsPending.value.filter((c: any) => groupIds.includes(c.identity_uuid))
|
||||
const groupsToDelete = faceGroups.value.filter((c: any) => groupIds.includes(c.identity_uuid))
|
||||
|
||||
let totalTraces = 0
|
||||
const allTraceIds: number[] = []
|
||||
@@ -1693,7 +1693,7 @@ async function batchMergeGroups() {
|
||||
const groupIds = Array.from(selectedGroups.value)
|
||||
console.log('[batchMergeGroups] groupIds:', groupIds)
|
||||
|
||||
mergeCandidateGroups.value = clusterAsPending.value.filter((c: any) => groupIds.includes(c.identity_uuid))
|
||||
mergeCandidateGroups.value = faceGroups.value.filter((c: any) => groupIds.includes(c.identity_uuid))
|
||||
console.log('[batchMergeGroups] mergeCandidateGroups:', mergeCandidateGroups.value.length)
|
||||
|
||||
showMergeTargetModal.value = true
|
||||
@@ -1703,7 +1703,7 @@ async function executeMerge(targetGroupId: string) {
|
||||
console.log('[executeMerge] targetGroupId:', targetGroupId)
|
||||
showMergeTargetModal.value = false
|
||||
|
||||
const targetGroup = clusterAsPending.value.find((c: any) => c.identity_uuid === targetGroupId)
|
||||
const targetGroup = faceGroups.value.find((c: any) => c.identity_uuid === targetGroupId)
|
||||
console.log('[executeMerge] targetGroup:', targetGroup)
|
||||
if (!targetGroup) return
|
||||
|
||||
@@ -1716,7 +1716,7 @@ async function executeMerge(targetGroupId: string) {
|
||||
|
||||
const groupIds = Array.from(selectedGroups.value)
|
||||
const sourceGroupIds = groupIds.filter(id => id !== targetGroupId)
|
||||
const sourceGroups = clusterAsPending.value.filter((c: any) => sourceGroupIds.includes(c.identity_uuid))
|
||||
const sourceGroups = faceGroups.value.filter((c: any) => sourceGroupIds.includes(c.identity_uuid))
|
||||
console.log('[executeMerge] sourceGroups:', sourceGroups.length)
|
||||
|
||||
const sourceGroupNames = sourceGroups.map(g => g.name).filter(Boolean)
|
||||
@@ -2025,7 +2025,7 @@ async function runDataQC() {
|
||||
qcProgress.value.status = 'Collecting trace IDs from clusters...'
|
||||
|
||||
const allTraceIds = new Set<number>()
|
||||
for (const c of clusterAsPending.value) {
|
||||
for (const c of faceGroups.value) {
|
||||
for (const tid of c.trace_ids || []) {
|
||||
allTraceIds.add(tid)
|
||||
}
|
||||
@@ -2037,7 +2037,7 @@ async function runDataQC() {
|
||||
qcReport.value.push({
|
||||
check: 'Traces from Clusters',
|
||||
status: totalTraces > 0 ? 'PASS' : 'WARN',
|
||||
details: `${totalTraces} traces in ${clusterAsPending.value.length} clusters`
|
||||
details: `${totalTraces} traces in ${faceGroups.value.length} clusters`
|
||||
})
|
||||
|
||||
// ===== 3. TEST TRACE PROFILES =====
|
||||
|
||||
Reference in New Issue
Block a user