r/computervision • • Apr 25 '22

Showcase Spoofing detector using YoloV4 Tiny 3L

374 Upvotes

35 comments sorted by

24

u/Gloomy_Recognition_4 Apr 25 '22

It's a spoofing detector solution based on a Tiny YoloV4 3L that I made in my spare time. You can test my model online with your own images here:

https://modelplace.ai/models/spoofing-detector

You can find more information about the model here:

https://www.antal.ai/spoofing-detector-yolov4

If you would like to purchase this model, please send an email to [email protected] or [email protected]

Face Anti-Spoofing feature enables to prevent false facial verification by using a photo, video or a different substitute for an authorized person’s face.

This model can defend against facemask attack and video presentation attacks. Video attack is a sophisticated way to trick the face recognition systems, usually requiring a looped video of a victim’s face.

10

u/Firewolf420 Apr 25 '22

Wow there are just marketplaces for models these days?

3

u/Gloomy_Recognition_4 Apr 26 '22

Yes, modelplace is opencv.ai's webshop for neural networks. As far as I know, it is the first and so far the only one.

1

u/Firewolf420 Apr 26 '22

I feel like I'm witnessing something that's gonna eventually generate a lot of cash

4

u/ThePerfectCantelope Apr 25 '22

Yes and it is a huge market

0

u/[deleted] Apr 25 '22

[deleted]

2

u/Gloomy_Recognition_4 Apr 26 '22

This model is suitable for mask, image and video presentation attack prevention. It recognises two categories, real faces and fake faces.
If you print out a pictiure of your face or show it on a phone screen and hold it up to a camera, it should be identified as a spoofing attack by the network.

14

u/[deleted] Apr 25 '22

Is it infering from the bezel? If you hold an empty picture frame and look through it does it say spoof? If you hold that tablet close enough that you can’t see the bezel does it say real?

2

u/Gloomy_Recognition_4 Apr 26 '22

Hi,

I think I've pretty much answered your question here:
https://www.reddit.com/r/computervision/comments/ubmlca/comment/i68pgae/?utm_source=share&utm_medium=web2x&context=3

"Is it infering from the bezel?"

No, the network learned to spot the small details that distinguish a true face from a spoofing attack, but what exactly the net has learned is hard to tell.

If you hold an empty picture frame and look through it does it say spoof?

No

If you hold that tablet close enough that you can’t see the bezel does it say real?

No

If you want you can upload your own picture to test the model:

https://modelplace.ai/models/spoofing-detector

Use the 'test model' button below the sample image.

2

u/[deleted] Apr 26 '22

Thats awesome. Cool use case!

5

u/lazyfinger Apr 25 '22

Can you show it a recording of yourself with the current lightning conditions?

1

u/Gloomy_Recognition_4 Apr 26 '22

Here you can upload your own picture to test the model:

https://modelplace.ai/models/spoofing-detector

3

u/No_Inspection_5000 Apr 26 '22

Good job

2

u/Gloomy_Recognition_4 Apr 26 '22

Thank you! :)

1

u/exclaim_bot Apr 26 '22

Thank you! :)

You're welcome!

3

u/kifshssh Apr 26 '22

I don’t think he will share how he did it

2

u/Gloomy_Recognition_4 Apr 26 '22

As I would like to sell this model, I can't give you all the details, but you can find what is public on my website: https://www.antal.ai/

2

u/ErfanZekri Apr 25 '22

What does 3L means in name of YoloV4?

3

u/Gloomy_Recognition_4 Apr 26 '22

This is also a variant of YoloV4. The YoloV4 Tiny 3L differs from the YoloV4 Tiny in that the 3L version has 3 Yolo Layers while YoloV4 Tiny has only 2 yolo layers.

1

u/ErfanZekri Apr 26 '22

Thank you so much! I figured it out.

9

u/Steel_stamped_penis Apr 26 '22

3 Litre. Its a diesel powered AI

3

u/[deleted] Apr 26 '22

And there’s top end YoloV12 model for better performance(accuracy) ;)

1

u/wxgi123 Apr 26 '22

How much does it sell for? I don't want to make an account at the moment.

I teach. I am wondering if some of my students may be cheating by buying solutions like this.

1

u/Gloomy_Recognition_4 Apr 26 '22 edited Apr 26 '22

Hi,

It's not have a fixed price, I make offers to everyone and the price is negotiable. If you're interested, you can email me at [email protected] and we'll discuss it.

1

u/Plastic-Ad4239 Apr 26 '22

great job. may I ask what dataset did you use for the anti-spoofing part? is it a private dataset or a public one?

1

u/Hot-Painter4924 Apr 26 '22

No spoof detection is really robust without 3D sensing or outrageous big dataset. The model is inferring through the color intensity/distribution what is fake and what is real. The problem is that this is not robust to different environments, light variations, lower brightness on the tablet, printed pictures, and even for diverse ethnicity.

1

u/appDeveloperGuy1 Apr 26 '22

I’d like to see you hold the iPads closer to the camera, such that you cannot see the frame of the iPad.

0

u/[deleted] Apr 26 '22

[deleted]

1

u/Gloomy_Recognition_4 Apr 26 '22

Here you can upload your own picture to test the model:

https://modelplace.ai/models/spoofing-detector

Use the 'test model' button below the sample image.

46

u/[deleted] Apr 25 '22 edited Apr 25 '22

[removed] — view removed comment

4

u/Gloomy_Recognition_4 Apr 26 '22

This is a YoloV4 Tiny 3L model, which I have trained for 2 categories, real faces and fake faces (spoofing). The fake faces category included print and video presentation attack images.If you print out a pictiure of your face or show it on a phone screen and hold it up to a camera, it should be identified as a spoofing attack by the network.I have implemented this solution with Tiny Yolov4, Tiny YoloV4 3L and YoloV4 too. The Tiny YoloV4 3L has three yolo layers, exactly the same as the YoloV4. For this reason, it is slower than the tiny YoloV4, but more sensitive to small details and can achieve the same accuracy as the YoloV4. But in terms of speed it is about six times faster than YoloV4 so it can be used on weaker hardware.So basically, there is no significant difference between the Tiny YoloV4 3L and the YoloV4 in this case, but the Tiny YoloV4 3L is smaller and faster. 😉

2

u/eidbbe92jy Apr 26 '22 edited Apr 26 '22

no, you really dont know what happen midway, he feeds a bunch of real and spoof into the model and start training, what you know for sure is, it can tell that dude is a real dude or a spoof dude.

Also if you only train it with real vs spoof, its not very useful in deployment, because if you feed it with a cat and ask what it is, it will tell you that there is 33% its a real dude, 67% is a spoof dude.

You need to train it with mass amount of data to get a usable model that can detect, [is there a real dude] [how likely its going to be a real dude], [is there a spoof dude] [how likely its going to be a spoof dude]. [Is there other stuff that is not a dude] However its pretty fun for presentation purpose.

8

u/Gloomy_Recognition_4 Apr 26 '22

Hi, the first half of what you wrote is correct, but the second half is not. This is not a classifier but an object detector that detects real and fake faces. It returns for each real/false face a bounding box and a confidence level. If you give it a cat image, it will not find a face and will not return a result.

5

u/het_schaap Apr 25 '22

+1, I'd love to hear how you did this!

3

u/b1ack1323 Apr 26 '22

There’s some depth detection can lighting detection going on.