A PyTorch Implementation of Single Shot Scale-invariant Face Detector.

Overview

S³FD: Single Shot Scale-invariant Face Detector

A PyTorch Implementation of Single Shot Scale-invariant Face Detector.

Eval

python wider_eval_pytorch.py

cd eval/eval_tools_old-version
octave wider_eval_pytorch.m

Model

s3fd_convert.7z

Test

python test.py --model data/s3fd_convert.pth --path data/test01.jpg

output

References

SFD

Comments
  • RGB <-> BGR

    RGB <-> BGR

    From this line, I assume you use RGB: img = img - np.array([104,117,123])

    However opencv uses BGR, so this line returns BGR: if args.path=='CAMERA': ret, img = cap.read()

    Then BGR is fed to the network bboxlist = detect(net,img)

    I fed RGB to the network and got worse results. Is it possible that you meant RGB in all places but the network is actually trained for BGR? (If then it should be img = img - np.array([123,117,104]))

    opened by elbaro 3
  • How Convert Weights

    How Convert Weights

    Dear @clcarwin, Thank you for your nice work. Would you please tell me how you can convert Caffe weights and model of S3FD into PyTorch? Can you convert the model & pre-trained weights of RefineDet into PyTorch?

    opened by ahkarami 2
  • evaluation accuracy is not good as the original paper

    evaluation accuracy is not good as the original paper

    hi @clcarwin,

    I test you evaluation results on wider face as (easy 92.8, medium 91.5, hard 84.2). But with the original model provided by sfzhang15/SFD, I can get (easy 93.8, medium 92.4, hard 85.1).

    Did I test correctly? If so, why there is accuracy loss?

    Great work! Best,

    opened by marvis 2
  • 'float' object cannot be interpreted as an integer??

    'float' object cannot be interpreted as an integer??

    Sir,I'm sorry to disturb you about this object. I run this object on windows 10,python 3.5.2 ,pytorch 0.3. After : python test.py --model data/s3fd_convert.pth --path data/test01.jpg, the screen display: D:\Python\Pytorch_cw_sfd\SFD_pytorch>python test.py --model data/s3fd_convert.pth --path data/test01.jpg Traceback (most recent call last): File "test.py", line 71, in bboxlist = detect(net,img) File "test.py", line 27, in detect for i in range(len(olist)/2): olist[i2] = F.softmax(olist[i2]) TypeError: 'float' object cannot be interpreted as an integer

    Why ???

    opened by door5719 1
  • padding size of fc6

    padding size of fc6

    Hi @clcarwin,

    Why do you set the padding size of fc6 to 3? This is inconsistent with the original paper. See https://github.com/clcarwin/SFD_pytorch/blob/master/net_s3fd.py#L42

    Best,

    opened by marvis 1
  • Optimization

    Optimization

    Good: It is accurate.

    Bad: The inference time is more than 80 ms for realtime usage. To make it work for realtime image has to be resized to less than 200x200 which reduces accuracy.

    So in order to make it usable the only way is to make it faster. Have you tried using TensorRT or TVM or Pytorch serving in C++ ?

    opened by jamessmith90 0
  • Several speed & code updates

    Several speed & code updates

    Seems nobody's looking at PR's here, but letting others know I've made a number of improvements.

    It runs smoothly on modern pytorch (1.3) and refactored the code to eliminate redundant code. I also added some convenient methods that make it easier to do common things, like detect_faces. Also, added integration tests.

    I independently found the same speed-up as @kir-dan in https://github.com/clcarwin/SFD_pytorch/pull/4 and moved all that code into pytorch instead of numpy, so it can be fully run on GPU.

    opened by leopd 0
  • Very high GPU memory usage

    Very high GPU memory usage

    Hi, I have been running the model using test.py and modified it run multiple files. The GPU memory keeps on increasing,from 3gigs to 9 gigs. Is this due to poor garbage collection?

    opened by vaishnavm217 2
  • Change Anchor Boxes Aspect Ratio

    Change Anchor Boxes Aspect Ratio

    Dear @clcarwin, If one wants to change the aspect ratio of anchor boxes, must just changed the detect method in test.py? For example, line https://github.com/clcarwin/SFD_pytorch/blob/96fdfbe22eef176a04802d915834b82a131a854d/test.py#L39 or other methods moreover must changed?

    opened by ahkarami 0
  • About data augmentation

    About data augmentation

    When I use the Tensorflow to build the project, I have some trouble in data augmentation which describe in the paper. Can you tell the details of the data augmentation or show your data augmentation code to me. Thank you

    opened by ckqsars 0
Owner
carwin
carwin
Milano is a tool for automating hyper-parameters search for your models on a backend of your choice.

Milano (This is a research project, not an official NVIDIA product.) Documentation https://nvidia.github.io/Milano Milano (Machine learning autotuner

NVIDIA Corporation 147 Dec 17, 2022
Implementation of Memformer, a Memory-augmented Transformer, in Pytorch

Memformer - Pytorch Implementation of Memformer, a Memory-augmented Transformer, in Pytorch. It includes memory slots, which are updated with attentio

Phil Wang 60 Nov 06, 2022
Source code of our BMVC 2021 paper: AniFormer: Data-driven 3D Animation with Transformer

AniFormer This is the PyTorch implementation of our BMVC 2021 paper AniFormer: Data-driven 3D Animation with Transformer. Haoyu Chen, Hao Tang, Nicu S

24 Nov 02, 2022
A hue shift helper for OBS

obs-hue-shift A hue shift helper for OBS This is a repo based on the really nice script Hegemege made. The original script can be found https://gist.g

Alexis Tyler 1 Jan 10, 2022
Official Repository of NeurIPS2021 paper: PTR

PTR: A Benchmark for Part-based Conceptual, Relational, and Physical Reasoning Figure 1. Dataset Overview. Introduction A critical aspect of human vis

Yining Hong 32 Jun 02, 2022
PyTorch implementation of SampleRNN: An Unconditional End-to-End Neural Audio Generation Model

samplernn-pytorch A PyTorch implementation of SampleRNN: An Unconditional End-to-End Neural Audio Generation Model. It's based on the reference implem

DeepSound 261 Dec 14, 2022
Gender Classification Machine Learning Model using Sk-learn in Python with 97%+ accuracy and deployment

Gender-classification This is a ML model to classify Male and Females using some physical characterstics Data. Python Libraries like Pandas,Numpy and

Aryan raj 11 Oct 16, 2022
This GitHub repo consists of Code and Some results of project- Diabetes Treatment using Gold nanoparticles. These Consist of ML Models used for prediction Diabetes and further the basic theory and working of Gold nanoparticles.

GoldNanoparticles This GitHub repo consists of Code and Some results of project- Diabetes Treatment using Gold nanoparticles. These Consist of ML Mode

1 Jan 30, 2022
Junction Tree Variational Autoencoder for Molecular Graph Generation (ICML 2018)

Junction Tree Variational Autoencoder for Molecular Graph Generation Official implementation of our Junction Tree Variational Autoencoder https://arxi

Wengong Jin 418 Jan 07, 2023
exponential adaptive pooling for PyTorch

AdaPool: Exponential Adaptive Pooling for Information-Retaining Downsampling Abstract Pooling layers are essential building blocks of Convolutional Ne

Alexandros Stergiou 55 Jan 04, 2023
PyTorch common framework to accelerate network implementation, training and validation

pytorch-framework PyTorch common framework to accelerate network implementation, training and validation. This framework is inspired by works from MML

Dongliang Cao 3 Dec 19, 2022
The Pytorch implementation for "Video-Text Pre-training with Learned Regions"

Region_Learner The Pytorch implementation for "Video-Text Pre-training with Learned Regions" (arxiv) We are still cleaning up the code further and pre

Rui Yan 0 Mar 20, 2022
Implementation of Heterogeneous Graph Attention Network

HetGAN Implementation of Heterogeneous Graph Attention Network This is the code repository of paper "Prediction of Metro Ridership During the COVID-19

5 Dec 28, 2021
[CVPR'22] Official PyTorch Implementation of Collaborative Transformers for Grounded Situation Recognition

[CVPR'22] Collaborative Transformers for Grounded Situation Recognition Paper | Model Checkpoint This is the official PyTorch implementation of Collab

Junhyeong Cho 29 Dec 10, 2022
Código de um painel de auto atendimento feito em Python.

Painel de Auto-Atendimento O intuito desse projeto era fazer em Python um programa que simulasse um painel de auto atendimento, no maior estilo Mac Do

Calebe Alves Evangelista 2 Nov 09, 2022
Py-faster-rcnn - Faster R-CNN (Python implementation)

py-faster-rcnn has been deprecated. Please see Detectron, which includes an implementation of Mask R-CNN. Disclaimer The official Faster R-CNN code (w

Ross Girshick 7.8k Jan 03, 2023
Deep functional residue identification

DeepFRI Deep functional residue identification Citing @article {Gligorijevic2019, author = {Gligorijevic, Vladimir and Renfrew, P. Douglas and Koscio

Flatiron Institute 156 Dec 25, 2022
A pytorch implementation of Reading Wikipedia to Answer Open-Domain Questions.

DrQA A pytorch implementation of the ACL 2017 paper Reading Wikipedia to Answer Open-Domain Questions (DrQA). Reading comprehension is a task to produ

Runqi Yang 394 Nov 08, 2022
DeRF: Decomposed Radiance Fields

DeRF: Decomposed Radiance Fields Daniel Rebain, Wei Jiang, Soroosh Yazdani, Ke Li, Kwang Moo Yi, Andrea Tagliasacchi Links Paper Project Page Abstract

UBC Computer Vision Group 24 Dec 02, 2022
Libraries, tools and tasks created and used at DeepMind Robotics.

Libraries, tools and tasks created and used at DeepMind Robotics.

DeepMind 270 Nov 30, 2022