Giter Site home page Giter Site logo

watchout's Introduction

WatchOUT

The project was personally inspired by the public's interest in the clothes of the celebrities on TV.

This project tried to combine two models for object detection and image retrieval. Specifically, Faster R-CNN and Triplet-Network using Inception were used. For a query image, it tries to detect the target clothes, optionally crop the image to focus on the target clothes and retrieve similar images.

Deep Fashion Dataset

Deep Fashion Dataset, especially "Category and Attribute Prediction Benchmark", was used for training and retrieval. It requires to follow download-instructions from Deep Fashion Dataset to use the dataset.

As mentioned above, this project uses not only the raw image from the dataset, but also the cropped images focusing on the target clothes from faster R-CNN.

Code Usage

Clone the code

git clone https://github.com/LeeKyungMoon/WatchOUT.git

Prerequisites

  1. Install python modules
pip install -r requirements.txt
  1. Import models including object-detection and it's necessary to follow instructions to use object-detection modules
mv models ${project_root}
  1. Download Deep Fashion dataset and move it to {project_root}/watchout/data
mv raw_deepfashion_dataset ${project_root}/watchout/data
  1. Download Faster R-CNN-graph-data from the here and move it to {project_root}/watchout/models/fasterRCNN (or you can train it yourself following TF Tutorial)
mv graph.tar.gz ${project_root}/watchout/models/fasterRCNN
cd ${project_root}/watchout/models/fasterRCNN
tar -xvf graph.tar.gz

Training

By running the script, it trains the triplet-network model only (it doesn't train jointly with faster R-CNN) and used 1 gpu for training.

python train.py --batch_size 1

Retrieval

For retrieval, I prepared transfer-values which are outputs from inception to calculate cosine distance from the output of the query image. So download data from this here and move it to ${project_root}/watchout/data

mv transfer_values.tar.gz ${project_root}/watchout/data
cd ${project_root}/watchout/data
tar -xvf transfer_values.tar.gz

By running the script, you can get retrieved image-paths according to the query image.

python eval.py --batch_size 1 --top_k 5 

Additionally, you can re-create transfer-values using the method "write_per_label" in helper.py

Examples

These below are the queries and the retrieved results:

alt tag

Authors

KyungMoon Lee / [email protected]

watchout's People

Contributors

leekyungmoon avatar

Watchers

James Cloos 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.