Model code implementation in Zero-shot Learning. Update ing.
Simply run the file main.py:
$ python main.py
A brief introduction to each part of the code.
Load image dataset and get graph batch.
-
graph_batch.py
Using BFS to find most irrelated nodes and generate negative pairs.
-
AdaptionFunc.py
Fit the data to GoG model input form.
-
GlobalGraph.py
Generate Hierarchical Class Graph from Wordnet. (e.g., 285 edges and 286 nodes, where 200 are classes in CUB dataset.)
-
LocalGraph.py
Generate Local Attribute Graph for every class node.
-
VisualModel.py
Including Attention Net and Two Linear Layers.
-
GogModel.py
- [GoG] - GoG model
- [DAZLE] - DAZLE model