All Projects → PkuRainBow → Hdc.caffe

PkuRainBow / Hdc.caffe

Licence: gpl-3.0
Complete Code for "Hard-Aware-Deeply-Cascaded-Embedding"

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Hdc.caffe

Damselfly
Damselfly is a server-based Digital Asset Management system for photographs. The goal of Damselfly is to index an extremely large collection of images, and allow easy search and retrieval of those images, using metadata such as the IPTC keyword tags, as well as the folder and file names.
Stars: ✭ 86 (-12.24%)
Mutual labels:  image
Dict2vec
Dict2vec is a framework to learn word embeddings using lexical dictionaries.
Stars: ✭ 91 (-7.14%)
Mutual labels:  embeddings
React Modal Image
A tiny React component providing modal image Lightbox.
Stars: ✭ 97 (-1.02%)
Mutual labels:  image
Processing Imageprocessing
Collection of basic image processing algorithms for processing
Stars: ✭ 87 (-11.22%)
Mutual labels:  image
Carbon Api
Unofficial API for generating beautiful images of your source code using Carbon.
Stars: ✭ 89 (-9.18%)
Mutual labels:  image
Imageselector
🌁 Android 图片选择器。充分自由定制,极大程度简化使用,支持图库多选/图片预览/单选/照片裁剪/拍照/自定义图片加载方式/自定义色调/沉浸式状态栏
Stars: ✭ 1,310 (+1236.73%)
Mutual labels:  image
Cesi
WWW 2018: CESI: Canonicalizing Open Knowledge Bases using Embeddings and Side Information
Stars: ✭ 85 (-13.27%)
Mutual labels:  embeddings
Verse
Reference implementation of the paper VERSE: Versatile Graph Embeddings from Similarity Measures
Stars: ✭ 98 (+0%)
Mutual labels:  embeddings
Pyautolens
PyAutoLens: Open Source Strong Gravitational Lensing
Stars: ✭ 90 (-8.16%)
Mutual labels:  image
Lightbox
🌌 A convenient and easy to use image viewer for your iOS app
Stars: ✭ 1,334 (+1261.22%)
Mutual labels:  image
Angular Cropperjs
CropperJS integration for Angular +6
Stars: ✭ 88 (-10.2%)
Mutual labels:  image
Ffimageloading
Image loading, caching & transforming library for Xamarin and Windows
Stars: ✭ 1,288 (+1214.29%)
Mutual labels:  image
Angular File Uploader
Angular file uploader is an Angular 2/4/5/6/7/8/9/10 + file uploader module with Real-Time Progress Bar, Responsive design, Angular Universal Compatibility, localization and multiple themes which includes Drag and Drop and much more.
Stars: ✭ 92 (-6.12%)
Mutual labels:  image
Gopherkon
Go mascot image constructor. Create your cute own gopher.
Stars: ✭ 86 (-12.24%)
Mutual labels:  image
Pimg
📷 Mini Image Lazy Loader for P(R)eact and Vue
Stars: ✭ 97 (-1.02%)
Mutual labels:  image
Compress.js
A simple JavaScript based client-side image compression algorithm
Stars: ✭ 86 (-12.24%)
Mutual labels:  image
React Responsive Picture
A future-proof responsive image component that supports latest Picture specification
Stars: ✭ 91 (-7.14%)
Mutual labels:  image
React Background Slideshow
Sexy tiled background slideshow for React 🔥
Stars: ✭ 98 (+0%)
Mutual labels:  image
React Image Zoom
React component for desktop browsers for image zoom on mouse hover
Stars: ✭ 97 (-1.02%)
Mutual labels:  image
Img
🖼Image hosting powered by laravel
Stars: ✭ 92 (-6.12%)
Mutual labels:  image

Hard-Aware-Deeply-Cascaded-Embedding [ICCV2017 (spotlight)]

Congratulations to our work is accepted by ICCV2017 (spotlight).

There exist a typo previously about the initial learning rate of CARS196, 0.001 should be changed to 0.01. The HDC prefers larger learning rates.

Here is the link of the trained models(permitted for NON-COMMERCIAL usage only, if for COMMERCIAL, please contact [email protected])

Drop Box Stanford-Online-Products/CUB-200-2011/CARS196

BaiduYunPan Stanford-Online-Products/CUB-200-2011/CARS196

04/11/2017 Add some tips on how to add new layers to caffe!

Note!!! I found many people do not know how to add new layers to caffe framework. Here is a vivid explainations: First you need to add the "*.hpp *cpp *.cu" to the project. Then you need to edit the caffe.proto. First you need to check the max ID that you have used. Here we will take the caffe.proto as an example. You could check that in the line 407 with the optional WindowDataParameter window_data_param = 129;. So you check in the lines(1169-1200) to know that the WindowDataParameter contains 13 parameters. Therefore, you need to add this line optional PairFastLossParameter pair_fast_loss_param = 143; as 129 + 13 = 142. Besides, you also need to add the the following lines to spercify the parameters of the newly added layers.

   message PairFastLossParameter {
     optional float margin = 1 [default = 1.0];
     optional float hard_ratio = 2 [default = 1.0];
     optional float factor = 3 [default = 10];
     enum MODE {
       POS = 0;
       NEG = 1;
       BOTH = 2;
     }
     optional MODE mode = 4 [default = BOTH];
   }

Update 03/30/2017 Information : The attached models are not well trained for the final test, as there exist some small bugs. We will release all the final single best models as soon as possible ! we fix a bug that the gradient problem for pair_fast_loss_layer !

Information : The weight_decay for CARS196 should be 0.0002, the original version is typed to be 0.0005 !

This repository has the source code for the paper "Hard-Aware-Deeply-Cascaded-Embedding_release". This paper is available on arXiv. For the loss layer implementation, look at the folder caffe_layers.

Citing this work

If you find this work useful in your research, please consider citing :

@article{yuan2016HDC,
  title={Hard-Aware Deeply Cascaded Embedding},
  author={Yuan, Yuhui and Yang, Kuiyuan and Zhang, Chao},
  journal={arXiv preprint arXiv:1611.05720},
  year={2016}
}

Installation

  1. Install Caffe (including the python interface if you want to use the test code)
  2. Add the "NormalizationLayer" and "PairFastLossLayer" to the caffe.

Prerequisites

  1. caffe (python interface)
  2. matplotlib,cPickle,numpy,lmdb
  3. We assumed that you are using Windows (you can rewrite the *.bat to *.sh if you choose Linux or MacOs)

Datasets & Models

  1. Download pretrained GoogLeNet model from here
  2. Download the datasets needed (you could download them from the official sets): StanfordOnlineProducts CARS196 CUB200 DeepFashion (we will release our results on both both in-shop and consumer2shop.)
  3. You should change the path of images in the Training Prototxt.

Usage

Process Data: (you should in the folder /src_code/):

   python hdc_process.py -d stanford_products
   python hdc_process.py -d cub200
   python hdc_process.py -d cars196
   python hdc_process.py -d deepfashion

Training Models: (currently we only support HDC for your convenience)

   python hdc_train.py -d stanford_products -c HDC
   python hdc_train.py -d cub200 -c HDC
   python hdc_train.py -d cars196 -c HDC

You could change the image path in the training prototxt to train the models with bounding boxes or not

Extract Features:

  python hdc_feature.py -d stanford_products -c HDC
  python hdc_feature.py -d cub200 -c HDC
  python hdc_feature.py -d cars196 -c HDC

Test Models:

   python hdc_test.py -d stanford_products -c HDC
   python hdc_test.py -d cub200 -c HDC
   python hdc_test.py -d cars196 -c HDC

Improve Space

To get better results than the paper, you could simply by sampling more batches. For convenience, we all sample for 5000 times. In our experiments, by sampling 10,000 times could further improve the performance.

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].