google / magika

AI-powered file type detection achieving 99% accuracy with a tiny model that runs in milliseconds on CPU

活跃维护 Apache 2.0 Rust Tracked
18.7k 1.2k 3 天前
CIDocker
deep-learning filetype keras-classification-models keras-models mime-types ai onnx

星标趋势

数据积累中,暂无足够数据生成趋势图

AI 分析

项目摘要

Magika is Google's AI-powered file type detection tool that uses deep learning to identify 200+ content types with ~99% accuracy. It employs a highly optimized custom model weighing only a few MBs, enabling millisecond-level detection on single CPUs, and is used at massive scale across Google's infrastructure including Gmail and Drive.

为什么值得关注

Magika represents a practical, production-proven application of deep learning to a classic systems problem, achieving near-perfect accuracy with minimal computational resources. Its deployment at Google scale (hundreds of billions of samples weekly) and integration with security platforms like VirusTotal demonstrate real-world impact, while its tiny model size challenges the assumption that accurate AI requires massive compute.

优势

  • Exceptional accuracy (~99%) with a very small model footprint (few MBs)
  • Extremely fast inference (milliseconds on single CPU)
  • Battle-tested at Google scale across billions of files weekly
  • Multi-language support (Python, Go, JavaScript, CLI) with ONNX runtime

局限性

  • No automated tests in the repository despite production use
  • Limited code examples and usage documentation beyond CLI
  • Custom model architecture may not be easily extensible for user-defined types

使用场景

  • Security scanning and content policy enforcement for email and cloud storage
  • File upload validation and content-type verification in web applications
  • Digital forensics and malware analysis pipelines (VirusTotal integration)
  • Automated file processing and routing in data engineering workflows
目标用户: Security engineers, backend developers, and DevOps teams building file processing and security scanning systems
学习曲线: 低
分析模型:LongCat-2.0 | 分析时间:1 个月前