GithubHelp home page GithubHelp logo

rainofmine / bi-box_regression Goto Github PK

View Code? Open in Web Editor NEW
85.0 5.0 26.0 577 KB

Pytorch implementation of Bi-box Regression for Pedestrian Detection and Occlusion Estimation (ECCV2018)

Python 88.30% Shell 0.64% Cuda 3.95% C 6.90% C++ 0.20%

bi-box_regression's Introduction

Bi-box_Regression

Pytorch implementation of Bi-box Regression as described in Bi-box Regression for Pedestrian Detection and Occlusion Estimation (ECCV2018).

img1

The implementation is not just the same as the paper. We use one-stage detector RetinaNet followed by this repo. And some details may be different.

Requirements

  • Python3
  • Pytorch0.4
  • torchvision
  • tensorboardX

Installation

Install packages.

sudo apt-get install tk-dev python-tk
pip install cffi
pip install cython
pip install pandas
pip install tensorboardX

Build NMS.

cd Bi-box_Regression/lib
sh build.sh

Create folders.

cd Bi-box_Regression
mkdir ckpt mAP_txt summary weight

Datasets

This repo is built for human detection. The popular annotation format for human detection(or pedestrian detection) contains three parts: full bbox, visible bbox and ignore regions such as Citypersons and Crowdhuman. You should write them in CSV or TXT files.

Annotations format

Three examples are as follows:

$image_path/img_1.jpg x1 y1 x2 y2 x1v y1v x2v y2v person
$image_path/img_1.jpg x1 y1 x2 y2 ignore
$image_path/img_2.jpg . . . . .

x1 y1 x2 y2 mean full bbox and x1v y1v x2v y2v mean visible bbox. Images with more than one bounding box should use one row per box. Labels that we often use are 'person' or 'ignore'. When an image does not contain any bounding box, set them '.'.

Label encoding file

A TXT file (classes.txt) is needed to map label to ID. Each line means one label name and its ID. One example is as follows:

person 0

Pretrained Model

We use resnet18, 34, 50, 101, 152 as the backbone. You should download them and put them to /weight.

Training

python train.py --csv_train <$path/train.txt> --csv_val <$path/val.txt> --csv_classes <$path/classes.txt> --depth <50> --pretrained resnet50-19c8e357.pth --model_name <model name to save>

Reference

bi-box_regression's People

Contributors

rainofmine 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  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  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  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

bi-box_regression's Issues

This is my result!

image
这个结果和Repulsion loss一样都变差了,也是奇怪的很!希望作者贴出他的实验结果!

mAP extremely low when testing on Caltech

Hi,

I just found the mAP is very low when testing on Caltech Dataset, it is around 0.03
The code is

optimizer = optim.Adam(retinanet.parameters(), lr=1e-5)
scheduler = optim.lr_scheduler.ReduceLROnPlateau(optimizer, patience=3, verbose=True)

If I change to SGD or I change lr=1e-4, mAP will always be 0.0
If there anyone has similar problem as mine? What is wrong with my expirement?

BTW, I downsize the caltech to 1/10 of the original size, it takes 35 minutes to run one epoch and I ran 50 epochs. The val data set was chosen from another 1/10 of the original Caltech Dataset. Basiclly the val and test should be very similar, but the mAP on Val is only around 0.3 at 24th epoch.

I have no idea what went wrong.
Thanks!!!

Testing script

I would like to point out that the testing script is some how missing, could you please provide it ?

The use of dataset

I want to use a Caltech Pedestrian dataset for training, but for the transformation of the data set don't correspond with code format and don't know you is how to convert the data set.How to write in CSV, has met the needs of the code format?

pytorch version

Hey, sorry to interrupt, I got a problem with pytorch version and hope you can help me. I am using pytorch 1.0 and for some reason, I can not use pytorch 0.4, so is there any way I can use your code with pytroch 1.0 by changing some parts of your code?

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.