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
generate-2D-quadrilateral-mesh-with-neural-networks-and-tree-search

generate-2D-quadrilateral-mesh-with-neural-networks-and-tree-search This repository contains single-threaded TreeMesh code. I'm Hua Tong, a senior stu

Hua Tong 18 Sep 21, 2022
Codes for paper "Towards Diverse Paragraph Captioning for Untrimmed Videos". CVPR 2021

Towards Diverse Paragraph Captioning for Untrimmed Videos This repository contains PyTorch implementation of our paper Towards Diverse Paragraph Capti

Yuqing Song 61 Oct 11, 2022
Live Hand Tracking Using Python

Live-Hand-Tracking-Using-Python Project Description: In this project, we will be

Hassan Shahzad 2 Jan 06, 2022
Weakly Supervised Learning of Instance Segmentation with Inter-pixel Relations, CVPR 2019 (Oral)

Weakly Supervised Learning of Instance Segmentation with Inter-pixel Relations The code of: Weakly Supervised Learning of Instance Segmentation with I

Jiwoon Ahn 472 Dec 29, 2022
PFLD pytorch Implementation

PFLD-pytorch Implementation of PFLD A Practical Facial Landmark Detector by pytorch. 1. install requirements pip3 install -r requirements.txt 2. Datas

zhaozhichao 669 Jan 02, 2023
(ImageNet pretrained models) The official pytorch implemention of the TPAMI paper "Res2Net: A New Multi-scale Backbone Architecture"

Res2Net The official pytorch implemention of the paper "Res2Net: A New Multi-scale Backbone Architecture" Our paper is accepted by IEEE Transactions o

Res2Net Applications 928 Dec 29, 2022
Code and data for "TURL: Table Understanding through Representation Learning"

TURL This Repo contains code and data for "TURL: Table Understanding through Representation Learning". Environment and Setup Data Pretraining Finetuni

SunLab-OSU 63 Nov 23, 2022
PyTorch package for the discrete VAE used for DALL·E.

Overview [Blog] [Paper] [Model Card] [Usage] This is the official PyTorch package for the discrete VAE used for DALL·E. Installation Before running th

OpenAI 9.5k Jan 05, 2023
This is a yolo3 implemented via tensorflow 2.7

YoloV3 - an object detection algorithm implemented via TF 2.x source code In this article I assume you've already familiar with basic computer vision

2 Jan 17, 2022
Pytorch Lightning code guideline for conferences

Deep learning project seed Use this seed to start new deep learning / ML projects. Built in setup.py Built in requirements Examples with MNIST Badges

Pytorch Lightning 1k Jan 06, 2023
More than a hundred strange attractors

dysts Analyze more than a hundred chaotic systems. Basic Usage Import a model and run a simulation with default initial conditions and parameter value

William Gilpin 185 Dec 23, 2022
CPU inference engine that delivers unprecedented performance for sparse models

The DeepSparse Engine is a CPU runtime that delivers unprecedented performance by taking advantage of natural sparsity within neural networks to reduce compute required as well as accelerate memory b

Neural Magic 1.2k Jan 09, 2023
This repository contains the implementation of the following paper: Cross-Descriptor Visual Localization and Mapping

Cross-Descriptor Visual Localization and Mapping This repository contains the implementation of the following paper: "Cross-Descriptor Visual Localiza

Mihai Dusmanu 81 Oct 06, 2022
PEPit is a package enabling computer-assisted worst-case analyses of first-order optimization methods.

PEPit: Performance Estimation in Python This open source Python library provides a generic way to use PEP framework in Python. Performance estimation

Baptiste 53 Nov 16, 2022
FedScale: Benchmarking Model and System Performance of Federated Learning

FedScale: Benchmarking Model and System Performance of Federated Learning (Paper) This repository contains scripts and instructions of building FedSca

268 Jan 01, 2023
The official code for PRIMER: Pyramid-based Masked Sentence Pre-training for Multi-document Summarization

PRIMER The official code for PRIMER: Pyramid-based Masked Sentence Pre-training for Multi-document Summarization. PRIMER is a pre-trained model for mu

AI2 114 Jan 06, 2023
Deep Learning for Time Series Forecasting.

nixtlats:Deep Learning for Time Series Forecasting [nikstla] (noun, nahuatl) Period of time. State-of-the-art time series forecasting for pytorch. Nix

Nixtla 5 Dec 06, 2022
🐸STT integration examples

🐸 STT 0.9.x Examples These are various examples on how to use or integrate 🐸 STT using our packages. It is a good way to just try out 🐸 STT before

coqui 92 Dec 19, 2022
Official code repository of the paper Learning Associative Inference Using Fast Weight Memory by Schlag et al.

Learning Associative Inference Using Fast Weight Memory This repository contains the offical code for the paper Learning Associative Inference Using F

Imanol Schlag 18 Oct 12, 2022
(Preprint) Official PyTorch implementation of "How Do Vision Transformers Work?"

(Preprint) Official PyTorch implementation of "How Do Vision Transformers Work?"

xxxnell 656 Dec 30, 2022