Git Product home page Git Product logo

imageretrieval's Introduction

ImageRetrieval

Installation

To use the ImageRetrieval package, you can follow these installation steps:

1. Clone the repository:

```bash
git clone https://github.com/your-username/your-repo.git
cd your-repo
```

2. Install the ImageRetrieval package itself:

```bash
pip install .
```

This will automatically install packages

3. You're all set! Now lets look at results from our approach

Configuration Model Loss Functions Feature Dim Augmentation ROC-AUC
0 Resnet50 - - - 0.75
1 Resnet50 CenterLoss + CrossEntropy 512 False 0.815
2 Resnet50 CenterLoss + CrossEntropy + ArcFaceLoss 512 True 0.84
3 Resnet50 CenterLoss + CrossEntropy + ArcFaceLoss 4096 True 0.85
4 Resnet101 CenterLoss + CrossEntropy + ArcFaceLoss 4096 True 0.87
5 Hybrid_CNN_Transformer CenterLoss + CrossEntropy + ArcFaceLoss 8192 True 0.9

Explanation

In this project, a range of model configurations were explored to improve image retrieval performance, with ROC-AUC scores used as the evaluation metric.

  • Resnet50 Inference (Frozen Layers): The initial model achieved a ROC-AUC of 0.75.
  • Resnet50 with CenterLoss + CrossEntropy: Introducing the CenterLoss and CrossEntropy loss functions along with a feature dimension of 512 improved the performance to a ROC-AUC of 0.815.
  • Resnet50 with CenterLoss + CrossEntropy + ArcFaceLoss: Adding ArcFaceLoss and enabling augmentation further improved performance, yielding a ROC-AUC of 0.84.
  • Resnet50 with CenterLoss + CrossEntropy + ArcFaceLoss (FeatureDim=4096): Increasing the feature dimension to 4096 while retaining augmentation led to a ROC-AUC of 0.85.
  • Resnet101 with CenterLoss + CrossEntropy + ArcFaceLoss (FeatureDim=4096): Using a Resnet101 model with augmented feature dimensions achieved a ROC-AUC of 0.87.
  • Hybrid CNN-Transformer (Resnet101 + SwinTransformer): Combining a Resnet101 CNN with a SwinTransformer and augmenting the feature dimension to 8192 resulted in an exceptional ROC-AUC of 0.9.

These configurations showcase the impact of diverse strategies on the ROC-AUC score, with augmentation, feature dimension adjustments, and hybrid architectures playing significant roles in performance enhancements. The success of the hybrid model underscores the benefits of integrating transformer-based features alongside CNNs.


Feel free to copy and paste this content into your GitHub README as desired.

t-SNE Visualization of Classes

t-SNE Visualization

The image above showcases the t-SNE visualization of classes, offering insights into the distribution of your data

imageretrieval's People

Contributors

mortezamahdavimortazavi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.