doniramdani820's picture
Upload 6 files
7b82657 verified
|
Raw History Blame Contribute Delete
2.97 kB
metadata
title: reCAPTCHA Solver 3x3
emoji: πŸ€–
colorFrom: blue
colorTo: green
sdk: docker
pinned: false
license: mit

πŸ€– reCAPTCHA 3x3 Detection API

Solves 3x3 grid reCAPTCHA challenges using YOLO object detection.

🎯 Features

  • ⚑ Fast inference (2-3s per request)
  • 🎯 High accuracy with YOLO detection
  • πŸ”„ Auto-lowering confidence for better detection
  • πŸ“Š Built-in metrics and monitoring
  • 🌐 CORS enabled for browser extensions

πŸ“‘ API Endpoints

POST /predict

Predict which tiles to click in a 3x3 grid.

Request:

{
  "image": "data:image/png;base64,iVBOR...",
  "challenge_title": "crosswalks"
}

Response:

{
  "success": true,
  "tiles_to_click": [2, 5, 8],
  "num_detections": 12,
  "confidence_used": 0.20,
  "latency_s": 2.341
}

GET /health

Check API health and statistics.

Response:

{
  "status": "healthy",
  "model_loaded": true,
  "requests_total": 42,
  "requests_successful": 40,
  "avg_latency_s": 2.5
}

πŸš€ Usage

From Browser Extension

const response = await fetch('https://YOUR-SPACE.hf.space/predict', {
    method: 'POST',
    headers: {'Content-Type': 'application/json'},
    body: JSON.stringify({
        image: screenshotBase64,
        challenge_title: 'crosswalks'
    })
});

const result = await response.json();
console.log('Tiles to click:', result.tiles_to_click);

From Python

import requests
import base64

with open('screenshot.png', 'rb') as f:
    image_b64 = base64.b64encode(f.read()).decode()

response = requests.post('https://YOUR-SPACE.hf.space/predict', json={
    'image': f'data:image/png;base64,{image_b64}',
    'challenge_title': 'crosswalks'
})

print(response.json())

πŸ”§ Model Details

  • Architecture: YOLOv8 Detection
  • Input: 640x640 RGB image
  • Output: Bounding boxes with confidence scores
  • Classes: Multiple object types (vehicles, crosswalks, traffic lights, etc.)

πŸ“Š Performance

  • Cold start: ~15 seconds (first request)
  • Warm inference: 2-3 seconds per request
  • Memory usage: ~1.5GB
  • Concurrent requests: 2-3 simultaneous

🎯 Tile Mapping

The API maps detected objects to a 3x3 grid:

[0] [1] [2]
[3] [4] [5]
[6] [7] [8]

Objects are mapped based on their center point within the grid.

πŸ›‘οΈ Rate Limits

  • Free tier: 100 requests per hour
  • Timeout: 30 seconds per request
  • Max image size: 10MB

πŸ“ License

MIT License - See LICENSE file for details

πŸ”— Related


Note: This API is for educational and research purposes only. Use responsibly and respect website terms of service.