Skip to content

Instantly share code, notes, and snippets.

View dyd1234's full-sized avatar
🎯
Focusing

dyd1234

🎯
Focusing
View GitHub Profile
@dyd1234
dyd1234 / model.yaml
Created January 23, 2025 13:44
Train for YOLO v5s with convering the detection head to linear layer
# Ultralytics YOLOv5 🚀, AGPL-3.0 license
# Hyperparameters for low-augmentation COCO training from scratch
# python train.py --batch 64 --cfg yolov5n6.yaml --weights '' --data coco.yaml --img 640 --epochs 300 --linear
# See tutorials for hyperparameter evolution https://github.com/ultralytics/yolov5#tutorials
lr0: 0.001 # initial learning rate (SGD=1E-2, Adam=1E-3)
lrf: 0.01 # final OneCycleLR learning rate (lr0 * lrf)
# lr0: 0.0002 # initial learning rate (SGD=1E-2, Adam=1E-3)
# lrf: 0.2 # final OneCycleLR learning rate (lr0 * lrf)
@dyd1234
dyd1234 / multi_repair.py
Created November 5, 2024 02:34
Repair for the rotation and scaling
# --------------------------------------------------------------------
# ... some modules and imports is not showing here
# --------------------------------------------------------------------
# REPAIR implementations
def is_batchnorm(module): #
return isinstance(module, nn.modules.batchnorm._BatchNorm)
# if we need to do with rotation?
# basic implementation
@dyd1234
dyd1234 / CSPDarknet-53.py
Created July 16, 2024 11:28
Darknet -53 and CSPDarknet-53 SCN with different implementations
import math
from collections import OrderedDict
import torch
import torch.nn as nn
import torch.nn.functional as F
from torchviz import make_dot
#-------------------------------------------------#