pyramid ready for cape

This commit is contained in:
2023-05-22 12:44:43 +02:00
parent 6b81c0d1a6
commit 60844f8011
5 changed files with 321 additions and 9 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
import os
import sys
os.environ["CUDA_VISIBLE_DEVICES"] = '6'
# os.environ["CUDA_VISIBLE_DEVICES"] = '6'
import math
import time
@@ -69,7 +69,7 @@ class StaticCache():
uv_mask = torch.tensor(np.load('custom_data/garment_uv_mask_full.npy').astype(np.int32), device=device)
self.uv_masks[512] = uv_mask.to(torch.float32).cpu().numpy()
for res in [32, 64, 128, 256]:
down = Resize(size=(res, int(res/2)), interpolation=InterpolationMode.NEAREST)(uv_mask[None,:,:])
down = Resize(size=(res, int(res/2)), interpolation=InterpolationMode.NEAREST_EXACT)(uv_mask[None,:,:])
down = torch.squeeze(down).to(torch.float32)
self.uv_masks[res] = down.cpu().numpy()