mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-22 23:55:36 +08:00
Frozen opacity MLP at the 2nd step of training + just fast exposure for 2nd step + evaluation scripts
This commit is contained in:
1 parent
c3c151f3ae
commit
0ab3139b19
18 files changed
+875
-50
No files matched your search
@@ -0,0 +1,34 @@
|
||||
import argparse
|
||||
import numpy as np
|
||||
import os
|
||||
import cv2
|
||||
os.environ["OPENCV_IO_ENABLE_OPENEXR"] = "1"
|
||||
|
||||
from imageio import imread, imsave
|
||||
from envmap import EnvironmentMap, rotation_matrix
|
||||
import math
|
||||
from tqdm import tqdm
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--data_dir', type=str, default='/Users/momo/Desktop/Pandora-HDR_NeRF/final_results/Henry_Gagnon_red_and_blue/PanoHDR-NeRF/pano_gamma_tone_mapped/')
|
||||
parser.add_argument('--out_dir', type=str, default='/Users/momo/Desktop/Pandora-HDR_NeRF/final_results/Henry_Gagnon_red_and_blue/PanoHDR-NeRF/pano/')
|
||||
args = parser.parse_args()
|
||||
|
||||
test_images = []
|
||||
for path in Path(args.data_dir).rglob('*.exr'):
|
||||
test_images.append(path)
|
||||
|
||||
for pano_addr in tqdm(test_images):
|
||||
pano_addr = str(pano_addr)
|
||||
e = EnvironmentMap(pano_addr, 'latlong')
|
||||
|
||||
data = e.data**2.2
|
||||
|
||||
out_dir = pano_addr.replace(args.data_dir, args.out_dir)
|
||||
|
||||
data = np.float32(data)
|
||||
data = cv2.cvtColor(data, cv2.COLOR_RGB2BGR)
|
||||
cv2.imwrite(out_dir, data)
|
||||
Reference in new issue
Block a user