Logo Lanfrica
  • Home
  • Atlas
  • Insights
  • Docs
  • Sign in

© 2026 Lanfrica. All rights reserved. All copyrights of the resources shown on the Lanfrica website belong to the original copyright holders, unless explicitly stated otherwise.

PatrickAttankurugu/ghana-card-detector

Domain:

digital infrastructure

Record type:

softwaremodel
Creator:
Pat
Host:
NPM package # Ghana Card Detector A JavaScript/TypeScript package for detecting Ghana cards in images and video streams using TensorFlow.js and a custom-trained YOLOv8 model. ## Features - Real-time Ghana card detection - Support for both image and video input - High accuracy (97.48% precision, 100% recall) - TypeScript support - Built-in visualization tools - Memory-efficient model loading - Customizable detection parameters ## Installation ```bash npm install ghana-card-detector Basic Usage Typescript import { GhanaCardDetector } from 'ghana-card-detector'; // Initialize detector const detector = new GhanaCardDetector(); await detector.initialize(); // Detect from image const img = document.querySelector('img'); const results = await detector.detect(img); // Process results results.forEach(detection => { console.log('Detection:', { confidence: detection.confidence, boundingBox: detection.box }); }); Example with Video Stream typescriptCopyimport { GhanaCardDetector } from 'ghana-card-detector'; async function setupDetector() { // Initialize detector const detector = new GhanaCardDetector(); await detector.initialize(); // Access camera const stream = await navigator.mediaDevices.getUserMedia({ video: true }); const video = document.querySelector('video'); video.srcObject = stream; // Create canvas for visualization const canvas = document.createElement('canvas'); document.body.appendChild(canvas); // Detection loop async function detectFrame() { const detections = await detector.detect(video); // Draw results detector.drawDetections(canvas, detections); requestAnimationFrame(detectFrame); } detectFrame(); } Advanced Configuration typescriptCopyconst detector = new GhanaCardDetector({ modelUrl: 'custom-model-url', // Custom model URL version: '1.0.0', // Model version scoreThreshold: 0.5, // Detection confidence threshold maxDetections: 5 // Maximum numb …

Visit

github.com

Tasks

computer visionimage classification