← 开源
augmentedstartups

AS-One

Easy & Modular Computer Vision Detectors, Trackers & SAM - Run YOLOv9,v8,v7,v6,v5,R,X in under 10 lines of code.

AI EngineeringMake agent see hear talkPython
在 GitHub 打开
增长势头
+-124 小时新增 Star-0.2%
607
Star
106
Fork
+-1
本周
8
贡献者
创建于 2022-10-31 · 更新于 2026-10-15 · 今日第 19166 名
主要开发者

augmentedstartups/AS-One 排名第 19,166,有 607 个星标。

同类别比较

augmentedstartups/AS-One 排名第 19,166,此处有 8 个同类条目;GMGNAI/gmgn-skills 排名第 19,165。

同类别比较
名称排名指标
lewislulu/llm-wiki-skill19,145
语言:
TypeScript
星标数:
654
分叉数:
105
gemini-cli-extensions/workspace19,150
语言:
TypeScript
星标数:
646
分叉数:
107
简介:
Access Google Workspace when using Gemini CLI
carlos-algms/agentic.nvim19,155
语言:
Lua
星标数:
640
分叉数:
62
简介:
Agentic Chat Interface directly in Neovim with ACP providers from Claude-Code, Gemini, Codex, OpenCode, and Cursor-agent
GMGNAI/gmgn-skills19,165
语言:
Python
星标数:
614
分叉数:
105
RageAgainstThePixel/com.openai.unity19,172
语言:
C#
星标数:
597
分叉数:
87
简介:
A Non-Official OpenAI Rest Client for Unity (UPM)
NextAdminHQ/nextjs-admin-dashboard19,175
语言:
TypeScript
星标数:
589
分叉数:
259
简介:
AI-Native Next.js admin dashboard template and UI components that come with pre-built elements, components, pages, high-quality design, integrations, and much more.
Shark-NLP/OpenICL19,176
语言:
Python
星标数:
588
分叉数:
32
简介:
OpenICL is an open-source framework to facilitate research, development, and prototyping of in-context learning.
JunyaoHu/common_metrics_on_video_quality19,181
语言:
Python
星标数:
586
分叉数:
25
简介:
You can easily calculate FVD, PSNR, SSIM, LPIPS for evaluating the quality of generated or predicted videos.
关键参数与规格
关键参数与规格
参数值
语言Python
类别AI Engineering
子类别Make agent see hear talk
关键词Computer vision, Object detection
星标数607
分叉数106
贡献者8
创建日期2022-10-31
更新日期2026-10-15
1 天星标数-1
7 天星标数-1
排名19,166
上次排名15,956
排名变化-3,210
7 天星标排名17,865
上次 7 天星标排名15,385
7 天星标排名变化-2,480
总星标排名16,649
上次总星标排名16,592
总星标排名变化-57
README 摘录

AS-One v2 : A Modular Library for YOLO Object Detection, Segmentation, Tracking & Pose 👋 Hello ==UPDATE: ASOne v2 is now out! We've updated with YOLOV9 and SAM== AS-One is a python wrapper for multiple detection and tracking algorithms all at one place. Different trackers such as , or can be integrated with different versions of with minimum lines of code. This python wrapper provides YOLO models in , & flavors. We plan to offer support for future versions of YOLO when they get

released. This is One Library for most of your computer vision needs. If you would like to dive deeper into YOLO Object Detection and Tracking, then check out our courses and projects Watch the step-by-step tutorial 🤝 💻 Install 🔥 Prerequisites Make sure to install drivers in your system if you want to use . Follow driver installation for further instructions. Make sure you have MS Build tools installed in system if using windows. Download git for windows if not installed. For

windows machine, you will need to install from source to run library. Check out instructions in section below to install on windows. 👉 Install from Source 💾 Clone the Repository Navigate to an empty folder of your choice. Change Directory to AS-One 👉 For Linux 👉 For Windows 10/11 👉 For MacOS Quick Start 🏃‍♂️ Use tracker on sample video. 1 👉 Object Detection Run the to test detector. 1 👉 Use Custom Trained Weights for Detector Use your custom weights of a detector model trained

on custom data by simply providing path of the weights file. 2 👉 Changing Detector Models Change detector by simply changing detector flag. The flags are provided in benchmark tables. Our library now supports YOLOv5, YOLOv7, and YOLOv8 on macOS. 2 👉 Object Tracking Use tracker on sample video. [Note] Use can use custom weights for a detector model by simply providing path of the weights file. 1 👉 Changing Detector and Tracking Models Change Tracker by simply changing the tracker flag. The

flags are provided in benchmark tables. 4 👉 Text Detection Sample code to detect text on an image Use Tracker on Text Run the to test ocr. 5 👉 Pose Estimation Sample code to estimate pose on an image Now you can use Yolov8 and Yolov7-w6 for pose estimation. The flags are provided in benchmark tables.

常见问题

记录了多少星标和分叉?

augmentedstartups/AS-One 有 607 个星标和 106 个分叉。

仓库排名是多少?

augmentedstartups/AS-One 排名第 19,166。

记录的语言和类别是什么?

augmentedstartups/AS-One 有 607 个星标,语言为 Python,类别为 AI Engineering。

哪个仓库排名最接近?

augmentedstartups/AS-One 与 GMGNAI/gmgn-skills 比较,后者排名第 19,165,有 614 个星标。

README

AS-One v2 : A Modular Library for YOLO Object Detection, Segmentation, Tracking & Pose

![](https://kajabi-storefronts-production.kajabi-cdn.com/kajabi-storefronts-production/file-uploads/themes/2151400015/settings_images/747367e-1d78-eead-2a2-7e5b336a775_Screenshot_2024-05-08_at_13.48.08.jpg) 
  Watch Video

👋 Hello

==UPDATE: ASOne v2 is now out! We've updated with YOLOV9 and SAM==

AS-One is a python wrapper for multiple detection and tracking algorithms all at one place. Different trackers such as ByteTrack, DeepSORT or NorFair can be integrated with different versions of YOLO with minimum lines of code. This python wrapper provides YOLO models in ONNX, PyTorch & CoreML flavors. We plan to offer support for future versions of YOLO when they get released.

This is One Library for most of your computer vision needs.

If you would like to dive deeper into YOLO Object Detection and Tracking, then check out our courses and projects

Watch the step-by-step tutorial 🤝

💻 Install

🔥 Prerequisites

pip install asone

For windows machine, you will need to install from source to run asone library. Check out instructions in 👉 Install from Source section below to install on windows.

👉 Install from Source

💾 Clone the Repository

Navigate to an empty folder of your choice.

git clone https://github.com/augmentedstartups/AS-One.git

Change Directory to AS-One

cd AS-One

👉 For Linux

python3 -m venv .env
source .env/bin/activate

pip install -r requirements.txt

# for CPU
pip install torch torchvision
# for GPU
pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cu113

👉 For Windows 10/11

python -m venv .env
.env\Scripts\activate
pip install numpy Cython
pip install lap
pip install -e git+https://github.com/samson-wang/cython_bbox.git#egg=cython-bbox

pip install asone onnxruntime-gpu==1.12.1
pip install typing_extensions==4.7.1
pip install super-gradients==3.1.3
# for CPU
pip install torch torchvision

# for GPU
pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cu113
or
pip install torch==1.10.1+cu113 torchvision==0.11.2+cu113 torchaudio===0.10.1+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html

👉 For MacOS

python3 -m venv .env
source .env/bin/activate


pip install -r requirements.txt

# for CPU
pip install torch torchvision

Quick Start 🏃‍♂️

Use tracker on sample video.

import asone
from asone import ASOne

model = ASOne(tracker=asone.BYTETRACK, detector=asone.YOLOV9_C, use_cuda=True)
tracks = model.video_tracker('data/sample_videos/test.mp4', filter_classes=['car'])

for model_output in tracks:
    annotations = ASOne.draw(model_output, display=False)

Run in Google Colab 💻

Sample Code Snippets 📃

6.1 👉 Object Detection

import asone
from asone import ASOne

model = ASOne(detector=asone.YOLOV9_C, use_cuda=True) # Set use_cuda to False for cpu
vid = model.read_video('data/sample_videos/test.mp4')

for img in vid:
    detection = model.detecter(img)
    annotations = ASOne.draw(detection, img=img, display=True)

Run the asone/demo_detector.py to test detector.

# run on gpu
python -m asone.demo_detector data/sample_videos/test.mp4

# run on cpu
python -m asone.demo_detector data/sample_videos/test.mp4 --cpu

6.1.1 👉 Use Custom Trained Weights for Detector

Use your custom weights of a detector model trained on custom data by simply providing path of the weights file.

import asone
from asone import ASOne

model = ASOne(detector=asone.YOLOV9_C, weights='data/custom_weights/yolov7_custom.pt', use_cuda=True) # Set use_cuda to False for cpu
vid = model.read_video('data/sample_videos/license_video.mp4')

for img in vid:
    detection = model.detecter(img)
    annotations = ASOne.draw(detection, img=img, display=True, class_names=['license_plate'])

6.1.2 👉 Changing Detector Models

Change detector by simply changing detector flag. The flags are provided in benchmark tables.

  • Our library now supports YOLOv5, YOLOv7, and YOLOv8 on macOS.
# Change detector
model = ASOne(detector=asone.YOLOX_S_PYTORCH, use_cuda=True)

# For macOs
# YOLO5
model = ASOne(detector=asone.YOLOV5X_MLMODEL)
# YOLO7
model = ASOne(detector=asone.YOLOV7_MLMODEL)
# YOLO8
model = ASOne(detector=asone.YOLOV8L_MLMODEL)

6.2 👉 Object Tracking

Use tracker on sample video.

import asone
from asone import ASOne

# Instantiate Asone object
model = ASOne(tracker=asone.BYTETRACK, detector=asone.YOLOV9_C, use_cuda=True) #set use_cuda=False to use cpu
tracks = model.video_tracker('data/sample_videos/test.mp4', filter_classes=['car'])

# Loop over track to retrieve outputs of each frame
for model_output in tracks:
    annotations = ASOne.draw(model_output, display=True)
    # Do anything with bboxes here

[Note] Use can use custom weights for a detector model by simply providing path of the weights file. in ASOne class.

6.2.1 👉 Changing Detector and Tracking Models

Change Tracker by simply changing the tracker flag.

The flags are provided in benchmark tables.

model = ASOne(tracker=asone.BYTETRACK, detector=asone.YOLOV9_C, use_cuda=True)
# Change tracker
model = ASOne(tracker=asone.DEEPSORT, detector=asone.YOLOV9_C, use_cuda=True)
# Change Detector
model = ASOne(tracker=asone.DEEPSORT, detector=asone.YOLOX_S_PYTORCH, use_cuda=True)

Run the asone/demo_tracker.py to test detector.

# run on gpu
python -m asone.demo_tracker data/sample_videos/test.mp4

# run on cpu
python -m asone.demo_tracker data/sample_videos/test.mp4 --cpu

6.3 👉 Segmentation

import asone
from asone import ASOne

model = ASOne(detector=asone.YOLOV9_C, segmentor=asone.SAM, use_cuda=True) #set use_cuda=False to use cpu
tracks = model.video_detecter('data/sample_videos/test.mp4', filter_classes=['car'])

for model_output in tracks:
    annotations = ASOne.draw_masks(model_output, display=True) # Draw masks

6.4 👉 Text Detection

Sample code to detect text on an image

# Detect and recognize text
import asone
from asone import ASOne, utils
import cv2

model = ASOne(detector=asone.CRAFT, recognizer=asone.EASYOCR, use_cuda=True) # Set use_cuda to False for cpu
img = cv2.imread('data/sample_imgs/sample_text.jpeg')
results = model.detect_text(img)
annotations = utils.draw_text(img, results, display=True)

Use Tracker on Text

import asone
from asone import ASOne

# Instantiate Asone object
model = ASOne(tracker=asone.DEEPSORT, detector=asone.CRAFT, recognizer=asone.EASYOCR, use_cuda=True) #set use_cuda=False to use cpu
tracks = model.video_tracker('data/sample_videos/GTA_5-Unique_License_Plate.mp4')

# Loop over track to retrieve outputs of each frame
for model_output in tracks:
    annotations = ASOne.draw(model_output, display=True)

    # Do anything with bboxes here

Run the asone/demo_ocr.py to test ocr.

# run on gpu
 python -m asone.demo_ocr data/sample_videos/GTA_5-Unique_License_Plate.mp4

# run on cpu
 python -m asone.demo_ocr data/sample_videos/GTA_5-Unique_License_Plate.mp4 --cpu

6.5 👉 Pose Estimation

Sample code to estimate pose on an image

# Pose Estimation
import asone
from asone import PoseEstimator, utils
import cv2

model = PoseEstimator(estimator_flag=asone.YOLOV8M_POSE, use_cuda=True) #set use_cuda=False to use cpu
img = cv2.imread('data/sample_imgs/test2.jpg')
kpts = model.estimate_image(img)
annotations = utils.draw_kpts(kpts, image=img, display=True)
  • Now you can use Yolov8 and Yolov7-w6 for pose estimation. The flags are provided in benchmark tables.
# Pose Estimation on video
import asone
from asone import PoseEstimator, utils

model = PoseEstimator(estimator_flag=asone.YOLOV7_W6_POSE, use_cuda=True) #set use_cuda=False to use cpu
estimator = model.video_estimator('data/sample_videos/football1.mp4')
for model_output in estimator:
    annotations = utils.draw_kpts(model_output)
    # Do anything with kpts here

Run the asone/demo_pose_estimator.py to test Pose estimation.

# run on gpu
 python -m asone.demo_pose_estimator data/sample_videos/football1.mp4

# run on cpu
 python -m asone.demo_pose_estimator data/sample_videos/football1.mp4 --cpu

To setup ASOne using Docker follow instructions given in docker setup🐳

ToDo 📝

  • [x] First Release
  • [x] Import trained models
  • [x] Simplify code even further
  • [x] Updated for YOLOv8
  • [x] OCR and Counting
  • [x] OCSORT, StrongSORT, MoTPy
  • [x] M1/2 Apple Silicon Compatibility
  • [x] Pose Estimation YOLOv7/v8
  • [x] YOLO-NAS
  • [x] Updated for YOLOv8.1
  • [x] YOLOV9
  • [x] SAM Integration
Offered By 💼 : Maintained By 👨‍💻 :
排名相邻
同类项目