All Projects → cftang0827 → pedestrian_recognition

cftang0827 / pedestrian_recognition

Licence: MIT license
A simple human recognition api for re-ID usage, power by paper https://arxiv.org/abs/1703.07737

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to pedestrian recognition

MobileNetV3-SSD-Compact-Version
MobileNetV3 SSD的简洁版本
Stars: ✭ 65 (+124.14%)
Mutual labels:  mobilenet, mobilenet-ssd
Mobilenet Ssd
Caffe implementation of Google MobileNet SSD detection network, with pretrained weights on VOC0712 and mAP=0.727.
Stars: ✭ 1,805 (+6124.14%)
Mutual labels:  mobilenet, mobilenet-ssd
hand detection
A Light CNN based Method for Hand Detection and Orientation Estimation
Stars: ✭ 116 (+300%)
Mutual labels:  mobilenet, mobilenet-ssd
MobileNet-SSD-windows
No description or website provided.
Stars: ✭ 91 (+213.79%)
Mutual labels:  mobilenet, mobilenet-ssd
MobileNet V2 Keras
No description or website provided.
Stars: ✭ 29 (+0%)
Mutual labels:  mobilenet
crowd density segmentation
The code for preparing the training data for crowd counting / segmentation algorithm.
Stars: ✭ 21 (-27.59%)
Mutual labels:  pedestrian-detection
Facial-Recognition-Using-FaceNet-Siamese-One-Shot-Learning
Implementation of Facial Recognition System Using Facenet based on One Shot Learning Using Siamese Networks
Stars: ✭ 104 (+258.62%)
Mutual labels:  siamese-network
Caffe2-C-demo
Show how to use Caffe2 in C++ through a simple LeNet sample project
Stars: ✭ 60 (+106.9%)
Mutual labels:  caffe2
TensorMONK
A collection of deep learning models (PyTorch implemtation)
Stars: ✭ 21 (-27.59%)
Mutual labels:  mobilenet-ssd
caffe example
install script and example for clCaffe which will run caffe by OpenCL (this is for https://github.com/01org/caffe/tree/inference-optimize)
Stars: ✭ 12 (-58.62%)
Mutual labels:  mobilenet-ssd
CenterNetPerson
CenterNet used for pedestrian detection
Stars: ✭ 26 (-10.34%)
Mutual labels:  pedestrian-detection
RankNet
Learning to Rank from Pair-wise data
Stars: ✭ 40 (+37.93%)
Mutual labels:  siamese-network
caffe-mobilenet v2
caffe based mobilenet v2 deploy
Stars: ✭ 29 (+0%)
Mutual labels:  mobilenet
pytorch-android
[EXPERIMENTAL] Demo of using PyTorch 1.0 inside an Android app. Test with your own deep neural network such as ResNet18/SqueezeNet/MobileNet v2 and a phone camera.
Stars: ✭ 105 (+262.07%)
Mutual labels:  caffe2
EfficientWord-Net
OneShot Learning-based hotword detection.
Stars: ✭ 78 (+168.97%)
Mutual labels:  siamese-network
the-wandering-dreamer
The Wandering Dreamer: An Synthetic Feedback Loop
Stars: ✭ 21 (-27.59%)
Mutual labels:  mobilenet
ReID-PCB RPP
Beyond Part Models: Person Retrieval with Refined Part Pooling
Stars: ✭ 70 (+141.38%)
Mutual labels:  re-identification
Offline-Signature-Verification
Implemented two papers for offline signature verification. Both use different deep learning techniques - Convolutional network and Siamese network.
Stars: ✭ 24 (-17.24%)
Mutual labels:  siamese-network
Siamese-Recurrent-Architectures
Usage of Siamese Recurrent Neural network architectures for semantic textual similarity
Stars: ✭ 19 (-34.48%)
Mutual labels:  siamese-network
awesome lightweight networks
The implementation of various lightweight networks by using PyTorch. such as:MobileNetV2,MobileNeXt,GhostNet,ParNet,MobileViT、AdderNet,ShuffleNetV1-V2,LCNet,ConvNeXt,etc. ⭐⭐⭐⭐⭐
Stars: ✭ 516 (+1679.31%)
Mutual labels:  mobilenet

pedestrian_recognition

A simple human recognition api for re-ID usage, power by paper In Defense of the Triplet Loss for Person Re-Identification and MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications

Testing Environment

Operating system

  1. MacOS Sierra
  2. Ubuntu 16.04

Python package (Python 3.5 or Python3.6)

  1. Tensorflow 1.8
  2. opencv 3.3 (Need opencv dnn library)
  3. Numpy
  • Install package with requirements.txt file
pip install -r requirements.txt

Prepare the model

Since we are using third-party pretrain model, therefore, I will prepare the way to download it rather than package them toghther. Special thanks to these two repo for providing model.

  1. https://github.com/VisualComputingInstitute/triplet-reid
  2. https://github.com/chuanqi305/MobileNet-SSD
#opencv MobileNet model
wget https://raw.githubusercontent.com/chuanqi305/MobileNet-SSD/master/deploy.prototxt -P model
wget https://drive.google.com/u/0/uc?id=0B3gersZ2cHIxVFI1Rjd5aDgwOG8&export=download -O model/MobileNetSSD_deploy.caffemodel
#reid model
wget https://github.com/VisualComputingInstitute/triplet-reid/releases/download/250eb1/market1501_weights.zip -P model
unzip model/market1501_weights.zip -d model

Workflow

  1. Use opencv dnn module and use caffemodel to detection human in an image.
  2. Crop and resize all human(pedestrian) and resize to 256x128 images.
  3. Put image to resnet-50 human feature embedding extractor and get a 128-D feature array.
  4. Compare two human by using euclidean distance, the distance means the similarity of two image.

Example code

import cv2
import api

img1 = cv2.imread('test/test1.png')[:,:,::-1]
img1_location = api.human_locations(img1)
img_1_human = api.crop_human(img1, img1_location)
human_1_1 = img_1_human[0]
human_1_1_vector = api.human_vector(human_1_1)
# Do another people, and compare

Add Mobilenet backbone support

Thanks to the original repo, I trained a mobilenet backbone model which can accerlerate the speed of human embedding. You can check the time difference between mobilenet and resnet-50

Also, attached is the mobilenet backbone pretrained model that I trained. Here is the google drive link: https://drive.google.com/file/d/1JoJJ-rIrqXNrzrx12Ih4zFk09SYsKINC/view?usp=sharing

And the evaluation score of the model is:

mAP: 66.28% | top-1: 83.11% top-2: 88.42% | top-5: 93.79% | top-10: 95.90%

GitHub Logo

Please use mobilenet branch and download the pretrained model from the link and replace original resnet model

Acknowledgement and reference

  1. https://github.com/VisualComputingInstitute/triplet-reid
  2. https://github.com/chuanqi305/MobileNet-SSD
  3. https://github.com/opencv/opencv/tree/master/samples/dnn
@article{HermansBeyer2017Arxiv,
  title       = {{In Defense of the Triplet Loss for Person Re-Identification}},
  author      = {Hermans*, Alexander and Beyer*, Lucas and Leibe, Bastian},
  journal     = {arXiv preprint arXiv:1703.07737},
  year        = {2017}
}
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].