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
4K videos with annotated masks in our ICCV2021 paper 'Internal Video Inpainting by Implicit Long-range Propagation'.

Annotated 4K Videos paper | project website | code | demo video 4K videos with annotated object masks in our ICCV2021 paper: Internal Video Inpainting

Tengfei Wang 21 Nov 05, 2022
torchbearer: A model fitting library for PyTorch

Note: We're moving to PyTorch Lightning! Read about the move here. From the end of February, torchbearer will no longer be actively maintained. We'll

631 Jan 04, 2023
A PyTorch Implementation of Single Shot MultiBox Detector

SSD: Single Shot MultiBox Object Detector, in PyTorch A PyTorch implementation of Single Shot MultiBox Detector from the 2016 paper by Wei Liu, Dragom

Max deGroot 4.8k Jan 07, 2023
Multi-Horizon-Forecasting-for-Limit-Order-Books

Multi-Horizon-Forecasting-for-Limit-Order-Books This jupyter notebook is used to demonstrate our work, Multi-Horizon Forecasting for Limit Order Books

Zihao Zhang 116 Dec 23, 2022
The official repo for OC-SORT: Observation-Centric SORT on video Multi-Object Tracking. OC-SORT is simple, online and robust to occlusion/non-linear motion.

OC-SORT Observation-Centric SORT (OC-SORT) is a pure motion-model-based multi-object tracker. It aims to improve tracking robustness in crowded scenes

Jinkun Cao 325 Jan 05, 2023
Kohei's 5th place solution for xview3 challenge

xview3-kohei-solution Usage This repository assumes that the given data set is stored in the following locations: $ ls data/input/xview3/*.csv data/in

Kohei Ozaki 2 Jan 17, 2022
ROCKET: Exceptionally fast and accurate time series classification using random convolutional kernels

ROCKET + MINIROCKET ROCKET: Exceptionally fast and accurate time series classification using random convolutional kernels. Data Mining and Knowledge D

298 Dec 26, 2022
Implementation of self-attention mechanisms for general purpose. Focused on computer vision modules. Ongoing repository.

Self-attention building blocks for computer vision applications in PyTorch Implementation of self attention mechanisms for computer vision in PyTorch

AI Summer 962 Dec 23, 2022
Airborne Optical Sectioning (AOS) is a wide synthetic-aperture imaging technique

AOS: Airborne Optical Sectioning Airborne Optical Sectioning (AOS) is a wide synthetic-aperture imaging technique that employs manned or unmanned airc

JKU Linz, Institute of Computer Graphics 39 Dec 09, 2022
Architecture Patterns with Python (TDD, DDD, EDM)

architecture-traning Architecture Patterns with Python (TDD, DDD, EDM) Chapter 5. 높은 기어비와 낮은 기어비의 TDD 5.2 도메인 계층 테스트를 서비스 계층으로 옮겨야 하는가? 도메인 계층 테스트 def

minsung sim 2 Mar 04, 2022
Code for Max-Margin Contrastive Learning - AAAI 2022

Max-Margin Contrastive Learning This is a pytorch implementation for the paper Max-Margin Contrastive Learning accepted to AAAI 2022. This repository

Anshul Shah 12 Oct 22, 2022
Official PyTorch implementation of the paper Image-Based CLIP-Guided Essence Transfer.

TargetCLIP- official pytorch implementation of the paper Image-Based CLIP-Guided Essence Transfer This repository finds a global direction in StyleGAN

Hila Chefer 221 Dec 13, 2022
A collection of models for image<->text generation in ACM MM 2021.

Bi-directional Image and Text Generation UMT-BITG (image & text generator) Unifying Multimodal Transformer for Bi-directional Image and Text Generatio

Multimedia Research 63 Oct 30, 2022
A python package for generating, analyzing and visualizing building shadows

pybdshadow Introduction pybdshadow is a python package for generating, analyzing and visualizing building shadows from large scale building geographic

Qing Yu 13 Nov 30, 2022
Mercer Gaussian Process (MGP) and Fourier Gaussian Process (FGP) Regression

Mercer Gaussian Process (MGP) and Fourier Gaussian Process (FGP) Regression We provide the code used in our paper "How Good are Low-Rank Approximation

Aristeidis (Ares) Panos 0 Dec 13, 2021
A baseline code for VSPW

A baseline code for VSPW Preparation Download VSPW dataset The VSPW dataset with extracted frames and masks is available here.

28 Aug 22, 2022
How to use TensorLayer

How to use TensorLayer While research in Deep Learning continues to improve the world, we use a bunch of tricks to implement algorithms with TensorLay

zhangrui 349 Dec 07, 2022
Collection of generative models in Tensorflow

tensorflow-generative-model-collections Tensorflow implementation of various GANs and VAEs. Related Repositories Pytorch version Pytorch version of th

3.8k Dec 30, 2022
Repository for the "Gotta Go Fast When Generating Data with Score-Based Models" paper

Gotta Go Fast When Generating Data with Score-Based Models This repo contains the official implementation for the paper Gotta Go Fast When Generating

Alexia Jolicoeur-Martineau 89 Nov 09, 2022
A unofficial pytorch implementation of PAN(PSENet2): Efficient and Accurate Arbitrary-Shaped Text Detection with Pixel Aggregation Network

Efficient and Accurate Arbitrary-Shaped Text Detection with Pixel Aggregation Network Requirements pytorch 1.1+ torchvision 0.3+ pyclipper opencv3 gcc

zhoujun 400 Dec 26, 2022