You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d55bbd2
Browse filesBrowse the repository at this point in the historyBrowse files
Depth Vision and Segment Vision readings: DepthReading for bynn_depth and SegmentReading with its instances, openings, depths and sizes for bynn_segment, each kept as sent; the README lists every booster the API serves with its options and readings [skip publish]
Copy file name to clipboardExpand all lines: README.md
+39Lines changed: 39 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -365,6 +365,11 @@ answered exactly as before.
365
365
|---|---|---|
366
366
|`age`| A picture of a person | How old the person is, with a range and a confidence (the largest face is read) |
367
367
|`ai_generated`| Any picture | How likely the picture was made by an image generator, which generator most likely, and whether the file carries Content Credentials (C2PA) and who signed them |
368
+
|`face_detection`| Any picture | How many faces the picture shows and where, a box and a confidence for each |
369
+
|`face_recognition`| A picture of a person | Which faces match the collection the request names (see Collections): a box, a score and the matched item's reference for each |
370
+
|`ocr`| Any picture | The picture's text, whole, or what the booster's `prompt` asks for |
371
+
|`bynn_depth` (Depth Vision) | Any picture | How far away things are, in meters: the nearest obstacle straight ahead, seven directions from left to right, and a grid of the picture |
372
+
|`bynn_segment` (Segment Vision) | Any picture | Where the things you name in words are: each one's outline, box and centre, and with depth on, its distance and size in meters |
368
373
369
374
```python
370
375
from decisionnode import Image, truth
@@ -413,6 +418,35 @@ It is sent as `{"name": "ai_generated", "images": ["c3d4"], "require": true}`, e
413
418
only when given; a plain mapping in that form works too. A `Booster` with no setting is sent
414
419
as its name, so the request stays the plain list.
415
420
421
+
| Booster |`options`|
422
+
|---|---|
423
+
|`face_recognition`|`collection` (required): `celebrities`, or the id of one of your collections; `threshold`, 0 to 1 (0.5): a face scored below it is no match |
424
+
|`ocr`|`prompt`: the model's instruction, at most 2,000 characters; left out, all the visible text |
425
+
|`bynn_depth`|`grid_size`: the grid's cells per side, 2 to 16 (8) |
426
+
|`bynn_segment`|`prompt` (required): what to find, one phrase as a string or 1 to 4 phrases as a list, each at most 120 characters; `max_instances`, 1 to 16 (8); `min_score`, 0 to 1 (0.25); `polygon_points`, the points of each outline, 3 to 64 (24); `depth`, distances and sizes in meters (`True`) |
for found in d.evidence["bynn_segment"].results[0].instances:
441
+
print(found.label, found.score, found.centroid, found.depth and found.depth.median)
442
+
```
443
+
444
+
`bynn_segment`'s `prompt` as a string is always one phrase; send several as a list.
445
+
Descriptive phrases match better than short names: "purple octagonal frame on a pole" finds
446
+
what "purple gate" may not. Each picture it reads is one booster call, its depth included.
447
+
Depth Vision's and Segment Vision's distances are estimates from one picture, for decisions
448
+
and planning, never a safety stop: a robot or a drone uses stereo cameras or LiDAR for that.
449
+
416
450
The client checks nothing about boosters itself: the API answers a malformed list, an
417
451
unknown name and a booster turned off for your workspace before any booster runs and
418
452
before any charge. A booster added to the API works with this version of the package.
@@ -436,6 +470,11 @@ requests.
436
470
|---|---|
437
471
|`AgeReading`|`image`, `faces` (how many faces were found; the largest is read), and `age_years`, `low`, `high`, `confidence`, each `None` when `faces` is 0 |
438
472
|`AiGeneratedReading`|`image`, `generated` (the probability that a generator made the picture), `confidence`, `method` (`inference`: read from the pixels; `c2pa`: the file's trusted Content Credentials declare it generated or edited by AI), `top_generator` (`name`, `probability` of the likeliest generator when the reading says likely generated; `None` otherwise, and always on a `c2pa` reading), `c2pa_signer` (who signed the file's Content Credentials when they are trusted, else `None`), `c2pa` (`untrusted` when the file carries Content Credentials that validate but are not trusted, which change nothing in the reading; else `None`) |
473
+
|`FaceDetectionReading`|`image`, `faces` (how many faces the picture shows; 0 is a reading), `detections` (at most 64, each a `FaceDetection`: `box`, a `FaceBox` with the corners `x1`, `y1`, `x2`, `y2` in the request's units, and `confidence`) |
474
+
|`FaceRecognitionReading`|`image`, `faces` (how many faces were searched), `matches` (best first, each a `FaceMatch`: `box`, `score`, `collection`, `reference`, `name` for a public figure, `label` and `metadata` for your own item, `collection_name`), `collection_name` (your collection's name) |
475
+
|`OcrReading`|`image`, `text` (the reading; empty when the picture shows no text), `truncated` (`True` when the reading was cut at the model's context limit) |
476
+
|`DepthReading`|`image`, `ahead` (meters to the nearest obstacle straight ahead, the floor left out; `None` when none is found), `directions` (7 entries, left to right, each meters or `None`), `ground` (whether a floor or ground was found and left out), `grid_rows`, `grid_cols`, `grid` (rows of meters from the top left), `depth_min`, `depth_max`, `depth_median`, `width`, `height` (the picture's size in pixels) |
477
+
|`SegmentReading`|`image`, `width`, `height`, `prompts` (the phrases searched for), `instances` (best first, each a `SegmentInstance`: `label`, `score`, `box``[x1, y1, x2, y2]`, `polygon``[[x, y], ...]`, `area`, `centroid``[x, y]`, `opening` (a `SegmentOpening` for the hole of a gate, a doorway or a ring, or `None`), `depth` (a `SegmentDepth`: `median`, `opening_median`, `opening_rim_median`) and `size_m` (a `SegmentSize` in meters: `width`, `height`, `opening`), both `None` with depth off), `depth_source`, `assumed_hfov_deg`. Coordinates are fractions of the picture from its top left |
439
478
|`UnknownReading`|`image` and `raw`: a reading of a booster this version does not know, or one with a field missing or of the wrong type. The decision does not fail |
440
479
441
480
Booster calls are billed from your prepaid balance with the request's tokens, one per
0 commit comments