All Projects → ihciah → Deep Fashion Retrieval

ihciah / Deep Fashion Retrieval

Simple image retrival on deep-fashion dataset with pytorch - A course project

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Deep Fashion Retrieval

Trace.moe Webextension
WebExtension for the Anime Reverse Search Engine to search by image
Stars: ✭ 89 (-54.82%)
Mutual labels:  image-retrieval
Libvot
A C++11 multithread library for image retrieval
Stars: ✭ 139 (-29.44%)
Mutual labels:  image-retrieval
Cnn Cbir Benchmark
CNN CBIR benchmark (ongoing)
Stars: ✭ 171 (-13.2%)
Mutual labels:  image-retrieval
Delf enhanced
Wrapper of DELF Tensorflow Model
Stars: ✭ 98 (-50.25%)
Mutual labels:  image-retrieval
Openibl
[ECCV-2020 (spotlight)] Self-supervising Fine-grained Region Similarities for Large-scale Image Localization. 🌏 PyTorch open-source toolbox for image-based localization (place recognition).
Stars: ✭ 128 (-35.03%)
Mutual labels:  image-retrieval
Revisitop
Revisiting Oxford and Paris: Large-Scale Image Retrieval Benchmarking
Stars: ✭ 147 (-25.38%)
Mutual labels:  image-retrieval
Vehicle Retrieval Kcnns
vehicle image retrieval using k CNNs ensemble method
Stars: ✭ 81 (-58.88%)
Mutual labels:  image-retrieval
Affnet
Code and weights for local feature affine shape estimation paper "Repeatability Is Not Enough: Learning Discriminative Affine Regions via Discriminability"
Stars: ✭ 191 (-3.05%)
Mutual labels:  image-retrieval
Fast Reid
SOTA Re-identification Methods and Toolbox
Stars: ✭ 2,287 (+1060.91%)
Mutual labels:  image-retrieval
Cnnimageretrieval
CNN Image Retrieval in MatConvNet: Training and evaluating CNNs for Image Retrieval in MatConvNet
Stars: ✭ 168 (-14.72%)
Mutual labels:  image-retrieval
Manifold Diffusion
Diffusion on manifolds for image retrieval
Stars: ✭ 102 (-48.22%)
Mutual labels:  image-retrieval
Kapture
kapture is a file format as well as a set of tools for manipulating datasets, and in particular Visual Localization and Structure from Motion data.
Stars: ✭ 128 (-35.03%)
Mutual labels:  image-retrieval
Pytorch deephash
Pytorch implementation of Deep Learning of Binary Hash Codes for Fast Image Retrieval, CVPRW 2015
Stars: ✭ 148 (-24.87%)
Mutual labels:  image-retrieval
Imageretrieval Tf
基于tensorflow & tf-servering & flask 的图像检索
Stars: ✭ 94 (-52.28%)
Mutual labels:  image-retrieval
Revisiting deep metric learning pytorch
(ICML 2020) This repo contains code for our paper "Revisiting Training Strategies and Generalization Performance in Deep Metric Learning" (https://arxiv.org/abs/2002.08473) to facilitate consistent research in the field of Deep Metric Learning.
Stars: ✭ 172 (-12.69%)
Mutual labels:  image-retrieval
Deepembeding
图像检索和向量搜索,similarity learning,compare deep metric and deep-hashing applying in image retrieval
Stars: ✭ 83 (-57.87%)
Mutual labels:  image-retrieval
Liresolr
Putting LIRE into Solr - an ongoing project
Stars: ✭ 140 (-28.93%)
Mutual labels:  image-retrieval
Semantic Embeddings
Hierarchy-based Image Embeddings for Semantic Image Retrieval
Stars: ✭ 196 (-0.51%)
Mutual labels:  image-retrieval
Proxy Anchor Cvpr2020
Official PyTorch Implementation of Proxy Anchor Loss for Deep Metric Learning, CVPR 2020
Stars: ✭ 188 (-4.57%)
Mutual labels:  image-retrieval
Person Reid Triplet Loss
Person re-ID baseline with triplet loss
Stars: ✭ 165 (-16.24%)
Mutual labels:  image-retrieval

deep-fashion-retrieval

Simple image retrieval algorithm on deep-fashion dataset with pytorch

Capture

Dependencies

  • Python (Compatible with 2 and 3)
  • Pytorch
  • Torchvision
  • PIL
  • cv2(only for visualizing)

Anaconda is recommended.

Training

  1. Download dataset from DeepFashion: Attribute Prediction
  2. Unzip all files and set DATASET_BASE in config.py
  3. Run train.py

The models will be saved to DATASET_BASE/models.

My model: Download from Google Drive

Deep Feature: ResNet50 - (Linear 1024 to 512) - (Linear 512 to 20), the 512-dim vector is regarded as images' identical features.

Loss: CrossEntropyLoss + TripletMarginLoss * Weight

Color Feature: Get ResNet50 final conv layer output(N * C * 7 * 7), then do avg_pooling on channel dim. Choose the max-N responses and extract the corresponding blocks on avg_pooling map of original image.

Training details: Freeze the conv parameters and train net until a stable accuracy and loss, then set FREEZE to False and train it again.

If you applied the DeepFashion: In-shop Clothes Retrieval, you can set ENABLE_INSHOP_DATASET to True.

Directory structure:

  • DATASET_BASE
    • Anno
    • Eval
    • img
    • models(generated)
    • in_shop(optional)
      • list_bbox_inshop.txt
      • list_eval_partition.txt
      • img
    • all_feat.list(generated)
    • all_feat.npy(generated)
    • all_color_feat.npy(generated)

Generating feature databases

  • Feature extraction

    • Set DUMPED_MODEL in config.py as trained model
    • Run feature_extractor.py

    The feature will be saved to DATASET_BASE/all_feat.npy, DATASET_BASE/all_color_feat.npy and DATASET_BASE/all_feat.list.

  • Accelerating querying by clustering

    • Run kmeans.py to train the models, default 50 clusters.

      The model will be saved as DATABASE/models/kmeans.m

Query with a picture

  • Run retrieval.py img_path, for example:

    python retrieval.py img/Sheer_Pleated-Front_Blouse/img_00000005.jpg.

    Set DISTANCE_METRIC in config.py to use different metrics such as cosine, euclidean on deep feature and color feature..

Time cost

  • 2.854 sec for loading model
  • 0.078 sec for loading feature database
  • 0.519 sec for extracting feature of given image
  • 0.122 sec for doing naive query(139,709 features)
  • 0.038 sec for doing query with kmeans(139,709 features)

Environment

  • Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz with 32GB RAM
  • GeForce GTX TITAN X with CUDA 7.5
  • Ubuntu 14.04
  • Pytorch 0.2.0_4

Future works

  • Add web support
  • Add more models and fuse them
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].