About the API:
This API will detect if the person in the given image is wearing a mask or not.
This API will receive an image URL and it will deliver the analysis.
It will detect if the user is wearing a mask or not.
You need to focus on two parameters.
Mask and no_mask.
In this case, the user is wearing a mask since the result is closer to 1 and below 1.
If the result is above 1, it means it's false.
Security in the workplace: This API is ideal for those companies that require their workers to wear masks. You can develop a checkpoint at the entrance to detect that your employees are entering the building with their masks.
Public transport control: We know that the pandemic is not over. This API will help to detect if any passenger is not wearing a mask and prevent the disease to spread.
Besides API call limitations per month, there are no other limitations.
Performs actual image analysis and responds with results.
The image must be a regular JPEG or PNG image (with or without transparency). Usually such images have extensions: .jpg, .jpeg, .png.
image/jpegimage/pngThe size of the image file must be less than 16Mb.
How to read the parameters:
Mask and no_mask.
In this case, the user is wearing a mask since the result is closer to 1 and below 1.
If the result is above 1, it means it's false.
Analyze Image - Endpoint Features
| Object | Description |
|---|---|
url |
[Required] URL of the image you want to check. |
detection |
Optional Detection is enabled by default. |
{"results":[{"status":{"code":"ok","message":"Success"},"name":"https://assets2.cbsnewsstatic.com/hub/i/2021/12/16/f6d7364b-bb08-42eb-980b-5ea43238aa87/face-mask-brands.jpg","md5":"a60a146de34a292abce35fcb831a36f2","width":1280,"height":720,"entities":[{"kind":"objects","name":"med-mask-detector","objects":[{"box":[0.17611823081970215,0.0,0.7357337474822998,0.9957617865668402],"entities":[{"kind":"classes","name":"people-detector","classes":{"person":0.7737056612968445}},{"kind":"classes","name":"med-mask","classes":{"mask":0.9999998807907104,"nomask":1.5353623439295916e-07}}]}]}]}]}
curl --location --request POST 'https://zylalabs.com/api/368/masks+detection+api/294/analyze+image?url=https://assets2.cbsnewsstatic.com/hub/i/2021/12/16/f6d7364b-bb08-42eb-980b-5ea43238aa87/face-mask-brands.jpg&detection=true' --header 'Authorization: Bearer YOUR_API_KEY'
| Header | Description |
|---|---|
Authorization
|
[Required] Should be Bearer access_key. See "Your API Access Key" above when you are subscribed. |
No long-term commitment. Upgrade, downgrade, or cancel anytime. Free Trial includes up to 50 requests.
The Masks Detection API returns a JSON response containing the analysis of the provided image. It includes a status code, message, and details about whether the detected person is wearing a mask or not, along with confidence scores for each classification.
Key fields in the response include `status` (with `code` and `message`), `name` (image URL), `md5` (image hash), `width`, `height`, and `entities` (which contains detection results including mask status).
The response data is structured in a hierarchical format. It starts with a `results` array, containing objects that detail the analysis, including `status`, image metadata, and detection entities, which further break down the mask detection results.
The Masks Detection API accepts a single parameter: the image URL. Users must ensure the image is in JPEG or PNG format and under 16MB in size for successful analysis.
Users can utilize the returned data by checking the `mask` and `nomask` confidence scores. A score closer to 1 for `mask` indicates the person is wearing a mask, while a score above 1 for `nomask` indicates they are not.
Typical use cases include workplace safety checks to ensure employees wear masks, monitoring public transport for compliance, and enhancing security measures in crowded areas during health crises.
Data accuracy is maintained through advanced machine learning algorithms trained on diverse datasets. Continuous updates and improvements to the model help ensure reliable mask detection results.
Users can expect consistent patterns in the response, such as a clear distinction between mask and no-mask confidence scores. Typically, the `mask` score will be significantly higher when a mask is detected, while the `nomask` score will be minimal.
To obtain your API key, you first need to sign in to your account and subscribe to the API you want to use. Once subscribed, go to your Profile, open the Subscription section, and select the specific API. Your API key will be available there and can be used to authenticate your requests.
You can’t switch APIs during the free trial. If you subscribe to a different API, your trial will end and the new subscription will start as a paid plan.
If you don’t cancel before the 7th day, your free trial will end automatically and your subscription will switch to a paid plan under the same plan you originally subscribed to, meaning you will be charged and gain access to the API calls included in that plan.
The free trial ends when you reach 50 API requests or after 7 days, whichever comes first.
No, the free trial is available only once, so we recommend using it on the API that interests you the most. Most of our APIs offer a free trial, but some may not include this option.
Yes, we offer a 7-day free trial that allows you to make up to 50 API calls at no cost, so you can test our APIs without any commitment.
Zyla API Hub is like a big store for APIs, where you can find thousands of them all in one place. We also offer dedicated support and real-time monitoring of all APIs. Once you sign up, you can pick and choose which APIs you want to use. Just remember, each API needs its own subscription. But if you subscribe to multiple ones, you'll use the same key for all of them, making things easier for you.
Please have a look at our Refund Policy: https://zylalabs.com/terms#refund
Service Level:
100%
Response Time:
0ms
Service Level:
100%
Response Time:
0ms
Service Level:
100%
Response Time:
0ms
Service Level:
100%
Response Time:
0ms
Service Level:
100%
Response Time:
0ms
Service Level:
100%
Response Time:
949ms
Service Level:
100%
Response Time:
0ms
Service Level:
100%
Response Time:
856ms
Service Level:
89%
Response Time:
0ms
Service Level:
100%
Response Time:
1,428ms