Image Segmentation
Transformers
ONNX
Transformers.js
English
u2net
mask-generation
vision
background-removal
portrait-matting
Instructions to use BritishWerewolf/U-2-Netp with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BritishWerewolf/U-2-Netp with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-segmentation", model="BritishWerewolf/U-2-Netp")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("BritishWerewolf/U-2-Netp", dtype="auto") - Transformers.js
How to use BritishWerewolf/U-2-Netp with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('image-segmentation', 'BritishWerewolf/U-2-Netp'); - Notebooks
- Google Colab
- Kaggle
Commit ·
7112208
1
Parent(s): 3bba96f
Set default model to fp32.
Browse files- config.json +3 -0
config.json
CHANGED
|
@@ -4,6 +4,9 @@
|
|
| 4 |
"architectures": [
|
| 5 |
"U2NetModel"
|
| 6 |
],
|
|
|
|
|
|
|
|
|
|
| 7 |
"input_name": "input.1",
|
| 8 |
"input_shape": [1, 3, 320, 320],
|
| 9 |
"output_composite": "1959",
|
|
|
|
| 4 |
"architectures": [
|
| 5 |
"U2NetModel"
|
| 6 |
],
|
| 7 |
+
"transformers.js_config": {
|
| 8 |
+
"dtype": "fp32"
|
| 9 |
+
},
|
| 10 |
"input_name": "input.1",
|
| 11 |
"input_shape": [1, 3, 320, 320],
|
| 12 |
"output_composite": "1959",
|