Skip to content

Commit 9c2c7a0

Browse files
chore: use coreml version of rf detr on iOS
1 parent 922d6c0 commit 9c2c7a0

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

docs/docs/03-hooks/02-computer-vision/useObjectDetection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ See the full guide: [VisionCamera Integration](./visioncamera-integration.md).
121121
| Model | Number of classes | Class list | Multi-size Support |
122122
| ----------------------------------------------------------------------------------------------------------------------------- | ----------------- | ------------------------------------------------------------- | ------------------- |
123123
| [SSDLite320 MobileNetV3 Large](https://huggingface.co/software-mansion/react-native-executorch-ssdlite320-mobilenet-v3-large) | 91 | [COCO](../../06-api-reference/enumerations/CocoLabel.md) | No (fixed: 320×320) |
124-
| [RF-DETR Nano](https://huggingface.co/software-mansion/react-native-executorch-rf-detr-nano) | 80 | [COCO](../../06-api-reference/enumerations/CocoLabel.md) | No (fixed: 312×312) |
124+
| [RF-DETR Nano](https://huggingface.co/software-mansion/react-native-executorch-rf-detr-nano) | 80 | [COCO](../../06-api-reference/enumerations/CocoLabel.md) | No (fixed: 384×384) |
125125
| [YOLO26N](https://huggingface.co/software-mansion/react-native-executorch-yolo26) | 80 | [COCO YOLO](../../06-api-reference/enumerations/CocoLabel.md) | Yes (384/512/640) |
126126
| [YOLO26S](https://huggingface.co/software-mansion/react-native-executorch-yolo26) | 80 | [COCO YOLO](../../06-api-reference/enumerations/CocoLabel.md) | Yes (384/512/640) |
127127
| [YOLO26M](https://huggingface.co/software-mansion/react-native-executorch-yolo26) | 80 | [COCO YOLO](../../06-api-reference/enumerations/CocoLabel.md) | Yes (384/512/640) |

docs/versioned_docs/version-0.8.x/03-hooks/02-computer-vision/useObjectDetection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ See the full guide: [VisionCamera Integration](./visioncamera-integration.md).
121121
| Model | Number of classes | Class list | Multi-size Support |
122122
| ----------------------------------------------------------------------------------------------------------------------------- | ----------------- | ------------------------------------------------------------- | ------------------- |
123123
| [SSDLite320 MobileNetV3 Large](https://huggingface.co/software-mansion/react-native-executorch-ssdlite320-mobilenet-v3-large) | 91 | [COCO](../../06-api-reference/enumerations/CocoLabel.md) | No (fixed: 320×320) |
124-
| [RF-DETR Nano](https://huggingface.co/software-mansion/react-native-executorch-rf-detr-nano) | 80 | [COCO](../../06-api-reference/enumerations/CocoLabel.md) | No (fixed: 312×312) |
124+
| [RF-DETR Nano](https://huggingface.co/software-mansion/react-native-executorch-rf-detr-nano) | 80 | [COCO](../../06-api-reference/enumerations/CocoLabel.md) | No (fixed: 384×384) |
125125
| [YOLO26N](https://huggingface.co/software-mansion/react-native-executorch-yolo26) | 80 | [COCO YOLO](../../06-api-reference/enumerations/CocoLabel.md) | Yes (384/512/640) |
126126
| [YOLO26S](https://huggingface.co/software-mansion/react-native-executorch-yolo26) | 80 | [COCO YOLO](../../06-api-reference/enumerations/CocoLabel.md) | Yes (384/512/640) |
127127
| [YOLO26M](https://huggingface.co/software-mansion/react-native-executorch-yolo26) | 80 | [COCO YOLO](../../06-api-reference/enumerations/CocoLabel.md) | Yes (384/512/640) |

packages/react-native-executorch/src/constants/modelUrls.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,10 @@ const SSDLITE_320_MOBILENET_V3_LARGE_MODEL =
452452
Platform.OS === 'ios'
453453
? `${URL_PREFIX}-ssdlite320-mobilenet-v3-large/${VERSION_TAG}/coreml/ssdlite320_mobilenet_v3_large_coreml_fp16.pte`
454454
: `${URL_PREFIX}-ssdlite320-mobilenet-v3-large/${VERSION_TAG}/xnnpack/ssdlite320_mobilenet_v3_large_xnnpack_fp32.pte`;
455-
const RF_DETR_NANO_MODEL = `${URL_PREFIX}-rfdetr-nano-detector/${VERSION_TAG}/rfdetr_detector.pte`;
455+
const RF_DETR_NANO_MODEL =
456+
Platform.OS === 'ios'
457+
? `${URL_PREFIX}-rfdetr-nano-detector/${VERSION_TAG}/coreml/rfdetr_n_det_coreml_int8.pte`
458+
: `${URL_PREFIX}-rfdetr-nano-detector/${VERSION_TAG}/rfdetr_detector.pte`;
456459

457460
/**
458461
* @category Models - Object Detection
@@ -861,7 +864,10 @@ const YOLO26S_SEG_MODEL = `${URL_PREFIX}-yolo26-seg/${VERSION_TAG}/yolo26s-seg/x
861864
const YOLO26M_SEG_MODEL = `${URL_PREFIX}-yolo26-seg/${VERSION_TAG}/yolo26m-seg/xnnpack/yolo26m-seg.pte`;
862865
const YOLO26L_SEG_MODEL = `${URL_PREFIX}-yolo26-seg/${VERSION_TAG}/yolo26l-seg/xnnpack/yolo26l-seg.pte`;
863866
const YOLO26X_SEG_MODEL = `${URL_PREFIX}-yolo26-seg/${VERSION_TAG}/yolo26x-seg/xnnpack/yolo26x-seg.pte`;
864-
const RF_DETR_NANO_SEG_MODEL = `${URL_PREFIX}-rfdetr-nano-segmentation/${VERSION_TAG}/rfdetr_segmentation.pte`;
867+
const RF_DETR_NANO_SEG_MODEL =
868+
Platform.OS === 'ios'
869+
? `${URL_PREFIX}-rfdetr-nano-segmentation/${VERSION_TAG}/coreml/rfdetr_n_seg_coreml_int8.pte`
870+
: `${URL_PREFIX}-rfdetr-nano-segmentation/${VERSION_TAG}/rfdetr_segmentation.pte`;
865871
/**
866872
* @category Models - Instance Segmentation
867873
*/

0 commit comments

Comments
 (0)