Code Monkey home page Code Monkey logo

faster-rcnn-pytorch-simple's Introduction

Faster RCNN-Pytorch

license arXiv Tag

Pytorch implementation of Faster RCNN.

This is a Pytorch implementation of the paper "Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks". I reference faster_rcnn_pytorch and faster rcnn pytorch tuturial pytorch pull request but this request is not completed and closed.

I was about to study faster rcnn code but codes are too difficult to me. I need some simple tutorial but there is no simple code. so I tried to write simple code than other repo.

this repo's code are

Requirements

  • pytoch
  • tensorflow (Using tensorboad)
  • matplotlib

Usage

I use floydhub to train model
Floydhub is simple deeplearining training tool

pip install -U floyd-cli
#./input
floyd data init voc
floyd data upload
#./FRCNN
floyd init frcnn
floyd data status
floyd run --env pytorch --gpu --data [your data id] "python3 main.py"

This porject structure is fitted with floydhub structure, so parent directory contain input, output, FRCNN directory

but you can traning any environment without floydhub

Training on Pascal VOC 2007

Follow this project (TFFRCNN) to download and prepare the training, validation, test data and the VGG16 model pre-trained on ImageNet.

Since the program loading the data in FRCNN/input by default, you can set the data path as following.

this repo is not completed. it's performance is low than other repo

Result

1000 epochs

Reference

faster_rcnn_pytorch
pytorch pull request.

faster-rcnn-pytorch-simple's People

Contributors

rimchang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

faster-rcnn-pytorch-simple's Issues

Loss function - unpacked variables

Hey,
this project was really helpful to understand Faster R-CNN. So thanks :). But I think I found a small error that could contribute to lower performance.
In the loss calculation the pytorch-Variablefrcnn_bbox_pred is unpacked and multiplied and after that casted to a Variable again:
frcnn_bbox_pred = to_var(torch.mul(frcnn_bbox_pred.data, frcnn_bbox_inside_weights))
To due this step .backward() can not go further than this point. If you visualize the graph you will see it.
The following should work:

rcnn_bbox_inside_weights = torch.autograd.Variable(rcnn_bbox_inside_weights, requires_grad=False)
frcnn_bbox_pred = torch.mul(frcnn_bbox_pred, frcnn_bbox_inside_weights)

The same step is in the rpn_loss calculation.

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.