Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
SRCHIANG b16e351907 | 2 years ago | |
---|---|---|
backbones | 2 years ago | |
data/coco | 2 years ago | |
datasets | 2 years ago | |
sampledata/MS-COCO-2014 | 2 years ago | |
utils | 2 years ago | |
classifier_layer.py | 2 years ago | |
hgnn.py | 2 years ago | |
main.py | 2 years ago | |
models.py | 2 years ago | |
readme.md | 2 years ago | |
run_coco.sh | 2 years ago | |
semantic.py | 2 years ago |
AdaHGNN: Adaptive Hypergraph Neural Networks for Multi-Label Image Classification
Description
This repository includes the source code for the paper "AdaHGNN: Adaptive Hypergraph Neural Networks for Multi-Label Image Classification". Basically, the program takes the image as the input to predict multiple labels contained in the image. More details about the underneath model can be found in the submitted paper.
Requirements
Ubuntu: 16.04 +
pytorch: 0.4.1
python: 2.7
GPU: V100
Code Structure
AdaHGNN
|——backbones
|——resnet.py
|——init.py
|——utils
|——transforms.py
|——metrics.py
|——load_pretrain_model.py
|——init.py
|——datasets
|——cocodataset.py
|——init.py
|——data
|——coco
|——coco_glove_word2vec.npy
|——sampledata
|——MS-COCO-2014
|——train
|——val
|——cate2idx
|——train_label
|——val_label
|——run_coco.sh
|——main.py
|——semantic.py
|——models.py
|——hgnn.py
|——classifier_layer.py
run_coco.sh: paperarameter configuration and run file.
main.py: the main file for training or test.
hgnn.py:hypergraph neural network function file.
semantic.py:semantic decoupling function file.
models.py:model framework file.
classifier_layer.py: the last classification layer of the network.
SampleData Description
The sample data is from the ms-coco dataset[1]. You can download it yourself.
[1] Lin T Y, Maire M, Belongie S, et al. Microsoft coco: Common objects in context[C]//European conference on computer vision. Springer, Cham, 2014: 740-755.
Train Model
set the relevant experimental configuration in run_coco.sh. FLAG is used to distinguish the parameter names stored in each run.
command;sh run_coco.sh [GPU_ID] [FLAG]
Using GPU3 for example: sh run_coco.sh 3 'adahgnn'
Test Model
First, resize the test input image to 640. Second, modify the configuration file "run_coco.sh". Specifically, modify the resume option to the trained model parameters, set the crop_size to 640, and evaluate to true.
command;sh run_coco.sh [GPU_ID] [FLAG]
AdaHGNN: Adaptive Hypergraph Neural Networks for Multi-Label Image Classification
Jupyter Notebook Python other
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》