Skip to content

[RNE Rewrite] feat: add semantic segmentation task#1275

Merged
barhanc merged 12 commits into
rne-rewritefrom
@bh/semantic-segmentation
Jun 24, 2026
Merged

[RNE Rewrite] feat: add semantic segmentation task#1275
barhanc merged 12 commits into
rne-rewritefrom
@bh/semantic-segmentation

Conversation

@barhanc

@barhanc barhanc commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Description

  • Adds semantic segmentation task and required native operations for it.
  • Adds computer-vision example app screen for semantic segmentation.
  • Fixes the performance regression in the argmax introduced in [RNE Rewrite] feat!: add classification task and common utilities for manipulating tensors in CV tasks #1264. The initial implementation from PoC was more efficient for the default axis=-1 case as the internal loop was over contiguous elements. The linked PR changed it so that it was more efficient for axis=0 case, however since the default is axis=-1 this caused a performance regression in the semantic segmentation task.

Introduces a breaking change?

  • Yes
  • No

Type of change

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Documentation update (improves or adds clarity to existing documentation)
  • Other (chores, tests, code style improvements etc.)

Tested on

  • iOS
  • Android

Testing instructions

  • Build the computer-vision example app.
  • Test the semantic segmentation screen.

Screenshots

Related issues

Closes #1242

Checklist

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly
  • My changes generate no new warnings

Additional notes

@barhanc barhanc self-assigned this Jun 22, 2026
@barhanc barhanc added refactoring feature PRs that implement a new feature labels Jun 22, 2026
@barhanc barhanc linked an issue Jun 22, 2026 that may be closed by this pull request
@barhanc barhanc marked this pull request as ready for review June 23, 2026 12:58
@barhanc barhanc requested a review from msluszniak June 23, 2026 12:59
@barhanc

barhanc commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

Two models are missing from models.ts: DeepLabV3 and FCN, since the forward returns auxiliary tensor. I will reexport them but don't know under what tag should I put them, isv0.10.0 ok?

@msluszniak

Copy link
Copy Markdown
Member

Two models are missing from models.ts: DeepLabV3 and FCN, since the forward returns auxiliary tensor. I will reexport them but don't know under what tag should I put them, isv0.10.0 ok?

Yeah, v0.10.0 sounds ok.

Comment thread packages/react-native-executorch/cpp/extensions/cv/image_ops.cpp Outdated
Comment thread packages/react-native-executorch/cpp/extensions/cv/image_ops.cpp Outdated
Comment thread packages/react-native-executorch/cpp/extensions/math/operations.cpp
Comment thread packages/react-native-executorch/src/extensions/cv/tasks/semanticSegmentation.ts Outdated
Comment thread apps/computer-vision/app/segmentation/index.tsx
Comment thread packages/react-native-executorch/cpp/extensions/cv/image_ops.cpp Outdated
@barhanc barhanc force-pushed the @bh/semantic-segmentation branch from 72474b6 to 35427ee Compare June 23, 2026 22:13
@barhanc barhanc requested a review from msluszniak June 23, 2026 22:13
@msluszniak

Copy link
Copy Markdown
Member
  1. Clicking button Run Async causes weird jump when screen is scrolled to the bottom on my android.
  2. Total Pipeline Latency overlaps with android system bar at the very bottom of the app.

@barhanc

barhanc commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author
  1. Clicking button Run Async causes weird jump when screen is scrolled to the bottom on my android.
  2. Total Pipeline Latency overlaps with android system bar at the very bottom of the app.

Should be fixed now.

@barhanc barhanc merged commit bd2636c into rne-rewrite Jun 24, 2026
2 checks passed
@barhanc barhanc deleted the @bh/semantic-segmentation branch June 24, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature PRs that implement a new feature refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RNE Rewrite] CV - add semantic segmentation pipeline implementation

2 participants