Spaces:
Sleeping
Sleeping
File size: 615 Bytes
8f490e0 8b54636 8f490e0 8b54636 8f490e0 8b54636 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
from ds1 import PatchDataset
from torch.utils.data import DataLoader
from torchvision.transforms import Normalize
import numpy as np
import torch
ffile = '/Users/dennistrujillo/Downloads/park_sam_cx5b_s0_ff_with_Pb_000402.ge3'
dfile = '/Users/dennistrujillo/Downloads/dark_before_000384.ge3'
bs = 1
dataset = PatchDataset(ffile, dfile, nFrames=1440)
patches_array = np.array(dataset.patches)
fnum_array = np.array(dataset.f_nums)
print(len(dataset))
index_numbers = list(range(len(dataset.patches)))
p_dict = dict(zip(index_numbers,zip(dataset.f_nums,dataset.patches)))
torch.save(p_dict,'patches_402.pt')
|