Object Detection — what is on the picture, and where avatar

Object Detection — what is on the picture, and where

Pricing

from $2.00 / 1,000 item processeds

Go to Apify Store
Object Detection — what is on the picture, and where

Object Detection — what is on the picture, and where

Detect the 80 everyday COCO object classes (person, car, dog, bottle, chair, laptop ...) in images with a license-clean YOLOX model on onnxruntime. Returns label, confidence and bounding box per object, or crops every hit into its own image. One dataset item per image, per-image pricing.

Pricing

from $2.00 / 1,000 item processeds

Rating

0.0

(0)

Developer

praestat media

praestat media

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 hours ago

Last modified

Share

Object Detection

Detect the 80 COCO object classes in images and get label, confidence and bounding box per object. detect answers "what is on this picture, and where"; crop additionally cuts every hit into its own JPEG.

Why YOLOX and not YOLOv8

YOLOX (Megvii) is Apache-2.0. That matters for you, the user, not for a licence fee: you get the exact model weights, the code that runs them and the freedom to use the output commercially, with no second licence, no attribution burden on your own product and no restriction on the images you process with it.

YOLOv8 models are AGPL-3.0 instead. Pairing those weights with a hosted service would put the AGPL's source-disclosure requirement on the service around them — a restriction this Actor simply does not carry. Same 80 COCO classes, same kind of output, plain ONNX without torch. All model files ship inside the image (/opt/models), so no download happens at runtime.

Model size: tiny, s or m

All three are the same YOLOX release (Apache-2.0), the same 80 COCO classes and the same output — they differ in resolution and depth. tiny is the default because it keeps runs cheap.

modelNameInputFileMeasured per image (warm)On dog.jpg: dog score
yolox-tiny (default)416 px20 MB225 ms0.58
yolox-s640 px35 MB689 ms0.90
yolox-m640 px97 MB1510 ms0.94

Measured on a 4-core i5-3570 without GPU, 768×576 image, median of three runs after warm-up; cold start (first image loads the model) is 383 / 800 / 1966 ms. On Apify's default hardware it will be faster, but the ratio stays: s is about 3× and m about 7× the work of tiny.

The larger models help with small, distant or partly hidden objects — that is where the dog score moves from 0.58 to 0.90. For "is there a person in this photo" tiny is enough; for crowded scenes, small products or surveillance-frame use cases pick yolox-s. yolox-m costs another 2× time for a few points of confidence and is rarely worth it for a per-image price.

Operations

OperationDoesOutput
detectAnalyses every imageone dataset item per image with detections
cropSame, plus cuts out each hitdataset item plus the crops in the key-value store

Every detection carries label, classId, confidence and box ([x, y, width, height] in pixels of the original image). The list is sorted by confidence, duplicates are removed by NMS.

Input

FieldDefaultMeaning
operationdetectdetect or crop
imageUrls—direct links or local paths
confidenceThreshold0.25drop hits below this model score
iouThreshold0.45boxes overlapping more are merged
modelNameyolox-tinyyolox-tiny, yolox-s or yolox-m — see the table above
classesallfilter by COCO name (person, dog, …) or id 0–79

Output

{
"operation": "detect",
"source": "dog.jpg",
"status": "ok",
"width": 768,
"height": 576,
"count": 3,
"detections": [
{"label": "bicycle", "classId": 1, "confidence": 0.8408, "box": [125.2, 124.2, 438.9, 295.8]},
{"label": "car", "classId": 2, "confidence": 0.7275, "box": [462.2, 82.5, 230.1, 89.4]},
{"label": "dog", "classId": 16, "confidence": 0.5833, "box": [130.1, 141.4, 249.7, 251.2]}
],
"model": "yolox_tiny.onnx",
"modelName": "yolox-tiny",
"inputSize": 416,
"license": "YOLOX (Megvii), Apache-2.0"
}

What this does NOT do

  • No authenticity check. It finds objects, not forgeries. A confidence value is a model score, not evidence that the photo is real or synthetic.
  • No fine-grained classes. The 80 COCO classes are what the model knows: "bottle", not "Austrian wine bottle"; "dog", not "dachshund".
  • No text, no faces, no emotions. Use OCR for text and a face model for faces — both are different products with their own licence questions.
  • No custom classes. You cannot teach these models your own labels. A filter narrows the output to the 80 COCO classes; a new class means training a new model.
  • No video. One image per request. For video, extract frames first (ffmpeg) and send them as a batch — every analysed frame is one image-analyzed event.

Pricing (pay per event)

EventWhenPrice
apify-actor-startonce per run$0.005
image-analyzedper image with status: "ok"$0.002

A 100-image batch with the default model is roughly $0.20 plus the start event; with yolox-s count the 689 ms per image instead of 225 ms. Measured on this host (4-core i5-3570, no GPU): 225 / 689 / 1510 ms per 768×576 image for tiny / s / m after warm-up, model load 0.38 / 0.80 / 1.97 s. That is CPU inference on a weak CPU — on Apify's default hardware it will be faster.

Local run

$python -m src --input input.json --outdir out --push