Skip to content

Latest commit

 

History

History
155 lines (112 loc) · 8.14 KB

File metadata and controls

155 lines (112 loc) · 8.14 KB

Ultralytics logo

🚀 Ultralytics Replicate

Deploy YOLO11n to Replicate at https://replicate.com/ultralytics/yolo11n with ready-to-use Cog configuration and automated CI/CD workflow.

Push YOLO11n to Replicate Ultralytics Actions

Ultralytics Discord Ultralytics Forums Ultralytics Reddit

Replicate AI

🗂️ Repository Structure

This repository provides optimized Replicate deployment for the YOLO11n model with automated CI/CD workflow.

ultralytics/replicate/
│
├── yolo11n/                  # YOLO11n model deployment
│   ├── cog.yaml              # Cog configuration
│   ├── predict.py            # Prediction interface
│   └── README.md             # Model documentation
│
├── .github/workflows/        # Automated deployment
│   ├── push.yml              # Model deployment workflow
│   ├── ci.yml                # Code quality checks
│   └── format.yml            # Code formatting
│
├── test_prediction.py        # Local testing utility
├── requirements.txt          # Dependencies
├── LICENSE                   # AGPL-3.0 license
└── README.md                 # This file

⚡ Quick Start

Deploy YOLO11n Model

Model will deploy to https://replicate.com/ultralytics/yolo11n:

# Clone repository
git clone https://github.com/ultralytics/replicate.git
cd replicate

# Deploy to Replicate
cd yolo11n
cog login
cog push r8.im/ultralytics/yolo11n

Automated Deployment with GitHub Actions

  1. Setup secrets:

    • Go to repository Settings → Secrets → Actions
    • Add REPLICATE_API_TOKEN with your Replicate API token
  2. Deploy:

    • Manual: Actions tab → "Push YOLO11n to Replicate" → Run workflow
    • Automatic: Push changes to main branch auto-deploys

🛠️ Installation

Install Cog (Replicate's deployment tool):

sudo curl -o /usr/local/bin/cog -L https://github.com/replicate/cog/releases/latest/download/cog_$(uname -s)_$(uname -m)
sudo chmod +x /usr/local/bin/cog

For local development and testing:

pip install -r requirements.txt

🎯 YOLO11n Model

  • Purpose: Official YOLO11n object detection
  • Parameters: 2.6M parameters
  • Classes: 80 COCO classes
  • Performance: 39.5 mAP50-95 on COCO dataset
  • Speed: Optimized for real-time inference

🔧 Model Setup

The model will be automatically downloaded by ultralytics when needed:

from ultralytics import YOLO

model = YOLO("yolo11n.pt")  # Downloads automatically if not present

🧪 Local Testing

Test the model locally before deploying:

# Test YOLO11n
python test_prediction.py --model yolo11n --image test.jpg

🚀 Features

  • 🏎️ Optimized: PyTorch model for fast inference
  • 🤖 Automated: GitHub Actions for CI/CD
  • 📦 Ready-to-use: Pre-configured YOLO11n deployment
  • 📊 Scalable: Auto-scaling Replicate infrastructure
  • 🎯 Simple: Single model focus

💡 Contribute

Ultralytics thrives on community collaboration, and we deeply value your contributions! Whether it's reporting bugs, suggesting features, or submitting code changes, your involvement is crucial.

  • Reporting Issues: Encounter a bug? Please report it on GitHub Issues.
  • Feature Requests: Have an idea for improvement? Share it via GitHub Issues.
  • Pull Requests: Want to contribute code? Please read our Contributing Guide first, then submit a Pull Request.
  • Feedback: Share your thoughts and experiences by participating in our official Survey.

A heartfelt thank you 🙏 goes out to all our contributors! Your efforts help make Ultralytics tools better for everyone.

Ultralytics open-source contributors

📄 License

Ultralytics offers two licensing options to accommodate diverse needs:

  • AGPL-3.0 License: Ideal for students, researchers, and enthusiasts passionate about open collaboration and knowledge sharing. This OSI-approved open-source license promotes transparency and community involvement. See the LICENSE file for details.
  • Enterprise License: Designed for commercial applications, this license permits the seamless integration of Ultralytics software and AI models into commercial products and services, bypassing the copyleft requirements of AGPL-3.0. For commercial use cases, please inquire about an Ultralytics Enterprise License.

📮 Contact

For bug reports or feature suggestions related to this project or other Ultralytics projects, please use GitHub Issues. For general questions, discussions, and community support, join our Discord server!


Ultralytics GitHub space Ultralytics LinkedIn space Ultralytics Twitter space Ultralytics YouTube space Ultralytics TikTok space Ultralytics BiliBili space Ultralytics Discord