Skip to content

Commit 22a7905

Browse files
committed
update: add run data generator script
1 parent 175467a commit 22a7905

File tree

3 files changed

+5
-15
lines changed

3 files changed

+5
-15
lines changed

ns_vfs/generator/data_generator.py

+1-12
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import random
55

66
from ns_vfs.data.frame import BenchmarkLTLFrame
7-
from ns_vfs.loader.benchmark_image import BenchmarkImageLoader, Cifar10ImageLoader
7+
from ns_vfs.loader.benchmark_image import BenchmarkImageLoader
88

99

1010
class DataGenerator(abc.ABC):
@@ -110,14 +110,3 @@ def ltl_function(
110110
)
111111

112112
return ltl_frame
113-
114-
115-
if __name__ == "__main__":
116-
cifar_dir = (
117-
"/opt/Neuro-Symbolic-Video-Frame-Search/artifacts/data/benchmark_image_dataset/cifar-10-batches-py"
118-
)
119-
cifar_video_generator = BenchmarkVideoGenerator(
120-
image_data_loader=Cifar10ImageLoader(cifar_dir_path=cifar_dir)
121-
)
122-
cifar_video_generator.generate(max_number_frame=50)
123-
print("Hello World!")

ns_vfs/loader/benchmark_image.py

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212

1313
class BenchmarkImageLoader(DataLoader):
14+
"""Benchmark image loader."""
15+
1416
class_labels: list
1517
data: BenchmarkRawImage
1618

@@ -81,6 +83,7 @@ def load_data(self, data_path, load_all_batch: bool = False) -> dict:
8183
return data
8284

8385
def unpickle(self, file):
86+
"""Unpickle CIFAR image data."""
8487
import pickle
8588

8689
with open(file, "rb") as fo:

run_diffusion_model.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@
2424

2525
pix_2_pix = PixToPix(config=config)
2626

27-
loaded_data = np.load(
28-
os.path.join(artifact_path, "frame_window_automata.npy"), allow_pickle=True
29-
).item()
27+
loaded_data = np.load(os.path.join(artifact_path, "frame_window_automata.npy"), allow_pickle=True).item()
3028
i = 0
3129
for key, value in loaded_data.items():
3230
if value.verification_result == "true":

0 commit comments

Comments
 (0)