MCPcopy Create free account
hub / github.com/MotrixLab/AiOS / __init__

Method __init__

datasets/INFERENCE_BEDLAM.py:18–26  ·  view source on GitHub ↗
(self, img_dir=None, out_path=None)

Source from the content-addressed store, hash-verified

16
17class INFERENCE_BEDLAM(torch.utils.data.Dataset):
18 def __init__(self, img_dir=None, out_path=None):
19 self.img_dir = os.path.join(img_dir, '**/*.png')
20 self.out_path = out_path
21 self.img_paths = sorted(glob(self.img_dir,recursive=True))
22
23 self.score_threshold = cfg.threshold if 'threshold' in cfg else 0.85
24 self.resolution = [720,1280]
25 self.format = DefaultFormatBundle()
26 self.normalize = Normalize(mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375])
27
28 def __len__(self):
29 return len(self.img_paths)

Callers

nothing calls this directly

Calls 2

DefaultFormatBundleClass · 0.90
NormalizeClass · 0.90

Tested by

no test coverage detected