Coder Social home page Coder Social logo

fpn_tensorflow's Introduction

Feature Pyramid Networks for Object Detection

A Tensorflow implementation of FPN detection framework.
You can refer to the paper Feature Pyramid Networks for Object Detection
Rotation detection method baesd on FPN reference R2CNN, RRPN and R2CNN_HEAD and R-DFPN
If useful to you, please star to support my work. Thanks.

Configuration Environment

ubuntu(Encoding problems may occur on windows) + python2 + tensorflow1.2 + cv2 + cuda8.0 + GeForce GTX 1080
You can also use docker environment, command: docker pull yangxue2docker/tensorflow3_gpu_cv2_sshd:v1.0

Installation

Clone the repository

git clone https://github.com/yangxue0827/FPN_Tensorflow.git    

Make tfrecord

The image name is best in English.
The data is VOC format, reference here
data path format ($FPN_ROOT/data/io/divide_data.py)
VOCdevkit

VOCdevkit_train

Annotation
JPEGImages

VOCdevkit_test

Annotation
JPEGImages

cd $FPN_ROOT/data/io/  
python convert_data_to_tfrecord.py --VOC_dir='***/VOCdevkit/VOCdevkit_train/' --save_name='train' --img_format='.jpg' --dataset='ship'

Demo

1、Unzip the weight $FPN_ROOT/output/res101_trained_weights/*.rar
2、put images in $FPN_ROOT/tools/inference_image
3、Configure parameters in $FPN_ROOT/libs/configs/cfgs.py and modify the project's root directory 4、image slice

cd $FPN_ROOT/tools
python inference.py   

5、big image

cd $FPN_ROOT/tools
python demo.py --src_folder=.\demo_src --des_folder=.\demo_des      

Train

1、Modify $FPN_ROOT/libs/lable_name_dict/***_dict.py, corresponding to the number of categories in the configuration file
2、download pretrain weight(resnet_v1_101_2016_08_28.tar.gz or resnet_v1_50_2016_08_28.tar.gz) from here, then extract to folder $FPN_ROOT/data/pretrained_weights
3、

cd $FPN_ROOT/tools
python train.py 

Test tfrecord

cd $FPN_ROOT/tools    
python $FPN_ROOT/tools/test.py  

eval

cd $FPN_ROOT/tools   
python ship_eval.py

Summary

tensorboard --logdir=$FPN_ROOT/output/res101_summary/

01 02 03

Graph

04

Test results

airplane

11
12

sar_ship

13
14

ship

15
16

Note

This code works better when detecting single targets, but not suitable for multi-target detection tasks. Hope you can help find bugs, thank you very much.

fpn_tensorflow's People

Contributors

yangxue0827 avatar

Watchers

James Cloos 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.