Skip to content

colinwps/DeepVisionary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DeepVisionary

English | 中文

English

Overview

DeepVisionary is a modular, PyTorch-based object detection framework inspired by YOLO, designed for developers and researchers to build, train, and evaluate object detection models. It is ideal for learning, experimentation, and small-scale projects, with support for COCO-format datasets and extensible components.

Features

  • Modular Architecture: Separates data loading, model components (Backbone, Neck, Head), and training logic for easy customization.
  • Configurable: Hyperparameters and dataset paths defined in config.yaml.
  • Evaluation & Visualization: Includes mAP computation and visualization tools for detection results.
  • Extensible: Supports custom data augmentation, loss functions, and inference pipelines.

Installation

  1. Clone the repository:
    git clone https://github.com/colinwps/DeepVisionary.git
    cd DeepVisionary
  2. Install dependencies:
    pip install -r requirements.txt
  3. Prepare a COCO-format dataset in data/annotations/ and data/images/.

Project Structure

DeepVisionary/
├── configs/               # Configuration files (e.g., config.yaml)
├── data/                  # Data loading and preprocessing
│   ├── dataset.py
│   ├── transforms.py
│   └── annotations/
├── models/                # Model components
│   ├── yolo.py
│   ├── backbone.py
│   ├── neck.py
│   └── head.py
├── scripts/               # Training and inference scripts
│   ├── train.py
│   └── inference.py
├── utils/                 # Utilities
│   ├── loss.py
│   ├── metrics.py
│   ├── logger.py
│   └── visualization.py
├── requirements.txt       # Project dependencies
└── README.md             # Documentation

Usage

  1. Configure: Edit configs/config.yaml to set dataset paths and hyperparameters.
  2. Train: Run the training script:
    python scripts/train.py
  3. Inference: Run inference on a single image:
    python scripts/inference.py --image path/to/image.jpg --checkpoint path/to/model.pth --output output.jpg
    Update class_names in inference.py to match your dataset.
  4. Evaluate: Use utils/metrics.py to compute mAP on validation data.
  5. Visualize: Use utils/visualization.py to draw bounding boxes on images.

Requirements

  • Python >= 3.8
  • PyTorch >= 1.9.0
  • Torchvision >= 0.10.0
  • NumPy >= 1.19.0
  • OpenCV-Python >= 4.5.0
  • PyYAML >= 5.4.0

Contributing

We welcome contributions! To contribute:

  1. Fork the repository.
  2. Create a feature branch (git checkout -b feature/your-feature).
  3. Commit changes (git commit -m 'Add your feature').
  4. Push to the branch (git push origin feature/your-feature).
  5. Open a Pull Request.

License

This project is licensed under the MIT License.


中文

项目概述

DeepVisionary 是一个基于 PyTorch 的目标检测框架,灵感来源于 YOLO,专为开发者和研究人员设计,适合构建、训练和评估目标检测模型。该项目适用于学习、实验和小规模项目,支持 COCO 格式数据集,并提供可扩展的组件。

功能

  • 模块化架构:数据加载、模型组件(主干网络、Neck、Head)和训练逻辑分离,便于定制。
  • 可配置:通过 config.yaml 定义超参数和数据集路径。
  • 评估与可视化:支持 mAP 计算和检测结果可视化。
  • 可扩展:支持自定义数据增强、损失函数和推理流程。

安装

  1. 克隆仓库:
    git clone https://github.com/colinwps/DeepVisionary.git
    cd DeepVisionary
  2. 安装依赖:
    pip install -r requirements.txt
  3. 准备 COCO 格式数据集,放置于 data/annotations/data/images/

项目结构

DeepVisionary/
├── configs/               # 配置文件(如 config.yaml)
├── data/                  # 数据加载与预处理
│   ├── dataset.py
│   ├── transforms.py
│   └── annotations/
├── models/                # 模型组件
│   ├── yolo.py
│   ├── backbone.py
│   ├── neck.py
│   └── head.py
├── scripts/               # 训练与推理脚本
│   ├── train.py
│   └── inference.py
├── utils/                 # 工具
│   ├── loss.py
│   ├── metrics.py
│   ├── logger.py
│   └── visualization.py
├── requirements.txt       # 项目依赖
└── README.md             # 项目文档

使用方法

  1. 配置:编辑 configs/config.yaml,设置数据集路径和超参数。
  2. 训练:运行训练脚本:
    python scripts/train.py
  3. 推理:对单张图片进行推理:
    python scripts/inference.py --image path/to/image.jpg --checkpoint path/to/model.pth --output output.jpg
    inference.py 中更新 class_names 以匹配你的数据集。
  4. 评估:使用 utils/metrics.py 计算验证集的 mAP。
  5. 可视化:使用 utils/visualization.py 在图片上绘制边界框。

依赖

  • Python >= 3.8
  • PyTorch >= 1.9.0
  • Torchvision >= 0.10.0
  • NumPy >= 1.19.0
  • OpenCV-Python >= 4.5.0
  • PyYAML >= 5.4.0

贡献

欢迎贡献代码!请按以下步骤操作:

  1. Fork 本仓库。
  2. 创建特性分支(git checkout -b feature/your-feature)。
  3. 提交更改(git commit -m 'Add your feature')。
  4. 推送分支(git push origin feature/your-feature)。
  5. 提交 Pull Request。

许可证

本项目采用 MIT 许可证。

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages