nickmuchi / yolos-small-finetuned-masks

huggingface.co
Total runs: 45
24-hour runs: 0
7-day runs: 1
30-day runs: -2
Model's Last Updated: March 21 2023
object-detection

Introduction of yolos-small-finetuned-masks

Model Details of yolos-small-finetuned-masks

YOLOS (small-sized) model

The original YOLOS model was fine-tuned on COCO 2017 object detection (118k annotated images). It was introduced in the paper You Only Look at One Sequence: Rethinking Transformer in Vision through Object Detection by Fang et al. and first released in this repository .

This model was further fine-tuned on the face mask dataset from Kaggle. The dataset consists of 853 images of people with annotations categorised as "with mask","without mask" and "mask not worn correctly". The model was trained for 200 epochs on a single GPU usins Google Colab

Model description

YOLOS is a Vision Transformer (ViT) trained using the DETR loss. Despite its simplicity, a base-sized YOLOS model is able to achieve 42 AP on COCO validation 2017 (similar to DETR and more complex frameworks such as Faster R-CNN).

Intended uses & limitations

You can use the raw model for object detection. See the model hub to look for all available YOLOS models.

How to use

Here is how to use this model:

from transformers import YolosFeatureExtractor, YolosForObjectDetection
from PIL import Image
import requests
url = 'https://drive.google.com/uc?id=1VwYLbGak5c-2P5qdvfWVOeg7DTDYPbro'
image = Image.open(requests.get(url, stream=True).raw)
feature_extractor = YolosFeatureExtractor.from_pretrained('nickmuchi/yolos-small-finetuned-masks')
model = YolosForObjectDetection.from_pretrained('nickmuchi/yolos-small-finetuned-masks')
inputs = feature_extractor(images=image, return_tensors="pt")
outputs = model(**inputs)
# model predicts bounding boxes and corresponding face mask detection classes
logits = outputs.logits
bboxes = outputs.pred_boxes

Currently, both the feature extractor and model support PyTorch.

Training data

The YOLOS model was pre-trained on ImageNet-1k and fine-tuned on COCO 2017 object detection , a dataset consisting of 118k/5k annotated images for training/validation respectively.

Training

This model was fine-tuned for 200 epochs on the face-mask-dataset .

Evaluation results

This model achieves an AP (average precision) of 53.2 .

Accumulating evaluation results...

IoU metric: bbox

Metrics Metric Parameter Location Dets Value
Average Precision (AP) @[ IoU=0.50:0.95 area= all maxDets=100 ] 0.273
Average Precision (AP) @[ IoU=0.50 area= all maxDets=100 ] 0.532
Average Precision (AP) @[ IoU=0.75 area= all maxDets=100 ] 0.257
Average Precision (AP) @[ IoU=0.50:0.95 area= small maxDets=100 ] 0.220
Average Precision (AP) @[ IoU=0.50:0.95 area=medium maxDets=100 ] 0.341
Average Precision (AP) @[ IoU=0.50:0.95 area= large maxDets=100 ] 0.545
Average Recall (AR) @[ IoU=0.50:0.95 area= all maxDets= 1 ] 0.154
Average Recall (AR) @[ IoU=0.50:0.95 area= all maxDets= 10 ] 0.361
Average Recall (AR) @[ IoU=0.50:0.95 area= all maxDets=100 ] 0.415
Average Recall (AR) @[ IoU=0.50:0.95 area= small maxDets=100 ] 0.349
Average Recall (AR) @[ IoU=0.50:0.95 area=medium maxDets=100 ] 0.469
Average Recall (AR) @[ IoU=0.50:0.95 area= large maxDets=100 ] 0.584

Runs of nickmuchi yolos-small-finetuned-masks on huggingface.co

45
Total runs
0
24-hour runs
0
3-day runs
1
7-day runs
-2
30-day runs

More Information About yolos-small-finetuned-masks huggingface.co Model

More yolos-small-finetuned-masks license Visit here:

https://choosealicense.com/licenses/apache-2.0

yolos-small-finetuned-masks huggingface.co

yolos-small-finetuned-masks huggingface.co is an AI model on huggingface.co that provides yolos-small-finetuned-masks's model effect (), which can be used instantly with this nickmuchi yolos-small-finetuned-masks model. huggingface.co supports a free trial of the yolos-small-finetuned-masks model, and also provides paid use of the yolos-small-finetuned-masks. Support call yolos-small-finetuned-masks model through api, including Node.js, Python, http.

yolos-small-finetuned-masks huggingface.co Url

https://huggingface.co/nickmuchi/yolos-small-finetuned-masks

nickmuchi yolos-small-finetuned-masks online free

yolos-small-finetuned-masks huggingface.co is an online trial and call api platform, which integrates yolos-small-finetuned-masks's modeling effects, including api services, and provides a free online trial of yolos-small-finetuned-masks, you can try yolos-small-finetuned-masks online for free by clicking the link below.

nickmuchi yolos-small-finetuned-masks online free url in huggingface.co:

https://huggingface.co/nickmuchi/yolos-small-finetuned-masks

yolos-small-finetuned-masks install

yolos-small-finetuned-masks is an open source model from GitHub that offers a free installation service, and any user can find yolos-small-finetuned-masks on GitHub to install. At the same time, huggingface.co provides the effect of yolos-small-finetuned-masks install, users can directly use yolos-small-finetuned-masks installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

yolos-small-finetuned-masks install url in huggingface.co:

https://huggingface.co/nickmuchi/yolos-small-finetuned-masks

Url of yolos-small-finetuned-masks

yolos-small-finetuned-masks huggingface.co Url

Provider of yolos-small-finetuned-masks huggingface.co

nickmuchi
ORGANIZATIONS

Other API from nickmuchi