Skip to content

Commit 800d3b0

Browse files
committed
Fix live task bug
1 parent 1600daf commit 800d3b0

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

packages/react-native-executorch/src/modules/computer_vision/InstanceSegmentationModule.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,8 @@ export class InstanceSegmentationModule<
328328
? options.classesOfInterest.map((label) => {
329329
const labelStr = String(label);
330330
const enumValue = labelMap[labelStr];
331-
return typeof enumValue === 'number'
332-
? enumValue - labelEnumOffset
333-
: -1;
331+
// Don't normalize - send raw enum values to match model output
332+
return typeof enumValue === 'number' ? enumValue : -1;
334333
})
335334
: [];
336335

@@ -426,9 +425,8 @@ export class InstanceSegmentationModule<
426425
? options.classesOfInterest.map((label) => {
427426
const labelStr = String(label);
428427
const enumValue = this.labelMap[labelStr as keyof ResolveLabels<T>];
429-
return typeof enumValue === 'number'
430-
? enumValue - this.labelEnumOffset
431-
: -1;
428+
// Don't normalize - send raw enum values to match model output
429+
return typeof enumValue === 'number' ? enumValue : -1;
432430
})
433431
: [];
434432

0 commit comments

Comments
 (0)