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

Related tags

Deep Learningtiara
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},
}
Owner
joisino
joisino
🕵 Artificial Intelligence for social control of public administration

Non-tech crash course into Operação Serenata de Amor Tech crash course into Operação Serenata de Amor Contributing with code and tech skills Supportin

Open Knowledge Brasil - Rede pelo Conhecimento Livre 4.4k Dec 31, 2022
Build Low Code Automated Tensorflow, What-IF explainable models in just 3 lines of code.

Build Low Code Automated Tensorflow explainable models in just 3 lines of code.

Hasan Rafiq 170 Dec 26, 2022
VQMIVC - Vector Quantization and Mutual Information-Based Unsupervised Speech Representation Disentanglement for One-shot Voice Conversion

VQMIVC: Vector Quantization and Mutual Information-Based Unsupervised Speech Representation Disentanglement for One-shot Voice Conversion (Interspeech

Disong Wang 262 Dec 31, 2022
This repository is the offical Pytorch implementation of ContextPose: Context Modeling in 3D Human Pose Estimation: A Unified Perspective (CVPR 2021).

Context Modeling in 3D Human Pose Estimation: A Unified Perspective (CVPR 2021) Introduction This repository is the offical Pytorch implementation of

37 Nov 21, 2022
darija <-> english dictionary

darija-dictionary Having advanced IT solutions that are well adapted to the Moroccan context passes inevitably through understanding Moroccan dialect.

DODa 102 Jan 01, 2023
Code for the paper "How Attentive are Graph Attention Networks?"

How Attentive are Graph Attention Networks? This repository is the official implementation of How Attentive are Graph Attention Networks?. The PyTorch

175 Dec 29, 2022
AdvStyle - Official PyTorch Implementation

AdvStyle - Official PyTorch Implementation Paper | Supp Discovering Interpretable Latent Space Directions of GANs Beyond Binary Attributes. Huiting Ya

Beryl 37 Oct 21, 2022
Simple API for UCI Machine Learning Dataset Repository (search, download, analyze)

A simple API for working with University of California, Irvine (UCI) Machine Learning (ML) repository Table of Contents Introduction About Page of the

Tirthajyoti Sarkar 223 Dec 05, 2022
Kindle is an easy model build package for PyTorch.

Kindle is an easy model build package for PyTorch. Building a deep learning model became so simple that almost all model can be made by copy and paste from other existing model codes. So why code? wh

Jongkuk Lim 77 Nov 11, 2022
Examples of how to create colorful, annotated equations in Latex using Tikz.

The file "eqn_annotate.tex" is the main latex file. This repository provides four examples of annotated equations: [example_prob.tex] A simple one ins

SyNeRCyS Research Lab 3.2k Jan 05, 2023
Flappy bird automation using Neuroevolution of Augmenting Topologies (NEAT) in Python

FlappyAI Flappy bird automation using Neuroevolution of Augmenting Topologies (NEAT) in Python Everything Used Genetic Algorithm especially NEAT conce

Eryawan Presma Y. 2 Mar 24, 2022
Rendering color and depth images for ShapeNet models.

Color & Depth Renderer for ShapeNet This library includes the tools for rendering multi-view color and depth images of ShapeNet models. Physically bas

Yinyu Nie 41 Dec 19, 2022
Implementation of fast algorithms for Maximum Spanning Tree (MST) parsing that includes fast ArcMax+Reweighting+Tarjan algorithm for single-root dependency parsing.

Fast MST Algorithm Implementation of fast algorithms for (Maximum Spanning Tree) MST parsing that includes fast ArcMax+Reweighting+Tarjan algorithm fo

Miloš Stanojević 11 Oct 14, 2022
Official implementation of "Dynamic Anchor Learning for Arbitrary-Oriented Object Detection" (AAAI2021).

DAL This project hosts the official implementation for our AAAI 2021 paper: Dynamic Anchor Learning for Arbitrary-Oriented Object Detection [arxiv] [c

ming71 215 Nov 28, 2022
Official MegEngine implementation of CREStereo(CVPR 2022 Oral).

[CVPR 2022] Practical Stereo Matching via Cascaded Recurrent Network with Adaptive Correlation This repository contains MegEngine implementation of ou

MEGVII Research 309 Dec 30, 2022
🤗 Paper Style Guide

🤗 Paper Style Guide (Work in progress, send a PR!) Libraries to Know booktabs natbib cleveref Either seaborn, plotly or altair for graphs algorithmic

Hugging Face 66 Dec 12, 2022
Hypersearch weight debugging and losses tutorial

tutorial Activate tensorboard option Running TensorBoard remotely When working on a remote server, you can use SSH tunneling to forward the port of th

1 Dec 11, 2021
simple demo codes for Learning to Teach with Dynamic Loss Functions

Learning to Teach with Dynamic Loss Functions This repo contains the simple demo for the NeurIPS-18 paper: Learning to Teach with Dynamic Loss Functio

Lijun Wu 15 Dec 30, 2021
Release of the ConditionalQA dataset

ConditionalQA Datasets accompanying the paper ConditionalQA: A Complex Reading Comprehension Dataset with Conditional Answers. Disclaimer This dataset

14 Oct 17, 2022
Video Matting Refinement For Python

Video-matting refinement Library (use pip to install) scikit-image numpy av matplotlib Run Static background python path_to_video.mp4 Moving backgroun

3 Jan 11, 2022