Giter VIP home page Giter VIP logo

sin's Introduction

SIN

Structure Inference Net: Object Detection Using Scene-level Context and Instance-level Relationships. In CVPR 2018.(http://vipl.ict.ac.cn/uploadfile/upload/2018041318013480.pdf)

Requirements: software

  1. Requirements for Tensorflow 1.3.0 (see: Tensorflow)

  2. Python packages you might not have: cython, python-opencv, easydict

Installation (sufficient for the demo)

  1. Clone the SIN repository
# Make sure to clone with --recursive
git clone --recursive https://github.com/choasUp/SIN.git
  1. Build the Cython modules
cd $SIN_ROOT/lib
make

Demo

After successfully completing basic installation, you'll be ready to run the demo.

Wait ...

Training Model

  1. Download the training, validation, test data and VOCdevkit

    wget http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtrainval_06-Nov-2007.tar
    wget http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtest_06-Nov-2007.tar
    wget http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCdevkit_08-Jun-2007.tar
  2. Extract all of these tars into one directory named VOCdevkit

    tar xvf VOCtrainval_06-Nov-2007.tar
    tar xvf VOCtest_06-Nov-2007.tar
    tar xvf VOCdevkit_08-Jun-2007.tar
  3. It should have this basic structure

    $VOCdevkit/                           # development kit
    $VOCdevkit/VOCcode/                   # VOC utility code
    $VOCdevkit/VOC2007                    # image sets, annotations, etc.
    # ... and several other directories ...
  4. Create symlinks for the PASCAL VOC dataset

    cd $SIN_ROOT/data
    ln -s $VOCdevkit VOCdevkit
  5. Download the pre-trained ImageNet models [Google Drive] [Dropbox]

     mv VGG_imagenet.npy $SIN_ROOT/data/pretrain_model/VGG_imagenet.npy
  6. [optional] Set learning rate and max iter

    vim experiments/scripts/faster_rcnn_end2end.sh 		# ITERS
    vim lib/fast/config.py 					# LR
    cd lib	 						# if you edit the code, make best
    make
  7. Set your GPU id, then run script to train and test model

    cd $SIN_ROOT
    export CUDA_VISIBLE_DEVICSE=0
    ./train.sh
  8. Test your dataset

    ./test_all.sh

The result of testing on PASCAL VOC 2007 (VGG net)

AP for aeroplane = 0.7853
AP for bicycle = 0.8045
AP for bird = 0.7456
AP for boat = 0.6657
AP for bottle = 0.6144
AP for bus = 0.8424
AP for car = 0.8663
AP for cat = 0.8894
AP for chair = 0.5803
AP for cow = 0.8466
AP for diningtable = 0.7171
AP for dog = 0.8578
AP for horse = 0.8626
AP for motorbike = 0.7802
AP for person = 0.7857
AP for pottedplant = 0.4869
AP for sheep = 0.7599
AP for sofa = 0.7351
AP for train = 0.8199
AP for tvmonitor = 0.7683
Mean AP = 0.7607

References

Faster R-CNN caffe version

Faster R-CNN tf version

Citation

Yong Liu, Ruiping Wang, Shiguang Shan, and Xilin Chen. Structure Inference Net: Object Detection Using Scene-level Context and Instance-level Relationships. In CVPR 2018.

sin's People

Contributors

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

sin's Issues

make: *** No targets specified and no makefile found. Stop.

Hello team,
I am following the readme file and at the step number 2 of installation I am facing this issue.
I will be very grateful if you can help or guide me through.

Thanks in advance.
Edit: I solved this by adding '$' symbol before make

ZeroDivisionError: float division by zero

Hi, thanx for ur excellent work.
I am trying to train a dataset similar to pascal VOC. Unfortunately, i got a problem: ZeroDivisionError: float division by zero .
I tried a couple of times, training progress stop at the same place.
Could u give me some advises? Is that caused by my data ? or the code? @choasup

File "/home/z/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/ops/gen_script_ops.py", line 36, in _py_func
name=name)
File "/home/z/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 767, in apply_op
op_def=op_def)
File "/home/z/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2630, in create_op
original_op=self._default_original_op, op_def=op_def)
File "/home/z/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1204, in init
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access

UnknownError (see above for traceback): exceptions.ZeroDivisionError: float division by zero
[[Node: edges/PyFunc = PyFunc[Tin=[DT_FLOAT, DT_FLOAT], Tout=[DT_FLOAT], token="pyfunc_4", _device="/job:localhost/replica:0/task:0/cpu:0"](roi-data/rois/_141, _arg_Placeholder_1_0_1)]]
[[Node: edges/PyFunc/_143 = _Recvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/gpu:0", send_device="/job:localhost/replica:0/task:0/cpu:0", send_device_incarnation=1, tensor_name="edge_1461_edges/PyFunc", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/gpu:0"]]

Thanx again.

Undefined symbol error while training

Hello there,

I'm trying to train and test SIN against the VOC datasets. I'm using Python3.8.5, Tensorflow 2.31.

To be honest, I struggled to make everything working (The code seems to be written for Python 2 with an older version of Tensorflow). I can now build the cython libs and start launching training. However, an error occured at the end :
tensorflow.python.framework.errors_impl.NotFoundError: /<path-to-sin>/tools/../lib/roi_pooling_layer/roi_pooling.so: undefined symbol: _ZN10tensorflow8OpKernel11TraceStringB5cxx11EPNS_15OpKernelContextEb

It seems that roi_pooling is not compiled properly. I'm not sure which compiler options I should use. Is it a C compilation issue or a Python library versions issue ?

Issue for VGG_imagenet.npy

I cannot accurately load the provided pretrained VGG model. It raise issue like this:
cPickle.UnpicklingError: invalid load key, '§'.

Fine-tuning capability?

Hi,
Can I fine-tune the model for a different number of classes with my own small dataset?

vgg模型

请问有在voc上训练好的模型吗?想要在cpu上跑着试一下

出现undefined symbol:PyFPE_jbuf 问题

当我运行demo.py 和 train.sh时都会出现,请问是什么原因?
Traceback (most recent call last):
File "demo.py", line 3, in
from fast_rcnn.config import cfg
File "/home/home_data/zjw/SIN/SIN/tools/../lib/fast_rcnn/init.py", line 10, in
from . import test
File "/home/home_data/zjw/SIN/SIN/tools/../lib/fast_rcnn/test.py", line 6, in
from utils.cython_nms import nms, nms_new
ImportError: /home/home_data/zjw/SIN/SIN/tools/../lib/utils/cython_nms.so: undefined symbol: PyFPE_jbuf

VGGnet_fast_rcnn_iter_130000.ckpt

While training with pretrained file, I get the following error:

Waiting for ./output/faster_rcnn_end2end/voc_2007_trainval+voc_2012_trainval/VGGnet_fast_rcnn_iter_130000.ckpt to exist..

"OOM when allocating tensor" During Test

there is error when i run 'train.sh' or 'test.sh', as bellow:
ResourceExhaustedError (see above for traceback): OOM when allocating tensor with shape[65536,8192]

During training, i solve this problem by change 'config.gpu_options.per_process_gpu_memory_fraction = 0.7' (0.7 to 0.9)
However, During test, this error appear again, i don't know how to solve this. can you give some suggestion

the configuration of my computer:
ubuntu16.04
tensorflow1.3.0
GPU:gtx 1080 ti (with memory of 11172 MB)

Overview of the code

Hello, I am new to deep learning. I wanted to understand the architecture and replicate it to Pytorch however, I lack knowledge in TensorFlow. Can anyone help me understand the code? What I have so far is up to the ROI proposals.

I would be glad to receive feedbacks from the community.

CPU version

Can this be run in a CPU. What changes are to be made..

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.