Giter VIP home page Giter VIP logo

faster-r-cnn's Introduction

Faster R-CNN Pytorch

bubbliiing大佬代码的基础上进行了修改,添加了部分注释。

图片检测demo


预训练模型

  • .pth格式的预训练模型如下。

训练自己的数据集

1. 按照VOC格式准备数据集

标签文件放在VOCdevkit文件夹下的VOC2007文件夹下的Annotations中。 图片文件放在VOCdevkit文件夹下的VOC2007文件夹下的JPEGImages中。

2. 写入数据集类别信息

在model_data文件夹下新建name_classes.txt文件,写入自己数据集的类别信息。

3. 划分数据集并生成标签

修改voc_annotation.py文件下classes_path的指向,运行:

python voc_annotation.py

生成的数据集划分及标签文件均存放在VOCdevkit\VOC2007\ImageSets\Main文件夹下。

4. 开始训练

将下载好的.pth格式预训练模型frcnn_weights.pth文件放在model_data文件夹下。修改train.py下的classes_path及model_path指向,运行:

python train.py

测试图片

修改utils/utils_frcnn.py文件中的model_path及classes_path,指向训练好的模型及类别信息。 在predict_images.py文件下输入图片路径,运行:

python predict_images.py

Reference

https://github.com/bubbliiiing/faster-rcnn-pytorch

faster-r-cnn's People

Contributors

zdfb 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.