整合去雾网页工具

This commit is contained in:
admin
2026-06-10 17:42:11 +08:00
commit 6db15ebc3f
101 changed files with 10167 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
import io
import os
import utils
import struct
from PIL import Image
class FolderLoader(object):
def __init__(self, fold_path):
super(FolderLoader, self).__init__()
self.fold_path = fold_path
self.img_paths = utils.make_dataset(self.fold_path)
self.img_names = [os.path.basename(x) for x in self.img_paths]
def __getitem__(self, index):
img = Image.open(self.img_paths[index])#.convert('RGB')
return self.img_names[index], img
def __len__(self):
return len(self.img_names)