Update README.md
Browse files
README.md
CHANGED
@@ -21,7 +21,7 @@ const detector = await pipeline('zero-shot-object-detection', 'Xenova/owlvit-bas
|
|
21 |
|
22 |
const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/astronaut.png';
|
23 |
const candidate_labels = ['human face', 'rocket', 'helmet', 'american flag'];
|
24 |
-
const output = await detector
|
25 |
// [
|
26 |
// { score: 0.24392342567443848, label: 'human face', box: { xmin: 180, ymin: 67, xmax: 274, ymax: 175 } },
|
27 |
// { score: 0.15129457414150238, label: 'american flag', box: { xmin: 0, ymin: 4, xmax: 106, ymax: 513 } },
|
|
|
21 |
|
22 |
const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/astronaut.png';
|
23 |
const candidate_labels = ['human face', 'rocket', 'helmet', 'american flag'];
|
24 |
+
const output = await detector(url, candidate_labels);
|
25 |
// [
|
26 |
// { score: 0.24392342567443848, label: 'human face', box: { xmin: 180, ymin: 67, xmax: 274, ymax: 175 } },
|
27 |
// { score: 0.15129457414150238, label: 'american flag', box: { xmin: 0, ymin: 4, xmax: 106, ymax: 513 } },
|