Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const segmentation =

### From a custom config

Use [`fromCustomConfig`](../../06-api-reference/classes/InstanceSegmentationModule.md#fromcustomconfig) for custom-exported models with your own label map. It accepts:
Use [`fromCustomModel`](../../06-api-reference/classes/InstanceSegmentationModule.md#fromcustommodel) for custom-exported models with your own label map. It accepts:

- `modelSource` - Location of the model binary.
- `config` - An [`InstanceSegmentationConfig`](../../06-api-reference/type-aliases/InstanceSegmentationConfig.md) object with:
Expand All @@ -77,7 +77,7 @@ If your model supports only **one input size**, omit both fields and export a si
```typescript
const MyLabels = { GRAPE_GREEN: 0, GRAPE_RED: 1, LEAF: 2 } as const;

const segmentation = await InstanceSegmentationModule.fromCustomConfig(
const segmentation = await InstanceSegmentationModule.fromCustomModel(
'https://huggingface.co/.../grape_seg.pte',
{
labelMap: MyLabels,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const segmentation =

### From a custom config

Use [`fromCustomConfig`](../../06-api-reference/classes/InstanceSegmentationModule.md#fromcustomconfig) for custom-exported models with your own label map. It accepts:
Use [`fromCustomModel`](../../06-api-reference/classes/InstanceSegmentationModule.md#fromcustommodel) for custom-exported models with your own label map. It accepts:

- `modelSource` - Location of the model binary.
- `config` - An [`InstanceSegmentationConfig`](../../06-api-reference/type-aliases/InstanceSegmentationConfig.md) object with:
Expand All @@ -77,7 +77,7 @@ If your model supports only **one input size**, omit both fields and export a si
```typescript
const MyLabels = { GRAPE_GREEN: 0, GRAPE_RED: 1, LEAF: 2 } as const;

const segmentation = await InstanceSegmentationModule.fromCustomConfig(
const segmentation = await InstanceSegmentationModule.fromCustomModel(
'https://huggingface.co/.../grape_seg.pte',
{
labelMap: MyLabels,
Expand Down
Loading
Loading