Detector24
People Counting
ImageFace / People Related

People Counting

Count people in images with AI-powered detection and segmentation. Monitor crowd density, occupancy limits, and capacity for safety compliance.

Accuracy
97.1%
Avg. Speed
5.0s
Per Request
$0.0060
API Name
people-counting

Bynn People Counting

The Bynn People Counting model accurately detects and counts individual people in images while providing precise segmentation masks for each person. This model is ideal for crowd analysis, occupancy monitoring, and retail analytics.

The Challenge

Accurate people counting enables critical decisions across industries. Retail stores optimize layouts and staffing based on foot traffic. Venues ensure compliance with occupancy limits for fire safety. Security operations monitor crowd density to prevent dangerous overcrowding. Yet manual counting is slow, error-prone, and impossible at scale.

Traditional counting methods fail in real-world conditions. Overlapping people in crowds are counted as one. Partial visibility at frame edges causes undercounting. Varying poses, clothing, and lighting confuse simple detectors. Accurate counting requires sophisticated detection that identifies individuals even in challenging scenarios—dense crowds, partial occlusion, and varying perspectives.

Connected to CCTV systems, people counting becomes a powerful security tool. Detect unauthorized gatherings in restricted areas. Monitor for groups forming where they shouldn't be—after-hours in office buildings, in secure zones, or in areas with access limits. Real-time alerts when thresholds are exceeded enable rapid security response before situations escalate.

Model Overview

When provided with an image, the detector analyzes the visual content to identify and count distinct individuals. The model uses advanced object detection with instance segmentation, providing both the location of each person and pixel-level masks that precisely outline each individual.

Achieving 97.1% accuracy, the model can reliably count people in various scenarios from single portraits to crowded scenes, providing accurate counts and individual segmentation for each person detected.

How It Works

The model employs open-vocabulary object detection technology optimized for person detection. For each detected individual, the system returns:

  • Bounding box coordinates: The rectangular region containing the detected person
  • Confidence score: A probability value (0.0-1.0) indicating detection certainty
  • Class name: "person" for each detected individual
  • Segmentation mask: A pixel-level PNG mask outlining the exact silhouette of each person

Response Structure

The API returns a structured response containing:

  • num_detections: Total count of people detected in the image
  • detections: Array of detection objects, each containing:
    • bbox: Bounding box coordinates {x1, y1, x2, y2}
    • score: Detection confidence (0.0-1.0)
    • class_name: "person"
    • mask_png: Base64-encoded PNG segmentation mask
  • image_size: Original image dimensions {width, height}

Detected Classes

The model detects:

  • Person: Any human individual visible in the image

Performance Metrics

Metric Value
Detection Accuracy 97.1%
Average Response Time 5000ms
Max File Size 20MB
Supported Formats GIF, JPEG, JPG, PNG, WebP

Use Cases

  • Crowd Analysis: Count attendees at events, venues, or public spaces
  • Occupancy Monitoring: Track building or room occupancy for safety compliance
  • Retail Analytics: Measure foot traffic and store occupancy for business insights
  • Content Classification: Categorize images by number of people (portrait, group, crowd)
  • Social Media Analysis: Analyze user-generated content to understand social context
  • Photography Tagging: Automatically tag photos based on the number of people present
  • Safety Compliance: Verify crowd limits and social distancing requirements

Known Limitations

Important Considerations:

  • Heavy Occlusion: In very crowded scenes, heavily occluded individuals may be undercounted
  • Distant People: Very small or distant people in wide shots may not be detected
  • Partial Visibility: People who are largely obscured may have lower detection confidence
  • Mannequins & Statues: Realistic human figures may occasionally be detected as people
  • Artistic Representations: People in paintings, posters, or on screens may be detected

Disclaimers

This model provides probability scores and counts, not definitive census data.

  • Estimation Tool: Use as an automated estimation tool, not for exact counting in critical applications
  • Crowd Scenes: For very large crowds, counts may underestimate actual numbers due to occlusion
  • Privacy Considerations: Ensure your use case complies with privacy regulations and consent requirements
  • Verification: For safety-critical applications, combine with other counting methods or human verification

Best Practice: Use the segmentation masks to visually verify counts and combine with human review for high-stakes counting applications.

API Reference

Version
2601
Jan 3, 2026
Avg. Processing
5.0s
Per Request
$0.006
Required Plan
trial

Input Parameters

Open-vocabulary object detection with segmentation. Detects objects using text prompts.

image_urlstringRequired

URL of the image for object detection

Example:
https://example.com/image.jpg

Response Fields

Object detection results with bounding boxes and segmentation masks

num_detectionsinteger

Number of objects detected

Example:
3
detectionsarray

Array of detected objects

Array Item Properties:
bboxobject

Bounding box {x1, y1, x2, y2}

{"x1":100,"y1":150,"x2":300,"y2":400}
scorefloat

Detection confidence (0.0-1.0)

0.95
class_idinteger

Class index

0
class_namestring

Detected object class name

person
mask_pngstring

Base64-encoded PNG segmentation mask

data:image/png;base64,...
image_sizeobject

Original image dimensions

Example:
{ "width": 1920, "height": 1080 }

Complete Example

Request

{
  "model": "people-counting",
  "image_url": "https://example.com/image.jpg"
}

Response

{
  "success": true,
  "data": {
    "num_detections": 2,
    "detections": [
      {
        "bbox": {
          "x1": 100,
          "y1": 150,
          "x2": 300,
          "y2": 400
        },
        "score": 0.95,
        "class_id": 0,
        "class_name": "person",
        "mask_png": "data:image/png;base64,iVBORw0KGgo..."
      },
      {
        "bbox": {
          "x1": 400,
          "y1": 200,
          "x2": 600,
          "y2": 450
        },
        "score": 0.87,
        "class_id": 1,
        "class_name": "car",
        "mask_png": "data:image/png;base64,iVBORw0KGgo..."
      }
    ],
    "image_size": {
      "width": 1920,
      "height": 1080
    }
  }
}

Additional Information

Rate Limiting
If we throttle your request, you will receive a 429 HTTP error code along with an error message. You should then retry with an exponential back-off strategy, meaning that you should retry after 4 seconds, then 8 seconds, then 16 seconds, etc.
Supported Formats
gif, jpeg, jpg, png, webp
Maximum File Size
20MB
Tags:peoplecountingcrowdsegmentation

Ready to get started?

Integrate People Counting into your application today with our easy-to-use API.