Giter Site home page Giter Site logo

faster-r-cnn's Introduction

Faster-RCNN-Pytorch

环境配置

  • Python 3.8
  • Pytorch 1.11.0
  • Windows

文件结构

├── models: 网络结构定义,包括主干网络、RPN和检测头
├── utils: 训练验证模块以及预处理模块
├── dataset.py: 数据加载器模块
├── trainer.py: 模型训练器
├── train.py: 训练入口

数据集

  • 数据集分为训练集和测试集,数据信息保存在txt中
  • txt中每一行代表一张图片的信息,包括路径、坐标和类别信息
  • 每一行的具体信息包括:图片路径 xmin,ymin,xmax,ymax,class,如果有多个目标框以空格分隔

训练方法

  • 参数配置

    • 必改参数:

      • classes_dir: 设置成自己的种类文件路径
      • test_gap: 计算mAP的周期,如果数据集比较大,设置的可以大一些,默认是10个epoch
      • save_dir: 模型的保存路径
    • 非必改参数

      • input_shape: 模型训练输入尺寸,电脑性能好的话,可以设置的大一些
      • bs:训练批次,同上,根据电脑性能设置
      • id: 训练使用的GPU设备,目前只支持单GPU训练
      • pretrain_backbone: 是否使用冻结策略,即先冻结主干网络,只训练RPN和Head,默认使用
      • freeze_epoch: 冻结的轮次,pretrain_backbone为True时,此参数才有效
  • Anchor尺寸

    先验Anchor的尺寸可以通过KMeans确定,也可以手工设定,本项目直接手工对Anchor硬编码,如果使用的数据集对象尺寸和VOC数据集相差比较大的话,建议使用KMeans聚类

faster-r-cnn's People

Contributors

xuxiusheng avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.