This is a re-implementation of our KDD 2020 paper "Grammatically Recognizing Images with Tree Convolution" (https://dl.acm.org/doi/abs/10.1145/3394486.3403133).
Guangrun Wang, Guangcong Wang, Keze Wang, Xiaodan Liang, and Liang Lin*
Sun Yat-sen University (SYSU)
This repository contains the training & testing code of "Grammatically Recognizing Images with Tree Convolution" (TreeConv) on ImageNet.
This code was tested on:
- Python 3.6.7
- TensorFlow 1.15.0
- Tensorpack
The code depends on Yuxin Wu's Tensorpack. The code was tested on tensorpack-0.9.8 where "0.9.8" denotes the tensorpack version.
# install tensorpack local: cd tensorpack/tensorpack/ python setup.py install --user
- ImageNet accuracy and pretrained model (baidu pan code: ow9z):
Model | Top 5 Error | Top 1 Error | Download |
---|---|---|---|
ResNet50 | 6.9% | 23.6% | ⬇️ |
ResNet50-TreeConv | 6.16% | 22.08% | Baidu pan: ⬇️ ; passport: ijcb |
- Testing script:
cd TreeConv
python imagenet-resnet.py --gpu 0,1,2,3,4,5,6,7 --data [ROOT-OF-IMAGENET-DATASET] --log_dir [ROOT-OF-TEST-LOG] --load [ROOT-TO-LOAD-MODEL] --eval --data-format NHWC
- Training script:
cd TreeConv
python imagenet-resnet.py --gpu 0,1,2,3,4,5,6,7 --data [ROOT-OF-IMAGENET-DATASET] --log_dir [ROOT-OF-TRAINING-LOG-AND-MODEL] --data-format NHWC
If you use these models in your research, please cite:
@inproceedings{Wang2020Grammatically_KDD,
author = {Guangrun Wang and
Guangcong Wang and
Keze Wang and
Xiaodan Liang and
Liang Lin},
title = {Grammatically Recognizing Images with Tree Convolution},
booktitle = {{KDD} '20: The 26th {ACM} {SIGKDD} Conference on Knowledge Discovery
and Data Mining, Virtual Event, CA, USA, August 23-27, 2020},
pages = {903--912},
year = {2020},
}