Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to input more than five views? #5

Open
gerwang opened this issue May 19, 2022 · 3 comments
Open

Is it possible to input more than five views? #5

gerwang opened this issue May 19, 2022 · 3 comments

Comments

@gerwang
Copy link

gerwang commented May 19, 2022

Hi, thanks for the great work!

If I want to input more than five views (for example, to fairly compare with works like NeRFactor), is it possible? Should I expect the results to be better than inputting five views?

@ken2576
Copy link
Owner

ken2576 commented May 19, 2022

Hi,
Yes it should be possible.
You could take a look at https://github.com/ken2576/nelf/blob/main/run_validate_view.py
We change the view count to show different rendering quality.
I think you could prepare data for more views and compare with other methods. For more than 5 views, I think the specularity should be handled better since there are more views on the high-frequency highlights.
However, we did not test the algorithm in that situation, so let me know if it is acting otherwise.

@gerwang
Copy link
Author

gerwang commented May 23, 2022

I can feed 31 views to the network now.
But I find the results are worse than inputting five views.
Here are my result videos:

I found more "black holes" in the generated geometry, which caused artifacts.

Here is how I obtained the results:

The processed input can be found here: https://drive.google.com/file/d/1O9tj9emonnTlKNkQy8dF_oHBZrorFwWG/view?usp=sharing. I unzipped the file, and put the directory source_image_masked into ./data_test/processed_input.

I modified run_test.py to test on the processed input with 31 views:

##### Test #####
if True or os.sys.argv[2].startswith('validate'):
    light = cv2.imread(f'{arg.base_path}/data_test/{os.sys.argv[2]}/source_image_masked/target_light.hdr', cv2.IMREAD_UNCHANGED)
    light = cv2.resize(
        cv2.cvtColor(light, cv2.COLOR_BGR2RGB), tuple(light_size[::-1]), interpolation=cv2.INTER_AREA
    )
    cam_poses = [(15, 22.5*i) for i in range(16)] + [(15, 0) for i in range(32)]
    lights = [0 for i in range(16)] + [15-i for i in range(16)] + [np.roll(light, i, axis=1) for i in range(16)]
    filenames = [f'{i}' for i in range(48)]
    tester(
        data_name=os.sys.argv[2], image_ids=list(range(31)), # for 31 views,  [0, 22, 12, 14, 3] for five views
        dataset_color=None, extra_color_scale=1.0,
        cam_poses=cam_poses,
        lights=lights,
        filenames=filenames,
        model=model, test_path=f'{arg.base_path}/data_test', folder='masked'
    )

I start the program with
python run_test.py nelf_ft processed_input 500000

Could you please tell me how to remove these artifacts? Where have I gone wrong? Thank you!

@ken2576
Copy link
Owner

ken2576 commented Jun 8, 2022

Sorry for the late reply.
Since our network was trained with only 5 views as input, you might need to retrain it first.
Another thing is that the data seems a bit too close.
Could you try to make sure the full face is visible in the image?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants