• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

yassersouri/fast-bird-part-localization: Code for Fast Bird Part Localization (F ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

yassersouri/fast-bird-part-localization

开源软件地址(OpenSource Url):

https://github.com/yassersouri/fast-bird-part-localization

开源编程语言(OpenSource Language):

Jupyter Notebook 92.0%

开源软件介绍(OpenSource Introduction):

fast-bird-part-localization

Code for Fast Bird Part Localization part of the following paper:

Fast Bird Part Localization for Fine-Grained Categorization
Yaser Souri, Shohreh Kasaei
The Third Workshop on Fine-Grained Visual Categorization (FGVC3) in conjunction with CVPR 2015

The code for classification part is very simple and not included in this repository.

Requirements

  1. Python 2.7. This might not work with Python 3.
  2. A recent installation of caffe with its python wrapper. (I have installed this version of caffe.)
  3. OpenCV 2.4 with its Python wrapper.
  4. All other python requirements are mentioned in requirements.txt

Getting Started

For testing or training you need the pretrained CaffeNet network. You can download it from this url. After downloading it, make sure you change the src/settings.py file and change the CAFFE_NET_PRETRAINED variable accordingly.

Training a new head detector

This can be done using the CUB dataset. First download the CUB-200-2011 dataset from here and extract it. Then change src/settings.py file and set the CUB_FOLDER_PATH varialble accordingly.

Then run the following command:

python create_rf_model.py

This will create a head detector for you in the models directory. To run this script you will night large amount of RAM (~30GB).

Changing part_name variable in create_rf_model.py file to body instead of head will create a detector for body.

Testing

For localization you can run something like this.

import sys
sys.path.append('/path/to/projectroot/')
from fast_bird_part_localization import settings
sys.path.append(settings.CAFFE_PYTHON_PATH)
import caffe
from fast_bird_part_localization import detector

fbp = detector('/path/to/project/models/head_model.mdl')

img = caffe.io.load_image('/path/to/bird.jpg')
head, head_prob = fbp.detect(img)
fbp.draw(img, head, head_prob)

This is the result you get:

Result

You can also take a look at the notebook example

Work in Progress

I'm in progress of cleaning up my original code and putting it here. So please wait a little while.

TODO:

  • Extracting code from notebook about postprocessing.
  • Extracting code from notebook about visualization.
  • Adding description on how to use the pretrined model.
  • Adding description on how to train a new model from CUB.
  • Adding description on how to train a new model from own data.
  • Adding code for PCP evaluation.
  • Adding bounding box regression for better PCP.



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap