Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As expressed in #2435 there is a bug that make nerfstudio fail on apple silicon devices. I make an extra addition to fix it. However, I would like for nerfstudio to have more support on apple devices. I wanted to contribute to the docs on instructions about how to install on Mac and how to process the data to avoid errors but found that couldn't even build the docs locally. For instance, rawpy is not supported on M1 macs. And tyro installation fails. It installs, but later on it says that no module could be found. I also couldn't run tests locally since the developer branch is quite difficult to install on mac and I could not manage to do so.
When you solve those issues, I will be more than glad to contribute to the docs. For the moment, I'll just leave the instructions to make nerfstudio work here.
First, install pymeshlab like this:
pip3 install git+https://github.com/cnr-isti-vclab/PyMeshLab
Then, install functorch with pip, and then install nerfstudio with pip too. That should suffice. When running the processing, I only managed to make it work with this command:
ns-process-data images --data trial1/images/ --output-dir trial1/output/ --num-downscales 0 --no-gpu --matching-method exhaustive
You can use images or video, but be sure to use
--no-gpu
and the exhaustive matching type. It should suffice for short sequences. Then, to train the model, run:PYTORCH_ENABLE_MPS_FALLBACK=1 ns-train nerfacto --data trial1/output/ --machine.device-type mps --mixed-precision False
For 100 frames the estimated running time on my device (M1 Max) is 12 hours approximately.