All Projects → mlagunas → material-appearance-similarity

mlagunas / material-appearance-similarity

Licence: GPL-2.0 license
Code for the paper "A Similarity Measure for Material Appearance" presented in SIGGRAPH 2019 and published in ACM Transactions on Graphics (TOG).

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to material-appearance-similarity

Alae
[CVPR2020] Adversarial Latent Autoencoders
Stars: ✭ 3,178 (+14345.45%)
Mutual labels:  paper, paper-implementations
batu-gunting-kertas-nuxt
Rock Paper Scissors Game with Artificial Intellegence
Stars: ✭ 50 (+127.27%)
Mutual labels:  paper
paper annotations
A place to keep track of all the annotated papers.
Stars: ✭ 96 (+336.36%)
Mutual labels:  paper
atari-demo
Code for the blog post "Learning Montezuma’s Revenge from a Single Demonstration"
Stars: ✭ 21 (-4.55%)
Mutual labels:  paper
Purpur
Purpur is a drop-in replacement for Paper servers designed for configurability, and new fun and exciting gameplay features.
Stars: ✭ 1,224 (+5463.64%)
Mutual labels:  paper
FSL-Mate
FSL-Mate: A collection of resources for few-shot learning (FSL).
Stars: ✭ 1,346 (+6018.18%)
Mutual labels:  paper
ShapeTextureDebiasedTraining
Code and models for the paper Shape-Texture Debiased Neural Network Training (ICLR 2021)
Stars: ✭ 95 (+331.82%)
Mutual labels:  paper
STACP
Joint Geographical and Temporal Modeling based on Matrix Factorization for Point-of-Interest Recommendation - ECIR 2020
Stars: ✭ 19 (-13.64%)
Mutual labels:  paper
3d-detection-papers
The papers in this list are about 3d detection, especially those using point clouds.
Stars: ✭ 77 (+250%)
Mutual labels:  paper
BookLibrary
Book Library of P&W Studio
Stars: ✭ 13 (-40.91%)
Mutual labels:  paper
modules
The official repository for our paper "Are Neural Nets Modular? Inspecting Functional Modularity Through Differentiable Weight Masks". We develop a method for analyzing emerging functional modularity in neural networks based on differentiable weight masks and use it to point out important issues in current-day neural networks.
Stars: ✭ 25 (+13.64%)
Mutual labels:  paper
logically
explorations in core.logic
Stars: ✭ 108 (+390.91%)
Mutual labels:  paper-implementations
ScriptBlockPlus
任意のブロックにスクリプトを追加するプラグインです。
Stars: ✭ 25 (+13.64%)
Mutual labels:  paper
CycleGAN
A simple code of CycleGAN which is easy to read is implemented by TensorFlow
Stars: ✭ 21 (-4.55%)
Mutual labels:  paper-implementations
NLP-Natural-Language-Processing
Projects and useful articles / links
Stars: ✭ 149 (+577.27%)
Mutual labels:  paper
Hotpur
A fork of Purpur that aims to improve performance and add FabricMC compatibility.
Stars: ✭ 17 (-22.73%)
Mutual labels:  paper
PaperDownload
知网/万方 论文/期刊批量检索下载
Stars: ✭ 18 (-18.18%)
Mutual labels:  paper
speaker-recognition-papers
Share some recent speaker recognition papers and their implementations.
Stars: ✭ 92 (+318.18%)
Mutual labels:  paper-implementations
minie
An open information extraction system that provides compact extractions
Stars: ✭ 83 (+277.27%)
Mutual labels:  paper
saliency
Contextual Encoder-Decoder Network for Visual Saliency Prediction [Neural Networks 2020]
Stars: ✭ 126 (+472.73%)
Mutual labels:  paper-implementations

A Similarity Measure for Material Appearance

Project page Paper Conference Journal

alt text

Abstract

We present a model to measure the similarity in appearance between different materials, which correlates with human similarity judgments. We first create a database of 9,000 rendered images depicting objects with varying materials, shape and illumination. We then gather data on perceived similarity from crowdsourced experiments; our analysis of over 114,840 answers suggests that indeed a shared perception of appearance similarity exists. We feed this data to a deep learning architecture with a novel loss function, which learns a feature space for materials that correlates with such perceived appearance similarity. Our evaluation shows that our model outperforms existing metrics. Last, we demonstrate several applications enabled by our metric, including appearance-based search for material suggestions, database visualization, clustering and summarization, and gamut mapping.

Setting it up

Note that this has been tested using python 3.7

Dependencies

First, clone and install dependencies

# clone project   
git clone https://github.com/mlagunas/material-appearance-similarity.git   

cd material-appearance-similarity 
pip install scipy numpy matplotlib umap-learn Pillow
# install pytorch/torchvision (https://pytorch.org)

Get model pretrained weights

How to run the code

Training a new model

Make sure that you have downloaded all the training images Also, make sure that you have users' judgements on material similarity. Those are two json files inside ./data, namely answers_processed_train.json , and answers_processed_test.json. Also make sure that you have the uncropped images of each material with Havran geometry (./data/havran1_ennis_298x298_LDR).

Then, set up those arguments in the trianing script and run it:

python train.py --train-dir data/split_dataset --test-dir data
/havran1_ennis_298x298_LDR

Using the default values in the script, the trained model yields an agreement of 81.99% with users' answers.

Getting image feature vectors

Next, get the feature vectors for some images. First, modify paths inside get_embs.py.

...
weights_path = 'data/model_best.pth.tar'
imgs_path = 'data/havran1_stpeters_256x256_LDR'
embs_path = 'data/embs.mat' # we will store the obtained feature vectors in this path
...

Then, get the feature vectors for the downloaded images

python3 get_embs.py    

Get similar images

We can obtain similar images to a given reference using the previously computed feature vectors. First, set the path and necesary variables in plot_similar.py. This will store the 5 more similar images to the reference according to our metric in the path data/nickel.

...
embs_path = 'data/embs.mat'  # /mat file with the embeddings
n_close_elems = 5  # number of close elements to find
reference_img = 'data/havran1_stpeters_256x256_LDR/nickel.png'
do_unit_norm = False # normalize feature vectors to have unit norm
...

Generate UMAP plot

We can visualize the feature vectors generated for the images using dimensionality reduction algorithms like UMAP. First we set the path of the feature vectors inside plot_umap.py.

...
embs_path = 'data/embs.mat'
do_unit_norm = False # normalize feature vectors to have unit norm
...

To generate the plot we run:

python3 plot_umap.py

Citation

If you found this code useful please cite our work as:

@article{lagunas2019similarity,
    author = {Lagunas, Manuel and Malpica, Sandra and Serrano, Ana and
    Garces, Elena and Gutierrez, Diego and Masia, Belen},
    title = {A Similarity Measure for Material Appearance},
    journal = {ACM Transactions on Graphics (SIGGRAPH 2019)},
    volume = {38},
    number = {4},
    year = {2019}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].