Giter VIP home page Giter VIP logo

gossipnet's People

Contributors

hosang 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

Watchers

 avatar  avatar  avatar  avatar

gossipnet's Issues

pretrained model

Hi @hosang,

Where is the pretrained model define in .yaml pretrained_model: /BS/bbox_nms_net2/work/tf-models/resnet_v1_101.ckpt

Thanks

Trained Model for COCO multiclass setting

Hi @hosang,

Thanks for providing the code! Will it be possible for you to provide the trained model for COCO multiclass setting, I am trying to incorporate image features also in the network and having the trained model will help me compare the results.

Thanks!

Run with TF 1.12.0

I successfully run the code with TF 1.12.0
You need run two sh instead of the make file.
In roi_pooling_layer, please run the sh file

TF_INC=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_include())')

TF_LIB=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_lib())')

echo $TF_INC

echo $TF_LIB

CUDA_PATH=/usr/local/cuda/

g++ -std=c++11 -c roi_pooling_op.cc -o roi_pooling_op.o -fPIC -I "/root/anaconda2/envs/ld_tf_base/lib/python3.6/site-packages/tensorflow/include" -O2

nvcc -std=c++11 -c -o roi_pooling_op.cu.o roi_pooling_op_gpu.cu -I $TF_INC -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -arch=sm_52

## if you install tf using already-built binary, or gcc version 4.x, uncomment the two lines below

#g++ -std=c++11 -shared -D_GLIBCXX_USE_CXX11_ABI=0 -o roi_pooling.so roi_pooling_op.cc \

# roi_pooling_op.cu.o -I $TF_INC -fPIC -lcudart -L $CUDA_PATH/lib64

# for gcc5-built tf

g++ -std=c++11 -shared -D_GLIBCXX_USE_CXX11_ABI=0 -o roi_pooling.so roi_pooling_op.cc roi_pooling_op.cu.o -I $TF_INC -I $TF_INC"/external/nsync/public" -L $TF_LIB -ltensorflow_framework -O2 -fPIC -lcudart -L $CUDA_PATH/lib64

cd ..

in matching_module run the sh file

TF_INC=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_include())')

TF_LIB=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_lib())')

echo $TF_INC

echo $TF_LIB

CUDA_PATH=/usr/local/cuda/

g++ -std=c++11 -c det_matching.cc -o det_matching.o -fPIC -I "/root/anaconda2/envs/ld_tf_base/lib/python3.6/site-packages/tensorflow/include" -O2

# nvcc -std=c++11 -c -o det_matching.o det_matching.cc -I $TF_INC -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -arch=sm_52

## if you install tf using already-built binary, or gcc version 4.x, uncomment the two lines below

#g++ -std=c++11 -shared -D_GLIBCXX_USE_CXX11_ABI=0 -o roi_pooling.so roi_pooling_op.cc \

# roi_pooling_op.cu.o -I $TF_INC -fPIC -lcudart -L $CUDA_PATH/lib64

# for gcc5-built tf

g++ -std=c++11 -shared -D_GLIBCXX_USE_CXX11_ABI=0 -o det_matching.so det_matching.cc -I $TF_INC -I $TF_INC"/external/nsync/public" -L $TF_LIB -ltensorflow_framework -O2 -fPIC -lcudart -L $CUDA_PATH/lib64

cd ..

download the coco json annotation in the direction ProjectDir/data/coco/annotations

  • instances_minival2014.json
  • instances_train2014.json
  • instances_val2014.json
  • instances_valminusminival2014.json

Please train

python train.py --config=experiments/coco_person/conf.yaml

the result like this:

2020-08-17 03:18:11.800835  iter  59940   lr   0.0001   opt loss  1.90954     data loss normalized 0.0163604   unnormalized  1.76164
2020-08-17 03:18:11.940283  iter  59960   lr   0.0001   opt loss  6.11693     data loss normalized 0.032737   unnormalized  5.96905
2020-08-17 03:18:12.069166  iter  59980   lr   0.0001   opt loss 0.713293     data loss normalized 0.00841691   unnormalized 0.565408
2020-08-17 03:18:12.189150  iter  60000   lr   0.0001   opt loss  3.09831     data loss normalized 0.0365992   unnormalized  2.95046
2020-08-17 03:18:12.189251  starting validation
[1]
2020-08-17 03:18:27.687428  iter  60000   validation pass:   mAP  66.7   multiclass AP  66.7
/root/ld/PycharmProjects/gossipnet/outputs/gnet
wrote model to /root/ld/PycharmProjects/gossipnet/outputs/gnet-60000
Iteration   mAP   
     20000    64.0
     40000    65.9
     60000    66.7  (best)

roi_pooling.so: undefined symbol

Hi @hosang,

I got the following error:

tensorflow.python.framework.errors_impl.NotFoundError: /work/DL/code/gossipnet/nms_net/roi_pooling_layer/roi_pooling.so: undefined symbol: _ZN10tensorflow7strings6StrCatB5cxx11ERKNS0_8AlphaNumE

roi_pooling.so Makefile

Hello, i get the following error: tensorflow.python.framework.errors_impl.NotFoundError: ~/nms_net/roi_pooling_layer/roi_pooling.so: undefined symbol: _ZN10tensorflow7strings6StrCatB5cxx11ERKNS0_8AlphaNumE Is there any advice solving it?

Problem with Makefile

Hello!
I did make and in terminal I just saw the warnings, no errors. But when I tried to debug train.py I get such error:
tensorflow.python.framework.errors_impl.NotFoundError: ~/nms_net/roi_pooling_layer/roi_pooling.so: undefined symbol: _ZN10tensorflow7strings6StrCatB5cxx11ERKNS0_8AlphaNumE

Thanks!

AttributeError: 'EasyDict' object has no attribute 'test_model'

Python 2.7.6
tf.version '1.2.1'
make passed.
After changed some code has been renamed in tensorflow, such as tf.pack to tf.stack, tf.select to tf.where and so on.
I got this error:
restorer.restore(sess, cfg.test_model)
AttributeError: 'EasyDict' object has no attribute 'test_model'
run log as:

python test.py -c ./experiments/coco_person/conf.yaml OUTPUT
reading /mnt/geekvc/gossipnet/data/cache/coco_2014_minival_FRCN_train_imdb_cache.pkl
preparing test imdb
5000 images: 1821412 detections, 446 crowd annotations, 35821 non-crowd annotations
dropping all classes but person
5000 images: 337940 detections, 227 crowd annotations, 10633 non-crowd annotations
dropping images without detections
4429 images: 337940 detections, 227 crowd annotations, 10628 non-crowd annotations
done
doing single class NMS
WARNING:tensorflow:From /mnt/geekvc/gossipnet/nms_net/network.py:314: add_loss (from tensorflow.contrib.framework.python.ops.arg_scope) is deprecated and will be removed after 2016-12-30.
Instructions for updating:
Use tf.losses.add_loss instead.
2017-10-31 11:12:05.534766: I tensorflow/core/common_runtime/gpu/gpu_device.cc:955] Found device 0 with properties:
name: Tesla K40c
major: 3 minor: 5 memoryClockRate (GHz) 0.8755
pciBusID 0000:02:00.0
Total memory: 12.00GiB
Free memory: 7.67GiB
2017-10-31 11:12:05.696399: W tensorflow/stream_executor/cuda/cuda_driver.cc:523] A non-primary context 0x74929e0 exists before initializing the StreamExecutor. We haven't verified StreamExecutor works with that.
2017-10-31 11:12:05.697048: I tensorflow/core/common_runtime/gpu/gpu_device.cc:955] Found device 1 with properties:
name: Tesla K40c
major: 3 minor: 5 memoryClockRate (GHz) 0.8755
pciBusID 0000:03:00.0
Total memory: 12.00GiB
Free memory: 11.72GiB
2017-10-31 11:12:05.880469: W tensorflow/stream_executor/cuda/cuda_driver.cc:523] A non-primary context 0x6ef5220 exists before initializing the StreamExecutor. We haven't verified StreamExecutor works with that.
2017-10-31 11:12:05.881353: I tensorflow/core/common_runtime/gpu/gpu_device.cc:955] Found device 2 with properties:
name: Tesla K40c
major: 3 minor: 5 memoryClockRate (GHz) 0.8755
pciBusID 0000:83:00.0
Total memory: 12.00GiB
Free memory: 11.72GiB
2017-10-31 11:12:06.069418: W tensorflow/stream_executor/cuda/cuda_driver.cc:523] A non-primary context 0x6189f80 exists before initializing the StreamExecutor. We haven't verified StreamExecutor works with that.
2017-10-31 11:12:06.070325: I tensorflow/core/common_runtime/gpu/gpu_device.cc:955] Found device 3 with properties:
name: Tesla K40c
major: 3 minor: 5 memoryClockRate (GHz) 0.8755
pciBusID 0000:84:00.0
Total memory: 12.00GiB
Free memory: 11.72GiB
2017-10-31 11:12:06.070608: I tensorflow/core/common_runtime/gpu/gpu_device.cc:847] Peer access not supported between device ordinals 0 and 2
2017-10-31 11:12:06.070671: I tensorflow/core/common_runtime/gpu/gpu_device.cc:847] Peer access not supported between device ordinals 0 and 3
2017-10-31 11:12:06.070776: I tensorflow/core/common_runtime/gpu/gpu_device.cc:847] Peer access not supported between device ordinals 1 and 2
2017-10-31 11:12:06.070835: I tensorflow/core/common_runtime/gpu/gpu_device.cc:847] Peer access not supported between device ordinals 1 and 3
2017-10-31 11:12:06.070892: I tensorflow/core/common_runtime/gpu/gpu_device.cc:847] Peer access not supported between device ordinals 2 and 0
2017-10-31 11:12:06.070948: I tensorflow/core/common_runtime/gpu/gpu_device.cc:847] Peer access not supported between device ordinals 2 and 1
2017-10-31 11:12:06.071131: I tensorflow/core/common_runtime/gpu/gpu_device.cc:847] Peer access not supported between device ordinals 3 and 0
2017-10-31 11:12:06.071190: I tensorflow/core/common_runtime/gpu/gpu_device.cc:847] Peer access not supported between device ordinals 3 and 1
2017-10-31 11:12:06.071425: I tensorflow/core/common_runtime/gpu/gpu_device.cc:976] DMA: 0 1 2 3
2017-10-31 11:12:06.071465: I tensorflow/core/common_runtime/gpu/gpu_device.cc:986] 0:   Y Y N N
2017-10-31 11:12:06.071498: I tensorflow/core/common_runtime/gpu/gpu_device.cc:986] 1:   Y Y N N
2017-10-31 11:12:06.071534: I tensorflow/core/common_runtime/gpu/gpu_device.cc:986] 2:   N N Y Y
2017-10-31 11:12:06.071568: I tensorflow/core/common_runtime/gpu/gpu_device.cc:986] 3:   N N Y Y
2017-10-31 11:12:06.071615: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1045] Creating TensorFlow device (/gpu:0) -> (device: 0, name: Tesla K40c, pci bus id: 0000:02:00.0)
2017-10-31 11:12:06.071656: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1045] Creating TensorFlow device (/gpu:1) -> (device: 1, name: Tesla K40c, pci bus id: 0000:03:00.0)
2017-10-31 11:12:06.071691: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1045] Creating TensorFlow device (/gpu:2) -> (device: 2, name: Tesla K40c, pci bus id: 0000:83:00.0)
2017-10-31 11:12:06.071729: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1045] Creating TensorFlow device (/gpu:3) -> (device: 3, name: Tesla K40c, pci bus id: 0000:84:00.0)
Traceback (most recent call last):
  File "test.py", line 135, in <module>
    main()
  File "test.py", line 131, in main
    dets = test_run(test_imdb)
  File "test.py", line 61, in test_run
    restorer.restore(sess, cfg.test_model)
AttributeError: 'EasyDict' object has no attribute 'test_model'

Thank you very in advance!

KeyError: 'gt_classes'

Hi @hosang,

I got following error:
File "train.py", line 87, in load_and_enqueue
food = {ph: batch[name] for (name, ph) in placeholders}
File "train.py", line 87, in
food = {ph: batch[name] for (name, ph) in placeholders}
KeyError: 'gt_classes'

look like batch has key name gt_classes

Strong Tnet

I'm interested in your article,At the same time, I am very interested in the "A CONVNET FOR NON-MAXIMUM SUPPRESSION ", Can you share “Strong Tnet“” code for me?
@hosang

there is an error running train.py

Traceback (most recent call last):
File "train.py", line 17, in
import imdb
File "/home/zhangyb/DL/Detection/gossipnet/imdb/init.py", line 13, in
from imdb.pal import load_pal
File "/home/zhangyb/DL/Detection/gossipnet/imdb/pal.py", line 11, in
from imdb.file_formats import pal
File "/home/zhangyb/DL/Detection/gossipnet/imdb/file_formats/pal.py", line 5, in
from . import AnnoList_pb2
ImportError: cannot import name AnnoList_pb2

do you have any suggestions? thanks in advance....

Error in compiling: make: *** [nms_net/matching_module/det_matching.so] Fehler 1

Hi @hosang,

I tried to compile the repo, but I am getting the following error.
(objdetTF3) azim_se@othrys2:~/azim_se/projects/detection/gossipnet$ make
g++ -std=c++11 -shared nms_net/matching_module/det_matching.cc -o nms_net/matching_module/det_matching.so -fPIC -I "/home/azim_se/.virtualenvs/objdetTF3/lib/python3.5/site-packages/tensorflow/include" -O2
In file included from nms_net/matching_module/det_matching.cc:5:0:
nms_net/matching_module/det_matching.cc: In member function ‘void DetectionMatchingOp::Compute(tensorflow::OpKernelContext*)’:
/home/azim_se/.virtualenvs/objdetTF3/lib/python3.5/site-packages/tensorflow/include/tensorflow/core/framework/op_kernel.h:1538:3: error: expected ‘;’ before ‘do’
do {
^
nms_net/matching_module/det_matching.cc:91:5: note: in expansion of macro ‘OP_REQUIRES’
OP_REQUIRES(context, ious.dimension(1) == ignore.dimension(0),
^
nms_net/matching_module/det_matching.cc:95:5: error: expected ‘;’ before ‘argsort’
argsort(score, &det_order);
^
Makefile:19: die Regel für Ziel „nms_net/matching_module/det_matching.so“ scheiterte
make: *** [nms_net/matching_module/det_matching.so] Fehler 1

Here is my system configuration:
Ubuntu 16.04
Tensorflow 1.8
Cuda 9.0
Cudnn 7.0
GPU: Titan X Pascal
Python 3.5.2

Here is the system path configuration:
echo $PATH
/home/azim_se/.virtualenvs/objdetTF3/bin:/usr/local/cuda-9.0/bin:/home/azim_se/MyProjects/pytorch/eigen3/compiled:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/home/azim_se/softwares/pycharm/bin:/home/azim_se/softwares/eclipse:/home/azim_se/MyProjects/bin:/home/azim_se/MATLAB/R2016b/bin:/home/azim_se/.local/bin:/home/azim_se/softwares/tensorRT/4.0.0.3-ubuntu16.04-cuda9.0-cudnn7.0.5/bin
echo $LD_LIBRARY_PATH
/home/azim_se/softwares/cuDNN/9.0-v7.0.5-ubuntu16.04/lib64:/home/azim_se/MyProjects/pytorch/eigen3:/home/azim_se/MyProjects/pytorch/eigen3/build:/usr/local/cuda-9.0/lib64:/usr/local/opencv-3.4.1/lib/x86_64-linux-gnu:/home/azim_se/softwares/tensorRT/4.0.0.3-ubuntu16.04-cuda9.0-cudnn7.0.5/lib:/home/azim_se/.local/lib:/home/azim_se/MyProjects/pytorch/nccl/compiled/lib
echo $PYTHONPATH
/home/azim_se/projects/detection/ModelsTF/research:/home/azim_se/projects/detection//ModelsTF/research/slim

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.