npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@trillboards/edge-cloud

v0.2.1

Published

Gemini cloud inference for scene analysis, demographics, and contextual targeting

Downloads

270

Readme

@trillboards/edge-cloud

Cloud vision inference for DOOH devices. Gemini Vision scene analysis, content moderation, contextual targeting, and demographic estimation from video frames.

Install

npm install @trillboards/edge-cloud

What This Does

Sends captured video frames to Google Gemini Vision API for advanced analysis that goes beyond on-device ONNX models:

  • Scene Analysis — describes what's happening in the scene (people, objects, activities, environment)
  • Contextual Targeting — recommends ad categories and bidding adjustments based on real-time scene context
  • Content Moderation — evaluates frames for display safety with confidence scores and block reasons
  • Crowd Density — classifies venue occupancy (empty, sparse, moderate, dense, packed)
  • Frame Capture Manager — captures frames at configurable cadence, batches and encodes to JPEG/PNG

Usage

import { GeminiSceneAnalyzer, FrameCaptureManager } from '@trillboards/edge-cloud';

// Capture frames from camera feed
const capture = new FrameCaptureManager({
  cadenceSeconds: 30,
  faceDetectedCadenceSeconds: 10, // faster when faces present
  maxFramesPerBatch: 3,
  quality: 80
});

capture.on('batchReady', async (frames) => {
  const result = await analyzer.analyzeScene(frames);
  console.log(`Scene: ${result.sceneDescription}`);
  console.log(`People: ${result.peopleCount}`);
  console.log(`Objects: ${result.detectedObjects.join(', ')}`);
});

// Scene analysis via Gemini
const analyzer = new GeminiSceneAnalyzer({
  apiKey: process.env.GEMINI_API_KEY,
  model: 'gemini-2.0-flash'
});

// Contextual targeting
const targeting = await analyzer.getContextualTargeting(frames);
// → { recommendedCategories: ['retail', 'food'], relevanceScore: 0.85 }

// Content moderation
const moderation = await analyzer.moderate(frames);
// → { isSafeForDisplay: true, safetyCategory: 'safe', confidenceScore: 0.98 }

Cost Management

const cost = analyzer.getCostSnapshot();
// → { estimatedTokensPerMinute: 150, costPerDay: 0.45, costPerMonth: 13.50 }

Scene Analysis Result

interface SceneAnalysisResult {
  sceneDescription: string;
  peopleCount: number;
  detectedObjects: string[];
  activities: string[];
  confidence: number;
}

When to Use This vs. Edge Sensing

| Capability | @trillboards/edge-sensing | @trillboards/edge-cloud | |-----------|--------------------------|------------------------| | Face detection | On-device ONNX | N/A | | Scene understanding | N/A | Gemini Vision | | Cost | Free (local compute) | Per-API-call | | Latency | < 50ms | 500ms-2s | | Privacy | No data leaves device | Frames sent to Google |

Use edge-sensing for real-time audience metrics. Use edge-cloud for rich scene context and content moderation.

License

MIT