From f56e5634deeba436f9e53c39a4a23c8a42422f30 Mon Sep 17 00:00:00 2001 From: MSXYZ-GenAI Date: Fri, 17 Apr 2026 02:09:24 +0300 Subject: [PATCH] perf: optimize memory and performance --- VideoTAADLAA.py | 1 + 1 file changed, 1 insertion(+) diff --git a/VideoTAADLAA.py b/VideoTAADLAA.py index 64127e7..bf096c2 100644 --- a/VideoTAADLAA.py +++ b/VideoTAADLAA.py @@ -177,6 +177,7 @@ class VideoTAADLAA: sx, sy = F.conv2d(gray, net.sobel_x, padding=1), F.conv2d(gray, net.sobel_y, padding=1) # Hipotenüs hesabı ile net kenar şiddeti bulunur + # NaN oluşumunu önlemek için küçük epsilon eklenir edge = torch.sqrt(sx*sx + sy*sy + 1e-6) # Belirlenen eşik (threshold) değerine göre maske oluşturulur