root
commited on
Commit
•
3fb9b9e
1
Parent(s):
bb24554
add npp
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitattributes +2 -0
- add_caption.ipynb +126 -0
- collage_shinyblender/newimg/image000.jpg +0 -0
- collage_shinyblender/newimg/image001.jpg +0 -0
- collage_shinyblender/newimg/image002.jpg +0 -0
- collage_shinyblender/newimg/image003.jpg +0 -0
- collage_shinyblender/newimg/image004.jpg +0 -0
- collage_shinyblender/newimg/image005.jpg +0 -0
- collage_shinyblender/newimg/image006.jpg +0 -0
- collage_shinyblender/newimg/image007.jpg +0 -0
- collage_shinyblender/newimg/image008.jpg +0 -0
- collage_shinyblender/newimg/image009.jpg +0 -0
- collage_shinyblender/newimg/image010.jpg +0 -0
- collage_shinyblender/newimg/image011.jpg +0 -0
- collage_shinyblender/newimg/image012.jpg +0 -0
- collage_shinyblender/newimg/image013.jpg +0 -0
- collage_shinyblender/newimg/image014.jpg +0 -0
- collage_shinyblender/newimg/image015.jpg +0 -0
- collage_shinyblender/newimg/image016.jpg +0 -0
- collage_shinyblender/newimg/image017.jpg +0 -0
- collage_shinyblender/newimg/image018.jpg +0 -0
- collage_shinyblender/newimg/image019.jpg +0 -0
- collage_shinyblender/newimg/image020.jpg +0 -0
- collage_shinyblender/newimg/image021.jpg +0 -0
- collage_shinyblender/newimg/image022.jpg +0 -0
- collage_shinyblender/newimg/image023.jpg +0 -0
- collage_shinyblender/newimg/image024.jpg +0 -0
- collage_shinyblender/newimg/image025.jpg +0 -0
- collage_shinyblender/newimg/image026.jpg +0 -0
- collage_shinyblender/newimg/image027.jpg +0 -0
- collage_shinyblender/newimg/image028.jpg +0 -0
- collage_shinyblender/newimg/image029.jpg +0 -0
- collage_shinyblender/newimg/image030.jpg +0 -0
- collage_shinyblender/newimg/image031.jpg +0 -0
- collage_shinyblender/newimg/image032.jpg +0 -0
- collage_shinyblender/newimg/image033.jpg +0 -0
- collage_shinyblender/newimg/image034.jpg +0 -0
- collage_shinyblender/newimg/image035.jpg +0 -0
- collage_shinyblender/newimg/image036.jpg +0 -0
- collage_shinyblender/newimg/image037.jpg +0 -0
- collage_shinyblender/newimg/image038.jpg +0 -0
- collage_shinyblender/newimg/image039.jpg +0 -0
- collage_shinyblender/newimg/image040.jpg +0 -0
- collage_shinyblender/newimg/image041.jpg +0 -0
- collage_shinyblender/newimg/image042.jpg +0 -0
- collage_shinyblender/newimg/image043.jpg +0 -0
- collage_shinyblender/newimg/image044.jpg +0 -0
- collage_shinyblender/newimg/image045.jpg +0 -0
- collage_shinyblender/newimg/image046.jpg +0 -0
- collage_shinyblender/newimg/image047.jpg +0 -0
.gitattributes
CHANGED
@@ -34,3 +34,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
34 |
*last.ckpt* filter=lfs diff=lfs merge=lfs -text
|
35 |
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
36 |
*events.out* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
34 |
*last.ckpt* filter=lfs diff=lfs merge=lfs -text
|
35 |
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
36 |
*events.out* filter=lfs diff=lfs merge=lfs -text
|
37 |
+
.ckpt filter=lfs diff=lfs merge=lfs -text
|
38 |
+
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
add_caption.ipynb
ADDED
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cells": [
|
3 |
+
{
|
4 |
+
"cell_type": "code",
|
5 |
+
"execution_count": 1,
|
6 |
+
"metadata": {},
|
7 |
+
"outputs": [],
|
8 |
+
"source": [
|
9 |
+
"import os \n",
|
10 |
+
"from PIL import Image\n",
|
11 |
+
"import numpy as np\n",
|
12 |
+
"import matplotlib.pyplot as plt\n",
|
13 |
+
"import imageio\n",
|
14 |
+
"import tqdm"
|
15 |
+
]
|
16 |
+
},
|
17 |
+
{
|
18 |
+
"cell_type": "markdown",
|
19 |
+
"metadata": {},
|
20 |
+
"source": []
|
21 |
+
},
|
22 |
+
{
|
23 |
+
"cell_type": "code",
|
24 |
+
"execution_count": 2,
|
25 |
+
"metadata": {},
|
26 |
+
"outputs": [],
|
27 |
+
"source": [
|
28 |
+
"scene_dir = \"collage_shinyblender\"\n",
|
29 |
+
"imgorig_path = os.path.join(scene_dir, \"origimg\")\n",
|
30 |
+
"imgnew_path = os.path.join(scene_dir, \"newimg\")\n",
|
31 |
+
"imglist = sorted(os.listdir(imgorig_path))\n",
|
32 |
+
"imgpath = [os.path.join(imgorig_path, img) for img in imglist]"
|
33 |
+
]
|
34 |
+
},
|
35 |
+
{
|
36 |
+
"cell_type": "code",
|
37 |
+
"execution_count": 4,
|
38 |
+
"metadata": {},
|
39 |
+
"outputs": [
|
40 |
+
{
|
41 |
+
"name": "stderr",
|
42 |
+
"output_type": "stream",
|
43 |
+
"text": [
|
44 |
+
"200it [00:21, 9.46it/s]\n"
|
45 |
+
]
|
46 |
+
}
|
47 |
+
],
|
48 |
+
"source": [
|
49 |
+
"for (i, img) in tqdm.tqdm(enumerate(imgpath)):\n",
|
50 |
+
" img_name = img.split(\"/\")[-1]\n",
|
51 |
+
" img_file = Image.open(img)\n",
|
52 |
+
" img_size = img_file.size\n",
|
53 |
+
" \n",
|
54 |
+
" if i < 40:\n",
|
55 |
+
" model_name = \"NeRF\"\n",
|
56 |
+
" psnr = 26.42\n",
|
57 |
+
" elif i < 80:\n",
|
58 |
+
" model_name = \"Mip-NeRF\"\n",
|
59 |
+
" psnr = 26.72\n",
|
60 |
+
" elif i < 120:\n",
|
61 |
+
" model_name = \"DVGO\"\n",
|
62 |
+
" psnr = 26.90\n",
|
63 |
+
" elif i < 160:\n",
|
64 |
+
" model_name = \"Plenoxels\"\n",
|
65 |
+
" psnr = 26.11\n",
|
66 |
+
" else:\n",
|
67 |
+
" model_name = \"Ref-NeRF\"\n",
|
68 |
+
" psnr = 30.70\n",
|
69 |
+
"\n",
|
70 |
+
" box_str = f\"{model_name}\\n(PSNR: {psnr})\"\n",
|
71 |
+
" props = dict(boxstyle='round', facecolor='wheat', alpha=0.5)\n",
|
72 |
+
" fig, (ax) = plt.subplots(ncols=1)\n",
|
73 |
+
" ax.imshow(img_file)\n",
|
74 |
+
" ax.axis(\"off\")\n",
|
75 |
+
" ax.text(0.05, 0.95, box_str, fontsize=12, verticalalignment='top', bbox=props, ha=\"center\", va=\"center\")\n",
|
76 |
+
" fig.savefig(os.path.join(imgnew_path, img_name))\n",
|
77 |
+
" plt.close()"
|
78 |
+
]
|
79 |
+
},
|
80 |
+
{
|
81 |
+
"cell_type": "code",
|
82 |
+
"execution_count": null,
|
83 |
+
"metadata": {},
|
84 |
+
"outputs": [],
|
85 |
+
"source": [
|
86 |
+
"newimglist = [os.path.join(imgnew_path, imgname) for imgname in sorted(os.listdir(imgnew_path))]\n",
|
87 |
+
"imglist = [np.asarray(Image.open(img)) for img in newimglist]\n",
|
88 |
+
"imageio.mimwrite(os.path.join(scene_dir, \"video.mp4\"), imglist, fps=20)"
|
89 |
+
]
|
90 |
+
},
|
91 |
+
{
|
92 |
+
"cell_type": "code",
|
93 |
+
"execution_count": null,
|
94 |
+
"metadata": {},
|
95 |
+
"outputs": [],
|
96 |
+
"source": []
|
97 |
+
}
|
98 |
+
],
|
99 |
+
"metadata": {
|
100 |
+
"kernelspec": {
|
101 |
+
"display_name": "Python 3.8.12 ('base')",
|
102 |
+
"language": "python",
|
103 |
+
"name": "python3"
|
104 |
+
},
|
105 |
+
"language_info": {
|
106 |
+
"codemirror_mode": {
|
107 |
+
"name": "ipython",
|
108 |
+
"version": 3
|
109 |
+
},
|
110 |
+
"file_extension": ".py",
|
111 |
+
"mimetype": "text/x-python",
|
112 |
+
"name": "python",
|
113 |
+
"nbconvert_exporter": "python",
|
114 |
+
"pygments_lexer": "ipython3",
|
115 |
+
"version": "3.7.11"
|
116 |
+
},
|
117 |
+
"orig_nbformat": 4,
|
118 |
+
"vscode": {
|
119 |
+
"interpreter": {
|
120 |
+
"hash": "d4d1e4263499bec80672ea0156c357c1ee493ec2b1c70f0acce89fc37c4a6abe"
|
121 |
+
}
|
122 |
+
}
|
123 |
+
},
|
124 |
+
"nbformat": 4,
|
125 |
+
"nbformat_minor": 2
|
126 |
+
}
|
collage_shinyblender/newimg/image000.jpg
ADDED
collage_shinyblender/newimg/image001.jpg
ADDED
collage_shinyblender/newimg/image002.jpg
ADDED
collage_shinyblender/newimg/image003.jpg
ADDED
collage_shinyblender/newimg/image004.jpg
ADDED
collage_shinyblender/newimg/image005.jpg
ADDED
collage_shinyblender/newimg/image006.jpg
ADDED
collage_shinyblender/newimg/image007.jpg
ADDED
collage_shinyblender/newimg/image008.jpg
ADDED
collage_shinyblender/newimg/image009.jpg
ADDED
collage_shinyblender/newimg/image010.jpg
ADDED
collage_shinyblender/newimg/image011.jpg
ADDED
collage_shinyblender/newimg/image012.jpg
ADDED
collage_shinyblender/newimg/image013.jpg
ADDED
collage_shinyblender/newimg/image014.jpg
ADDED
collage_shinyblender/newimg/image015.jpg
ADDED
collage_shinyblender/newimg/image016.jpg
ADDED
collage_shinyblender/newimg/image017.jpg
ADDED
collage_shinyblender/newimg/image018.jpg
ADDED
collage_shinyblender/newimg/image019.jpg
ADDED
collage_shinyblender/newimg/image020.jpg
ADDED
collage_shinyblender/newimg/image021.jpg
ADDED
collage_shinyblender/newimg/image022.jpg
ADDED
collage_shinyblender/newimg/image023.jpg
ADDED
collage_shinyblender/newimg/image024.jpg
ADDED
collage_shinyblender/newimg/image025.jpg
ADDED
collage_shinyblender/newimg/image026.jpg
ADDED
collage_shinyblender/newimg/image027.jpg
ADDED
collage_shinyblender/newimg/image028.jpg
ADDED
collage_shinyblender/newimg/image029.jpg
ADDED
collage_shinyblender/newimg/image030.jpg
ADDED
collage_shinyblender/newimg/image031.jpg
ADDED
collage_shinyblender/newimg/image032.jpg
ADDED
collage_shinyblender/newimg/image033.jpg
ADDED
collage_shinyblender/newimg/image034.jpg
ADDED
collage_shinyblender/newimg/image035.jpg
ADDED
collage_shinyblender/newimg/image036.jpg
ADDED
collage_shinyblender/newimg/image037.jpg
ADDED
collage_shinyblender/newimg/image038.jpg
ADDED
collage_shinyblender/newimg/image039.jpg
ADDED
collage_shinyblender/newimg/image040.jpg
ADDED
collage_shinyblender/newimg/image041.jpg
ADDED
collage_shinyblender/newimg/image042.jpg
ADDED
collage_shinyblender/newimg/image043.jpg
ADDED
collage_shinyblender/newimg/image044.jpg
ADDED
collage_shinyblender/newimg/image045.jpg
ADDED
collage_shinyblender/newimg/image046.jpg
ADDED
collage_shinyblender/newimg/image047.jpg
ADDED