Downloads · 30 days
0
cagey-squirrel/YOLOv5-Reward-driven-loss
YOLOv5-Reward-driven-loss is a machine learning model from cagey-squirrel. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This model is a YOLOv5 model adapted for screen time estimation where object from each class can appear at most once per image. Loss function has been changed to follow a reward-driven mindset. Motivation and implemen…
Downloads · 30 days
0
Access
Public
Updated Nov 21, 2023
Repo size
—
Likes
0
Public
Click a slice to open those files.
.py669 KB · 37%
From the Hugging Face model README
This model is a YOLOv5 model adapted for screen time estimation where object from each class can appear at most once per image. Loss function has been changed to follow a reward-driven mindset. Motivation and implementation decisions are explained in paper [will be linked as soon as it is published on IEEE].
Other than usual YOLOv5 parameters, this implementation adds a few new ones:
# Arguments added for screen time estimation task
parser.add_argument('--iou_treshold', type=float, default=0.0, help='IoU treshold for deciding if prediction is good')
parser.add_argument('--confidence_treshold', type=float, default=0.0, help='Confidence treshold for deciding if prediction is good')
parser.add_argument('--loss_function', type=str, choices=['ordinary', 'ignore', 'motivate'], default='motivate', help='Which loss function to use')
parser.add_argument('--class_wise_nms', type=bool, default=True, help='To use class wise non max surpression or not')
from train import run
def main():
conf_th = 0.05
iou_th = 0.80
data = 'sign_language.yaml'
loss_function = 'ordinary'
run(imgsz=640, epochs=100, data=data, weights='', cfg='models/yolov5s.yaml', patience=0, confidence_treshold=conf_th, iou_treshold=iou_th, loss_function=loss_function, class_wise_nms=True)
if __name__ == "__main__":
main()