nagadomi 9 anni fa
parent
commit
eea4c31d7b
2 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 2 2
      lib/data_augmentation.lua
  2. 1 1
      lib/pairwise_transform.lua

+ 2 - 2
lib/data_augmentation.lua

@@ -54,8 +54,8 @@ end
 function data_augmentation.unsharp_mask(src, p)
    if torch.uniform() < p then
       local radius = 0 -- auto
-      local sigma = torch.uniform(0.7, 3.0)
-      local amount = torch.uniform(0.25, 0.75)
+      local sigma = torch.uniform(0.5, 1.5)
+      local amount = torch.uniform(0.1, 0.9)
       local threshold = torch.uniform(0.0, 0.05)
       local unsharp = gm.Image(src, "RGB", "DHW"):
 	 unsharpMask(radius, sigma, amount, threshold):

+ 1 - 1
lib/pairwise_transform.lua

@@ -208,7 +208,7 @@ function pairwise_transform.jpeg(src, style, level, size, offset, n, options)
       end
    elseif style == "photo" then
       -- level adjusting by -nr_rate
-      return pairwise_transform.jpeg_(src, {torch.random(50, 75)},
+      return pairwise_transform.jpeg_(src, {torch.random(30, 70)},
 				      size, offset, n,
 				      options)
    else