gossipnet
gossipnet copied to clipboard
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)