# Face mask detection: classifying image data

**URL:** <https://community.wolfram.com/t/face-mask-detection-classifying-image-data/17205>\
**Category:** Staff Picks\
**Tags:** biological-sciences, data-science, image-processing, medical-sciences, machine-learning, staff-pick, neural-networks, living-systems\
**Created:** [December 16, 2020, 1:03am UTC](https://community.wolfram.com/t/face-mask-detection-classifying-image-data/17205 "2020-12-16T01:03:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![siriasadeddin](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/siriasadeddin/32/28323_2.png) [@siriasadeddin](https://community.wolfram.com/u/siriasadeddin)\
**Post date:** [December 16, 2020, 1:03am UTC](https://community.wolfram.com/t/face-mask-detection-classifying-image-data/17205/1 "2020-12-16T01:03:33Z")

</div>

_MODERATOR NOTE: coronavirus resources & updates:_ [https://wolfr.am/coronavirus](https://wolfr.am/coronavirus)

* * *

[Open in Wolfram Cloud ↗](https://www.wolframcloud.com/obj/b7f4e88c-7c67-4e95-b8b8-e7e44244415d)

---

<div class="post-metadata">

**Author:** ![wolframcommunity](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/wolframcommunity/32/8335_2.png) [@wolframcommunity](https://community.wolfram.com/u/wolframcommunity)\
**Post date:** [December 16, 2020, 2:32pm UTC](https://community.wolfram.com/t/face-mask-detection-classifying-image-data/17205/2 "2020-12-16T14:32:04Z")

</div>

![news-congrads-kkluyshnik-02-04-19.jpg](https://global.discourse-cdn.com/wolfram/original/3X/6/a/6a310c2d0904616faf4e6e148260c9f29ab9f4eb.jpeg) – you have earned _ **Featured Contributor Badge** _ ![2015-11-02_10-07-11.png](https://global.discourse-cdn.com/wolfram/original/3X/5/0/50e59c9ead62f729e7130d3ea1482555a75602b6.png)  
Your exceptional post has been selected for our editorial column _ **Staff Picks** _ [http://wolfr.am/StaffPicks](http://wolfr.am/StaffPicks) and [Your Profile](http://community.wolfram.com/web/siriasadeddin) is now distinguished by a _ **Featured Contributor Badge** _ and is displayed on the [Featured Contributor Board](https://community.wolfram.com/people). Thank you!

---

<div class="post-metadata">

**Author:** ![giulioa](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/giulioa/32/18527_2.png) [@giulioa](https://community.wolfram.com/u/giulioa)\
**Post date:** [December 18, 2020, 3:59pm UTC](https://community.wolfram.com/t/face-mask-detection-classifying-image-data/17205/3 "2020-12-18T15:59:09Z")

</div>

Very nice fine tuning!

One small bit of code simplification could be

```
FindFaces[image, "Image", PaddingSize -> Scaled[0.1]]

```

instead of trimming in a separate steps. This way you can also add an arbitrary padding taken from the original image.

You can even take advantage of the built-in listability of the NN framework to write

```
trainedNet[FindFaces[image, "Image"]]

```

that will evaluate the net in batch mode and will be faster when `image` contains multiple faces.
