Hard Hat Detection
Collection
3 items
•
Updated
from PIL import Image
#import requests
# Use a pipeline as a high-level helper
from transformers import pipeline
file_path = r"path/test01.jpg"
# from web
#url = 'https://...../forest.png'
#image = Image.open(requests.get(url, stream=True).raw)
# Open the image
image = Image.open(file_path)
#image.show()
pipe = pipeline("object-detection", model="uisikdag/autotrain-hardhat2-detr-resnet-50", use_fast=True)
output=pipe(image)
loss: 0.5812108516693115
map: 0.4039
map_50: 0.6359
map_75: 0.4688
map_small: 0.3909
map_medium: 0.4397
map_large: 0.4822
mar_1: 0.1689
mar_10: 0.574
mar_100: 0.6803
mar_small: 0.52
mar_medium: 0.6795
mar_large: 0.7603
Base model
facebook/detr-resnet-50