Code for "Retrieving Black-box Optimal Images from External Databases" (WSDM 2022)

Related tags

Deep Learning tiara
Overview

Retrieving Black-box Optimal Images from External Databases (WSDM 2022)

We propose how a user retreives an optimal image from external databases of web services (e.g., Flickr) with respect to user-defined functions (e.g., deep learning-based score functions.)

💿 Dependency

Please install

  • wget and unzip, e.g., by sudo apt install wget unzip,
  • PyTorch from the official website, and
  • other dependencies by pip install -r requirements.txt.

📂 Files

  • download.sh downloads and preprocesses the Open Image dataset.
  • environments.py implements wrappers of APIs, i.e., the oracles in the paper.
  • evaluate.py is the evaluation script.
  • methods.py implements Tiara, Tiara-S, and baseline methods.
  • openimage_feature_extract.py preprocess the Open Image dataset. Please run this script after you download images. This script is automatically run by download.sh.
  • preprocess_openimage.py preprocess the Open Image dataset. Please run this script before you download images. This script is automatically run by download.sh.
  • utils.py implements miscellaneous functions, i.e., the word embbeding loader.

🗃️ Download and Preprocess Datasets

$ bash ./download.sh

🧪 Evaluation

Try with Open Image datasets by

$ python evaluate.py --env open --verbose --num_seeds 1 -c 0

The results are saved in outputs directiory.

Please refer to the help command for further options.

$ python evaluate.py -h
usage: evaluate.py [-h] [--tuning] [--extra] [--env {open,flickr,flickrsim}]
                   [--num_seeds NUM_SEEDS] [--budget BUDGET]
                   [--api_key API_KEY] [--api_secret API_SECRET]
                   [--font_path FONT_PATH] [--verbose]
                   [-c [CLASSES [CLASSES ...]]]

optional arguments:
  -h, --help            show this help message and exit
  --tuning
  --extra
  --env {open,flickr,flickrsim}
  --num_seeds NUM_SEEDS
  --budget BUDGET
  --api_key API_KEY     API key for Flickr.
  --api_secret API_SECRET
                        API secret key for Flickr.
  --font_path FONT_PATH
                        Font path for wordclouds.
  --verbose
  -c [CLASSES [CLASSES ...]], --classes [CLASSES [CLASSES ...]]

Flickr API

The Flickr experiments require a Flickr API key. Please get a key from Flickr official website.

🖋️ Citation

@inproceedings{sato2022retrieving,
  author    = {Ryoma Sato},
  title     = {Retrieving Black-box Optimal Images from External Databases},
  booktitle = {Proceedings of the Fifteenth {ACM} International Conference on Web Search and Data Mining, {WSDM}},
  year      = {2022},
}
You might also like...
An official source code for paper Deep Graph Clustering via Dual Correlation Reduction, accepted by AAAI 2022
An official source code for paper Deep Graph Clustering via Dual Correlation Reduction, accepted by AAAI 2022

Dual Correlation Reduction Network An official source code for paper Deep Graph Clustering via Dual Correlation Reduction, accepted by AAAI 2022. Any

Code for Private Recommender Systems: How Can Users Build Their Own Fair Recommender Systems without Log Data? (SDM 2022)

Private Recommender Systems: How Can Users Build Their Own Fair Recommender Systems without Log Data? (SDM 2022) We consider how a user of a web servi

Code for One-shot Talking Face Generation from Single-speaker Audio-Visual Correlation Learning (AAAI 2022)

One-shot Talking Face Generation from Single-speaker Audio-Visual Correlation Learning (AAAI 2022) Paper | Demo Requirements Python = 3.6 , Pytorch

Learning the Beauty in Songs: Neural Singing Voice Beautifier; ACL 2022 (Main conference); Official code
Learning the Beauty in Songs: Neural Singing Voice Beautifier; ACL 2022 (Main conference); Official code

Learning the Beauty in Songs: Neural Singing Voice Beautifier Jinglin Liu, Chengxi Li, Yi Ren, Zhiying Zhu, Zhou Zhao Zhejiang University ACL 2022 Mai

[CVPR 2022] Official code for the paper:
[CVPR 2022] Official code for the paper: "A Stitch in Time Saves Nine: A Train-Time Regularizing Loss for Improved Neural Network Calibration"

MDCA Calibration This is the official PyTorch implementation for the paper: "A Stitch in Time Saves Nine: A Train-Time Regularizing Loss for Improved

Sound-guided Semantic Image Manipulation - Official Pytorch Code (CVPR 2022)
Sound-guided Semantic Image Manipulation - Official Pytorch Code (CVPR 2022)

🔉 Sound-guided Semantic Image Manipulation (CVPR2022) Official Pytorch Implementation Sound-guided Semantic Image Manipulation IEEE/CVF Conference on

Code for the SIGIR 2022 paper
Code for the SIGIR 2022 paper "Hybrid Transformer with Multi-level Fusion for Multimodal Knowledge Graph Completion"

MKGFormer Code for the SIGIR 2022 paper "Hybrid Transformer with Multi-level Fusion for Multimodal Knowledge Graph Completion" Model Architecture Illu

Code for "Modeling Indirect Illumination for Inverse Rendering", CVPR 2022

Modeling Indirect Illumination for Inverse Rendering Project Page | Paper | Data Preparation Set up the python environment conda create -n invrender p

Source code for paper
Source code for paper "ATP: AMRize Than Parse! Enhancing AMR Parsing with PseudoAMRs" @NAACL-2022

ATP: AMRize Then Parse! Enhancing AMR Parsing with PseudoAMRs Hi this is the source code of our paper "ATP: AMRize Then Parse! Enhancing AMR Parsing w

Owner
joisino
joisino
A PyTorch implementation of "SimGNN: A Neural Network Approach to Fast Graph Similarity Computation" (WSDM 2019).

SimGNN ⠀⠀⠀ A PyTorch implementation of SimGNN: A Neural Network Approach to Fast Graph Similarity Computation (WSDM 2019). Abstract Graph similarity s

Benedek Rozemberczki 534 Dec 25, 2022
Hierarchical Metadata-Aware Document Categorization under Weak Supervision (WSDM'21)

Hierarchical Metadata-Aware Document Categorization under Weak Supervision This project provides a weakly supervised framework for hierarchical metada

Yu Zhang 53 Sep 17, 2022
Imposter-detector-2022 - HackED 2022 Team 3IQ - 2022 Imposter Detector

HackED 2022 Team 3IQ - 2022 Imposter Detector By Aneeljyot Alagh, Curtis Kan, Jo

Joshua Ji 3 Aug 20, 2022
[CVPR 2022] CoTTA Code for our CVPR 2022 paper Continual Test-Time Domain Adaptation

CoTTA Code for our CVPR 2022 paper Continual Test-Time Domain Adaptation Prerequisite Please create and activate the following conda envrionment. To r

Qin Wang 87 Jan 8, 2023
The 7th edition of NTIRE: New Trends in Image Restoration and Enhancement workshop will be held on June 2022 in conjunction with CVPR 2022.

NTIRE 2022 - Image Inpainting Challenge Important dates 2022.02.01: Release of train data (input and output images) and validation data (only input) 2

Andrés Romero 37 Nov 27, 2022
"MST++: Multi-stage Spectral-wise Transformer for Efficient Spectral Reconstruction" (CVPRW 2022) & (Winner of NTIRE 2022 Challenge on Spectral Reconstruction from RGB)

MST++: Multi-stage Spectral-wise Transformer for Efficient Spectral Reconstruction (CVPRW 2022) Yuanhao Cai, Jing Lin, Zudi Lin, Haoqian Wang, Yulun Z

Yuanhao Cai 274 Jan 5, 2023
Official PyTorch code for WACV 2022 paper "CFLOW-AD: Real-Time Unsupervised Anomaly Detection with Localization via Conditional Normalizing Flows"

CFLOW-AD: Real-Time Unsupervised Anomaly Detection with Localization via Conditional Normalizing Flows WACV 2022 preprint:https://arxiv.org/abs/2107.1

Denis 156 Dec 28, 2022
Code for the AI lab course 2021/2022 of the University of Verona

AI-Lab Code for the AI lab course 2021/2022 of the University of Verona Set-Up the environment for the curse Download Anaconda for your System. Instal

Davide Corsi 5 Oct 19, 2022
Code for the AAAI 2022 paper "Zero-Shot Cross-Lingual Machine Reading Comprehension via Inter-Sentence Dependency Graph".

multilingual-mrc-isdg Code for the AAAI 2022 paper "Zero-Shot Cross-Lingual Machine Reading Comprehension via Inter-Sentence Dependency Graph". This r

Liyan 5 Dec 7, 2022
Code for the AAAI-2022 paper: Imagine by Reasoning: A Reasoning-Based Implicit Semantic Data Augmentation for Long-Tailed Classification

Imagine by Reasoning: A Reasoning-Based Implicit Semantic Data Augmentation for Long-Tailed Classification (AAAI 2022) Prerequisite PyTorch >= 1.2.0 P

null 16 Dec 14, 2022