add project files

This commit is contained in:
Matt Arnold 2022-09-10 22:32:31 -04:00
parent 99b690e83e
commit 16fe0d8792
17 changed files with 29 additions and 0 deletions

BIN
frame_0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 KiB

BIN
frame_1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 KiB

BIN
frame_2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 KiB

BIN
frame_3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 KiB

BIN
frame_4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 KiB

BIN
frame_5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 529 KiB

BIN
frame_6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 KiB

BIN
frame_7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 KiB

29
gridify.py Normal file
View File

@ -0,0 +1,29 @@
#!/usr/bin/env python3
# make a 3x3 grid of all pngs in current directory
# requires pytorch
# License AGPLv3
import os
import torch
import torchvision
from torchvision.io import read_image
from torchvision.utils import make_grid
filenames = []
for n in os.listdir('.'):
if n.endswith('.png'):
filenames.append(n)
cells = []
for n in filenames:
cells.append(read_image(n))
print(len(cells))
grid = make_grid(cells, nrow=3)
print("size of grid:", grid.size())
img = torchvision.transforms.ToPILImage()(grid)
img.show()
img.save(f'tenowls.png')

BIN
owl10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 639 KiB

BIN
tenowls.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

BIN
tenowls_1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 KiB

BIN
tenowls_2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 480 KiB

BIN
tenowls_3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 KiB

BIN
tenowls_6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 KiB

BIN
tenowls_7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 421 KiB

BIN
tenowls_8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 KiB