Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
9ca8288
feat: Add image segmentation example (#138)
JakubGonera Mar 24, 2025
7ec9f07
docs: Add documentation for image segmentation (#149)
JakubGonera Mar 27, 2025
346f74d
feat: add support for hugging face tokenizers, add executorch and tok…
NorbertKlockiewicz Mar 27, 2025
2145796
feat: add option to pass skip special tokens flag to decode (#162)
NorbertKlockiewicz Mar 31, 2025
a8e7f96
feat: Add multilingual Whisper (#166)
chmjkb Apr 1, 2025
6c8a629
fix: Change BOS/EOS token ids for non-multilingual Whisper in model c…
chmjkb Apr 1, 2025
a245872
fix: pass skipSpecialTokens param to Tokenizer in _TokenizerModule (#…
chmjkb Apr 3, 2025
6e210bd
feat: bump executorch 0.6.0 (#171)
NorbertKlockiewicz Apr 14, 2025
6c58d9f
Add spell checking to codebase (#185)
pweglik Apr 14, 2025
9b19a27
chore: bump model urls to use v0.4.0 tag (#169)
chmjkb Apr 15, 2025
4fb680d
deps: bump React Native versions in demo apps (#189)
chmjkb Apr 16, 2025
b8c15af
chore: @jakmro/update aar (#196)
jakmro Apr 16, 2025
093a32b
docs: add docs for mutlilingual Whisper (#176)
chmjkb Apr 16, 2025
fa7d51c
build: change structure to reanimated like monorepo
NorbertKlockiewicz Apr 17, 2025
d58710a
build: update paths in github workflows
NorbertKlockiewicz Apr 17, 2025
835d42a
build: configure eslint, prettier etc., fix a problem with duplicated…
NorbertKlockiewicz Apr 18, 2025
1e49cb7
build: update dependencies
NorbertKlockiewicz Apr 18, 2025
75c2113
build: update dependencies
NorbertKlockiewicz Apr 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 20 additions & 0 deletions .cspell-wordlist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
swmansion
executorch
execu
torch
huggingface
bbox
bboxes
deeplab
unsqueeze
qlora
spinquant
efficientnet
ssdlite
udnie
crnn
mobilenet
microcontrollers
notimestamps
seqs
wordlist
33 changes: 33 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
const path = require('path');

module.exports = {
parserOptions: {
requireConfigFile: false,
babelOptions: {
presets: ['@babel/preset-react'],
},
},
root: true,
extends: ['@react-native', 'prettier', 'plugin:@cspell/recommended'],
rules: {
'react/react-in-jsx-scope': 'off',
'prettier/prettier': [
'error',
{
quoteProps: 'consistent',
singleQuote: true,
tabWidth: 2,
trailingComma: 'es5',
useTabs: false,
},
],
'@cspell/spellchecker': [
'warn',
{
customWordListFile: path.resolve(__dirname, '.cspell-wordlist.txt'),
},
],
},
plugins: ['prettier'],
ignorePatterns: ['node_modules/', 'lib/'],
};
10 changes: 5 additions & 5 deletions .github/workflows/build-android-llama-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ on:
- .github/workflows/build-android-llama-example.yml
- android/**
- third-party/android/**
- examples/llama/package.json
- examples/llama/android/**
- apps/llama/package.json
- apps/llama/android/**
push:
branches:
- main
paths:
- .github/workflows/build-android-llama-example.yml
- android/**
- third-party/android/**
- examples/llama/package.json
- examples/llama/android/**
- apps/llama/package.json
- apps/llama/android/**
jobs:
build:
if: github.repository == 'software-mansion/react-native-executorch'
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: examples/llama
WORKING_DIRECTORY: apps/llama
concurrency:
group: android-${{ github.ref }}
cancel-in-progress: true
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/build-ios-llama-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ on:
paths:
- '.github/workflows/build-ios-llama-example.yml'
- '*.podspec'
- 'examples/llama/ios/**'
- 'examples/llama/package.json'
- 'apps/llama/ios/**'
- 'apps/llama/package.json'
pull_request:
paths:
- '.github/workflows/build-ios-llama-example.yml'
- '*.podspec'
- 'examples/llama/ios/**'
- 'examples/llama/package.json'
- 'apps/llama/ios/**'
- 'apps/llama/package.json'
jobs:
build:
if: github.repository == 'software-mansion/react-native-executorch'
Expand All @@ -25,13 +25,13 @@ jobs:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Install node dependencies
working-directory: examples/llama
working-directory: apps/llama
run: yarn
- name: Install pods
working-directory: examples/llama/ios
working-directory: apps/llama/ios
run: pod install
- name: Build app
working-directory: examples/llama/ios
working-directory: apps/llama/ios
run: |
set -o pipefail && xcodebuild \
-workspace llama.xcworkspace \
Expand Down
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "executorch"]
path = third-party/executorch
url = https://github.com/software-mansion-labs/executorch
[submodule "tokenizers-cpp"]
path = third-party/tokenizers-cpp
url = https://github.com/software-mansion-labs/tokenizers-cpp
5 changes: 4 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
**/*.mdx
**/*.mdx
third-party
.github
.yarn
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"quoteProps": "consistent",
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false
}
541 changes: 0 additions & 541 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

This file was deleted.

28 changes: 0 additions & 28 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

This file was deleted.

874 changes: 0 additions & 874 deletions .yarn/releases/yarn-3.6.1.cjs

This file was deleted.

893 changes: 893 additions & 0 deletions .yarn/releases/yarn-4.1.1.cjs

Large diffs are not rendered by default.

13 changes: 5 additions & 8 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
nodeLinker: node-modules
nmHoistingLimits: workspaces
compressionLevel: mixed

enableGlobalCache: false

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: '@yarnpkg/plugin-interactive-tools'
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: '@yarnpkg/plugin-workspace-tools'
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.6.1.cjs
yarnPath: .yarn/releases/yarn-4.1.1.cjs
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ The minimal supported version is 17.0 for iOS and Android 13.

https://github.com/user-attachments/assets/27ab3406-c7f1-4618-a981-6c86b53547ee

We currently host two example apps demonstrating use cases of our library:
We currently host three example apps demonstrating use cases of our library:

- examples/speech-to-text - Whisper and Moonshine models ready for transcription tasks
- examples/computer-vision - computer vision related tasks
- examples/llama - chat applications showcasing use of LLMs
- apps/speech-to-text - Whisper and Moonshine models ready for transcription tasks
- apps/computer-vision - computer vision related tasks
- apps/llama - chat applications showcasing use of LLMs

If you would like to run it, navigate to it's project directory, for example `examples/llama` from the repository root and install dependencies with:
If you would like to run it, navigate to it's project directory, for example `apps/llama` from the repository root and install dependencies with:

```bash
yarn
Expand Down
File renamed without changes.
10 changes: 10 additions & 0 deletions examples/computer-vision/App.tsx → apps/computer-vision/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ import { ClassificationScreen } from './screens/ClassificationScreen';
import { ObjectDetectionScreen } from './screens/ObjectDetectionScreen';
import { OCRScreen } from './screens/OCRScreen';
import { VerticalOCRScreen } from './screens/VerticalOCRScreen';
import { ImageSegmentationScreen } from './screens/ImageSegmentationScreen';

enum ModelType {
STYLE_TRANSFER,
OBJECT_DETECTION,
CLASSIFICATION,
OCR,
VERTICAL_OCR,
IMAGE_SEGMENTATION,
}

export default function App() {
Expand Down Expand Up @@ -56,6 +58,13 @@ export default function App() {
return (
<VerticalOCRScreen imageUri={imageUri} setImageUri={setImageUri} />
);
case ModelType.IMAGE_SEGMENTATION:
return (
<ImageSegmentationScreen
imageUri={imageUri}
setImageUri={setImageUri}
/>
);
default:
return (
<StyleTransferScreen imageUri={imageUri} setImageUri={setImageUri} />
Expand All @@ -76,6 +85,7 @@ export default function App() {
'Classification',
'OCR',
'Vertical OCR',
'Image Segmentation',
]}
onValueChange={(_, selectedIndex) => {
handleModeChange(selectedIndex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<item name="android:textColor">@android:color/black</item>
<item name="android:editTextStyle">@style/ResetEditText</item>
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
<item name="android:windowOptOutEdgeToEdgeEnforcement" tools:targetApi="35">true</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="android:statusBarColor">#ffffff</item>
</style>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
minSdkVersion = Integer.parseInt(findProperty('android.minSdkVersion') ?: '24')
compileSdkVersion = Integer.parseInt(findProperty('android.compileSdkVersion') ?: '35')
targetSdkVersion = Integer.parseInt(findProperty('android.targetSdkVersion') ?: '34')
kotlinVersion = findProperty('android.kotlinVersion') ?: '1.9.24'
kotlinVersion = findProperty('android.kotlinVersion') ?: '1.9.25'

ndkVersion = "26.1.10909125"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,6 @@ EX_DEV_CLIENT_NETWORK_INSPECTOR=true

# Use legacy packaging to compress native libraries in the resulting APK.
expo.useLegacyPackaging=false

# Whether the app is configured to use edge-to-edge via the app config or `react-native-edge-to-edge` plugin
expo.edgeToEdgeEnabled=false
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pluginManagement {
includeBuild(new File(["node", "--print", "require.resolve('@react-native/gradle-plugin/package.json')"].execute(null, rootDir).text.trim()).getParentFile().toString())
includeBuild(new File(["node", "--print", "require.resolve('@react-native/gradle-plugin/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim()).getParentFile().toString())
}
plugins { id("com.facebook.react.settings") }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
},
"web": {
"favicon": "./assets/icons/favicon.png"
}
},
"plugins": ["expo-font"]
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Loading