File tree Expand file tree Collapse file tree
packages/react-native-executorch/src/modules/computer_vision Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments