Yolov5修改损失函数

news/2024/7/10 22:48:56 标签: YOLO, 深度学习, python

Yolov5修改损失函数,主要是修改如下三个py文件:train.py、val.py、loss.py

一、train.py

python">
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license
"""
Train a YOLOv5 model on a custom dataset.
Models and datasets download automatically from the latest YOLOv5 release.

Usage - Single-GPU training:
    $ python train.py --data coco128.yaml --weights yolov5s.pt --img 640  # from pretrained (recommended)
    $ python train.py --data coco128.yaml --weights '' --cfg yolov5s.yaml --img 640  # from scratch

Usage - Multi-GPU DDP training:
    $ python -m torch.distributed.run --nproc_per_node 4 --master_port 1 train.py --data coco128.yaml --weights yolov5s.pt --img 640 --device 0,1,2,3

Models:     https://github.com/ultralytics/yolov5/tree/master/models
Datasets:   https://github.com/ultralytics/yolov5/tree/master/data
Tutorial:   https://github.com/ultr

http://www.niftyadmin.cn/n/5158111.html

相关文章

Linux 操作系统基础知识总结

1、操作系统总体介绍 CPU: 就像人的大脑,主要负责相关事情的判断以及实际处理的机制。 查询指令: cat /proc/cpuinfo 内存: 大脑中的记忆区块,将皮肤、眼睛等所收集到的信息记录起来的地方,以供CPU进行…

RabbitMQ常用命令(一)

启动和关闭 1、启动RabbitMQ rabbitmq-server start & 注意:这里可能会出现错误,错误原因是/var/lib/rabbitmq/.erlang.cookie文件权限不够。 解决方案对这个文件授权 chown rabbitmq:rabbitmq /var/lib/rabbitmq/.erlang.cookie chmod 400 /va…

AUTOSAR汽车电子嵌入式编程精讲300篇-FlexRay通信协议

目录 一、FlexRay介绍 1.1 汽车网络通信协议综述 1.2 FlexRay特点 1.3 FlexRay协会 1.4 FlexRay应用

自用工具类整理

自动生成数据 uuid&雪花id private static Long workerId 1L; private static Long datacenterId 1L; private static Snowflake snowflake IdUtil.createSnowflake(workerId, datacenterId);public static String getId(String idType) {if (idType.equals("uui…

【STM32】定时器

systick定时器: 【STM32】Systick定时器-CSDN博客 1.STM32的定时器学习要点 参考手册 STM32F1xx中文参考手册.pdf 林何/STM32F103C8 - 码云 - 开源中国 (gitee.com) 1.通用定时器和其他的区别 1)其实最多可以有17个定时器 2)功能差别 2…

telnet的使用

用于查看 某个ip某个端口通不通 telnet 136.126.122.123 6380 这个代表通了

LeetCode每日一题——2586. Count the Number of Vowel Strings in Range

文章目录 一、题目二、题解 一、题目 You are given a 0-indexed array of string words and two integers left and right. A string is called a vowel string if it starts with a vowel character and ends with a vowel character where vowel characters are ‘a’, ‘…

一行代码解决WINFORM因为系统放大导致的布局混乱

c#一行代码解决WINFORM因为系统放大导致的布局混乱 public FrmMain() { AutoScaleMode AutoScaleMode.Dpi; //这个 InitializeComponent(); }