[RNE Rewrite] feat!: add classification task and common utilities for manipulating tensors in CV tasks#1264
Merged
Merged
Conversation
…extension sources in build files
…age preprocessing
…e classification task
…ourceDownload, and register public exports
…amelCase in ESLint
Align native extensions with the add-native-extension guideline: - sigmoid: use the precomputed src->numel_ instead of recomputing the element count via std::accumulate; drop the now-unused <numeric>. - softmax/argmax: require axis (count == 3) instead of defaulting to -1 in C++; defaults belong in the TS wrapper layer. argmax now validates args[2].isNumber() (parity with softmax) and registers with arity 3. - normalize: drop misleading "default" init for the required alpha/beta coefficients. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Download to a .partial temp file and promote it to the final cache path only after the transfer succeeds. Previously an interrupted download left a truncated file that a later run treated as a valid cache hit, loading a corrupt .pte. Also treat HTTP >= 400 as a failure (RNFS.downloadFile resolves on 4xx/5xx) and unlink the partial file on any error. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Surface the resize pad value through the preprocessor options so letterbox consumers can configure it instead of being stuck with black padding. Optional; the resize wrapper defaults it to 0. Switch the resize wrapper to per-key nullish defaults so an explicit `padValue: undefined` falls back to the default instead of clobbering it through object spread (the native op requires padValue unconditionally). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was
linked to
issues
Jun 18, 2026
msluszniak
reviewed
Jun 19, 2026
msluszniak
left a comment
Member
There was a problem hiding this comment.
Maybe we change example app icon to something meaningful for CV, I thought about it for our current apps, but haven't executed eventually.
msluszniak
reviewed
Jun 19, 2026
…anonymous namespaces
…::fill, and clean up loop/dimension types
Co-authored-by: msluszniak <56299341+msluszniak@users.noreply.github.com>
Co-authored-by: Mateusz Sluszniak <56299341+msluszniak@users.noreply.github.com>
Co-authored-by: Mateusz Sluszniak <56299341+msluszniak@users.noreply.github.com>
Co-authored-by: Mateusz Sluszniak <56299341+msluszniak@users.noreply.github.com>
Co-authored-by: Mateusz Sluszniak <56299341+msluszniak@users.noreply.github.com>
Each useResourceDownload instance now writes to a unique .partial file so concurrent downloads of the same source no longer clobber a shared temp file. The moveFile call is guarded so a download that loses the race to an identical file already at the destination (iOS moveFile throws when dest exists) is treated as success instead of surfacing a spurious error. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Mateusz Sluszniak <56299341+msluszniak@users.noreply.github.com>
Contributor
Author
|
Regarding example apps visual aspects, we can open an issue regarding the general overhaul of example apps, but I don't think it is a priority right now. |
Member
Agreed. Let me do another quick pass over the code ;) |
msluszniak
reviewed
Jun 19, 2026
msluszniak
reviewed
Jun 19, 2026
msluszniak
reviewed
Jun 19, 2026
msluszniak
reviewed
Jun 19, 2026
Co-authored-by: Mateusz Sluszniak <56299341+msluszniak@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
msluszniak
approved these changes
Jun 19, 2026
This was referenced Jun 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds:
useModelanduseResourceDownloadhook which are needed for all modelsIt also introduces some fixes:
Introduces a breaking change?
Type of change
Tested on
Testing instructions
Screenshots
N/A
Related issues
Closes #1237
Closes #1207
Checklist
Additional notes