Comments (3)
@animesh-007 Here is the code for SelfSimilarityHook
Line 186 in 80a396d
There are no relevant papers because its just the cosine distance between vectors 😃
source: https://scikit-learn.org/stable/modules/metrics.html#cosine-similarity
If we can represent inputs (e.g images) as vectors (e.g x \in \mathcal{R}^n}
) that contain semantically relevant features for those inputs, cosine distance tells us how close they are on the unit circle i.e the angle between the 2 vectors, don't care about the magnitude.
We tried to use it to reduce the similarity between the batch of images that are being optimized (with very little success), so that each image in the batch has different colors and textures. We saw that a batch of images optimized by DeepInversion on Yolo-V3 had the same blueish-greenish tinge with strokes as if drawn by a paint brush. I hoped that ssim would increase diversity, but it didn't help too much.
Interestingly, batch similarity is being heavily used by papers for learning backbones with contrastive learning without any labels! e.g https://arxiv.org/abs/2002.05709 uses self similarity between samples in a batch to pull together similar images and pull apart dissimilar images. For generative modelling, you may want to look at GAN papers that might be using self similarity to boost diversity.
from diode.
@animesh-007 Here is the code for
SelfSimilarityHook
Line 186 in 80a396d
There are no relevant papers because its just the cosine distance between vectors 😃 source: https://scikit-learn.org/stable/modules/metrics.html#cosine-similarity
If we can represent inputs (e.g images) as vectors (e.g
x \in \mathcal{R}^n}
) that contain semantically relevant features for those inputs, cosine distance tells us how close they are on the unit circle i.e the angle between the 2 vectors, don't care about the magnitude.We tried to use it to reduce the similarity between the batch of images that are being optimized (with very little success), so that each image in the batch has different colors and textures. We saw that a batch of images optimized by DeepInversion on Yolo-V3 had the same blueish-greenish tinge with strokes as if drawn by a paint brush. I hoped that ssim would increase diversity, but it didn't help too much.
Interestingly, batch similarity is being heavily used by papers for learning backbones with contrastive learning without any labels! e.g https://arxiv.org/abs/2002.05709 uses self similarity between samples in a batch to pull together similar images and pull apart dissimilar images. For generative modelling, you may want to look at GAN papers that might be using self similarity to boost diversity.
Thanks, @akshaychawla for the detailed answer. I have looked at one GAN paper ref: https://arxiv.org/abs/2105.08584 in the past that uses contrastive learning too.
from diode.
@animesh-007 I am closing the issue since it seems to be resolved. If required, please re-open for further discussion on the same topic, else open a new issue.
from diode.
Related Issues (17)
- Bad results of generating images of KITTI dataset HOT 8
- [GCS] Access to directory DIODE_data HOT 3
- [GCS]need access to data HOT 3
- Does this method used for a two-stage object detector? HOT 2
- [GCS] access to data HOT 2
- Image variance collapses to zero HOT 1
- About L2 & TV loss, mean value HOT 1
- Question about the pretrained model. HOT 1
- Training time consumption HOT 1
- ERROR occurs when doing distillation!! help!
- [GCS]Access to data
- Confusion about the one box dataset HOT 4
- Same content in label files on bdd100k dataset HOT 2
- Regarding training using BDD100K dataset HOT 9
- [IMPORTANT][GCS] Access to Google's cloud storage bucket
- Try on two stage detector HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diode.