Detector24
Smoking & Tobacco Products Detector
ImageRestricted Content

Smoking & Tobacco Products Detector

Detect cigarettes, vaping, and tobacco products in images. Enforce advertising bans, platform policies, and regulatory compliance automatically.

Accuracy
95.4%
Avg. Speed
5.0s
Per Request
$0.0060
API Name
smoking-detection

Bynn Smoking & Tobacco Products Detector

The Bynn Smoking & Tobacco Products Detector identifies and locates tobacco-related content in images, including cigarettes, cigars, vaping devices, and people actively smoking. This model is essential for enforcing tobacco advertising restrictions and age-restricted content policies.

The Challenge

Tobacco advertising faces near-universal restrictions, yet enforcement in digital spaces remains difficult. Influencer marketing, product placement in user content, and lifestyle imagery glamorizing smoking continue to reach young audiences despite regulations designed to prevent exactly this exposure.

The rise of vaping has added complexity. E-cigarettes and vape products often evade traditional tobacco detection, appearing in youth-oriented content with flavors and designs marketed to younger demographics. Platforms must detect both traditional tobacco products and modern vaping devices to meet regulatory obligations and protect public health—particularly for minors who are most susceptible to tobacco marketing influence.

For physical environments, smoking detection enables automated enforcement of no-smoking policies. CCTV systems can detect smoking in prohibited areas—hospitals, schools, public transit, restaurants, and office buildings. Rather than relying on human monitors or complaints, facilities can receive real-time alerts when violations occur. This protects public health, ensures regulatory compliance, and reduces fire risk from prohibited smoking.

Model Overview

When provided with an image, the detector analyzes the visual content to identify smoking activities and tobacco products. The model uses advanced object detection with instance segmentation, providing both the location of detected items and pixel-level masks that precisely outline each detection.

Achieving 95.4% accuracy, the model can detect a wide variety of tobacco products including traditional cigarettes, cigars, pipes, hookahs, and modern vaping devices, as well as people actively smoking or vaping.

How It Works

The model employs open-vocabulary object detection technology, allowing it to recognize tobacco-related items based on learned visual patterns. For each detected item, the system returns:

  • Bounding box coordinates: The rectangular region containing the detected object
  • Confidence score: A probability value (0.0-1.0) indicating detection certainty
  • Class name: The specific type of tobacco-related item detected
  • Segmentation mask: A pixel-level PNG mask outlining the exact shape of the detected object

Response Structure

The API returns a structured response containing:

  • num_detections: Total count of tobacco-related items 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: Type of tobacco-related item
    • mask_png: Base64-encoded PNG segmentation mask
  • image_size: Original image dimensions {width, height}

Detected Classes

The model can identify the following tobacco-related items:

Traditional Tobacco Products

  • Cigarette, cigarettes, cigaret, cigarette pack
  • Cigar, little cigar, pipe, hookah
  • Tobacco, roll of tobacco
  • Joint, blunt

Vaping & E-Cigarettes

  • Vape, vape pen, vape device
  • E-cigarette, electronic cigarette
  • Vapor, exhaling smoke

Smoking Accessories

  • Lighter, ashtray, match
  • Smoke

People & Activities

  • Smoker, smoking, person smoking
  • Person smoking cigarette, smoking woman, smoking man
  • Person holding cigarette, person vaping, person with vape
  • Smoking marijuana

Performance Metrics

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

Use Cases

  • Advertising Compliance: Enforce tobacco advertising restrictions across digital platforms
  • Age-Restricted Content: Filter smoking content from platforms used by minors
  • Social Media Moderation: Detect smoking content that violates community guidelines
  • Influencer Compliance: Identify undisclosed tobacco sponsorships in influencer content
  • Public Health Campaigns: Monitor and reduce exposure to pro-smoking imagery
  • Brand Safety: Prevent brand advertisements from appearing alongside smoking content

Known Limitations

Important Considerations:

  • Smoke vs. Vapor: Steam, fog, or other vapor sources may occasionally be detected as smoke
  • Artistic Content: Historical or artistic depictions of smoking may be flagged
  • Small Objects: Very small or distant cigarettes/vapes may not be detected
  • Partial Visibility: Heavily occluded items may have lower detection confidence
  • Context Limitations: The model cannot distinguish between recreational and therapeutic smoking aids

Disclaimers

This model provides probability scores, not definitive identification.

  • Screening Tool: Use as part of a broader content moderation strategy, not as the sole decision factor
  • Human Review: High-stakes decisions should involve human review for context assessment
  • False Positives: Vapor, steam, and similar visual elements may trigger detections
  • Regional Variations: Tobacco regulations vary by jurisdiction; ensure compliance with local laws

Best Practice: Combine detection results with human review and contextual analysis for optimal content moderation outcomes.

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": "smoking-detection",
  "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:smokingtobaccoage-restrictedsegmentation

Ready to get started?

Integrate Smoking & Tobacco Products Detector into your application today with our easy-to-use API.