stylegan3/Snapshot_images.ipynb
2022-11-25 19:54:23 +01:00

3.8 MiB

Overview of snapshots

In [ ]:

In [1]:
import tabulate
In [2]:
%run ThisPlaceDoesExist.ipynb
In [3]:
tabulate.tabulate([{"idx": i, **run.get_summary()} for i, run in enumerate(runs)], tablefmt='html', headers="keys", colalign=("left","left"))
Out[3]:
idx nr dataset conditional resolution gammaduration iterations last_fid
0 00001paris3 True 256 8.23 days, 10:34:26 2600 502.277
1 00002paris3 True 256 2 5 days, 3:43:08 6560 190.346
2 00003paris3 True 256 2 18 days, 13:01:50 25000 42.9661
3 00004paris3 False 256 2 15 days, 16:13:20 22800 15.6691
4 00009paris3-1024.zip False 1024 32 0:00:00 0 549.99
5 00010paris3-1024.zip False 1024 32 50 days, 3:15:24 15200 33.2466
6 00011paris3-1024.zip False 1024 10 5 days, 18:48:04 1760 200.356
7 00014paris3-cropped-256False 256 8 2 days, 20:08:22 4160 20.1699
8 00016paris3-cropped-256False 256 8 7 days, 20:55:54 11520 16.5185
In [4]:
display(
    runs[-1].snapshots[-20].time.isoformat(),
    runs[-1].snapshots[-20].get_preview_img(7,1),
    
    runs[-1].snapshots[-5].time.isoformat(),
    runs[-1].snapshots[-5].get_preview_img(7,1),
    
    runs[-1].snapshots[-2].time.isoformat(),
    runs[-1].snapshots[-2].get_preview_img(7,1),
    
    runs[-1].snapshots[-1].time.isoformat(),
    runs[-1].snapshots[-1].get_preview_img(7,1)
)
'2022-11-23T14:38:03'
'2022-11-25T06:00:35'
'2022-11-25T13:52:48'
'2022-11-25T16:30:32'
In [32]:
# vertical_size = 256
# nth_snapshot = 5 # only show one very x snapshots (1 to show all)

# exclude_runs = [0,1]

# for i, run in enumerate(runs):
#     if i in exclude_runs:
#         continue
#     display(md(f"## {run.id}"))
#     for j, snapshot in enumerate(run.snapshots):
#         if j % nth_snapshot != 0:
#             continue
#         # if 
#         img = snapshot.get_preview_img(5,1)
#         img = img.resize((int(img.size[0] / (img.size[1]/vertical_size)), vertical_size))
#         print(f"{j}: {snapshot.iteration_str}")
#         display(img)