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
A trashy useless Latin programming language written in python.

Codigum! The first programming langage in latin! (please keep your eyes closed when if you read the source code) It is pretty useless though. Document

Bic 2 Oct 25, 2021
Rainbow: Combining Improvements in Deep Reinforcement Learning

Rainbow Rainbow: Combining Improvements in Deep Reinforcement Learning [1]. Results and pretrained models can be found in the releases. DQN [2] Double

Kai Arulkumaran 1.4k Dec 29, 2022
Topic Discovery via Latent Space Clustering of Pretrained Language Model Representations

TopClus The source code used for Topic Discovery via Latent Space Clustering of Pretrained Language Model Representations, published in WWW 2022. Requ

Yu Meng 63 Dec 18, 2022
Dynamics-aware Adversarial Attack of 3D Sparse Convolution Network

Leaded Gradient Method (LGM) This repository contains the PyTorch implementation for paper Dynamics-aware Adversarial Attack of 3D Sparse Convolution

An Tao 2 Oct 18, 2022
RAANet: Range-Aware Attention Network for LiDAR-based 3D Object Detection with Auxiliary Density Level Estimation

RAANet: Range-Aware Attention Network for LiDAR-based 3D Object Detection with Auxiliary Density Level Estimation Anonymous submission Abstract 3D obj

30 Sep 16, 2022
A framework for annotating 3D meshes using the predictions of a 2D semantic segmentation model.

Semantic Meshes A framework for annotating 3D meshes using the predictions of a 2D semantic segmentation model. Paper If you find this framework usefu

Florian 40 Dec 09, 2022
Learning Chinese Character style with conditional GAN

zi2zi: Master Chinese Calligraphy with Conditional Adversarial Networks Introduction Learning eastern asian language typefaces with GAN. zi2zi(字到字, me

Yuchen Tian 2.2k Jan 02, 2023
PySlowFast: video understanding codebase from FAIR for reproducing state-of-the-art video models.

PySlowFast PySlowFast is an open source video understanding codebase from FAIR that provides state-of-the-art video classification models with efficie

Meta Research 5.3k Jan 03, 2023
计算机视觉中用到的注意力模块和其他即插即用模块PyTorch Implementation Collection of Attention Module and Plug&Play Module

PyTorch实现多种计算机视觉中网络设计中用到的Attention机制,还收集了一些即插即用模块。由于能力有限精力有限,可能很多模块并没有包括进来,有任何的建议或者改进,可以提交issue或者进行PR。

PJDong 599 Dec 23, 2022
Repository for scripts and notebooks from the book: Programming PyTorch for Deep Learning

Repository for scripts and notebooks from the book: Programming PyTorch for Deep Learning

Ian Pointer 368 Dec 17, 2022
PyTorch implementations of the paper: "DR.VIC: Decomposition and Reasoning for Video Individual Counting, CVPR, 2022"

DRNet for Video Indvidual Counting (CVPR 2022) Introduction This is the official PyTorch implementation of paper: DR.VIC: Decomposition and Reasoning

tao han 35 Nov 22, 2022
2021 Artificial Intelligence Diabetes Datathon

A.I.D.D. 2021 2021 Artificial Intelligence Diabetes Datathon A.I.D.D. 2021은 ‘2021 인공지능 학습용 데이터 구축사업’을 통해 만들어진 학습용 데이터를 활용하여 당뇨병을 효과적으로 예측할 수 있는가에 대한 A

2 Dec 27, 2021
Massively parallel Monte Carlo diffusion MR simulator written in Python.

Disimpy Disimpy is a Python package for generating simulated diffusion-weighted MR signals that can be useful in the development and validation of dat

Leevi 16 Nov 11, 2022
MinHash, LSH, LSH Forest, Weighted MinHash, HyperLogLog, HyperLogLog++, LSH Ensemble

datasketch: Big Data Looks Small datasketch gives you probabilistic data structures that can process and search very large amount of data super fast,

Eric Zhu 1.9k Jan 07, 2023
Advances in Neural Information Processing Systems (NeurIPS), 2020.

What is being transferred in transfer learning? This repo contains the code for the following paper: Behnam Neyshabur*, Hanie Sedghi*, Chiyuan Zhang*.

Google Research 36 Aug 26, 2022
Tree Nested PyTorch Tensor Lib

DI-treetensor treetensor is a generalized tree-based tensor structure mainly developed by OpenDILab Contributors. Almost all the operation can be supp

OpenDILab 167 Dec 29, 2022
Finetune SSL models for MOS prediction

Finetune SSL models for MOS prediction This is code for our paper under review for ICASSP 2022: "Generalization Ability of MOS Prediction Networks" Er

Yamagishi and Echizen Laboratories, National Institute of Informatics 32 Nov 22, 2022
PyTorch GPU implementation of the ES-RNN model for time series forecasting

Fast ES-RNN: A GPU Implementation of the ES-RNN Algorithm A GPU-enabled version of the hybrid ES-RNN model by Slawek et al that won the M4 time-series

Kaung 305 Jan 03, 2023
Connecting Java/ImgLib2 + Python/NumPy

imglyb imglyb aims at connecting two worlds that have been seperated for too long: Python with numpy Java with ImgLib2 imglyb uses jpype to access num

ImgLib2 29 Dec 21, 2022
OCRA (Object-Centric Recurrent Attention) source code

OCRA (Object-Centric Recurrent Attention) source code Hossein Adeli and Seoyoung Ahn Please cite this article if you find this repository useful: For

Hossein Adeli 2 Jun 18, 2022