nerfstudio icon indicating copy to clipboard operation
nerfstudio copied to clipboard

ns-train ImportError on custom data

Open casychow opened this issue 2 years ago • 7 comments

I am using the ns-train command on custom data & edited nerf algorithm. But I keep getting an "ImportError".

Steps to reproduce the behavior:

  1. Created a new conda environment. The new environment is different than another conda environment that has been working perfectly with nerfstudio.
  2. Copied existing nerf algorithm and tweaked it a bit in a new .py file located in the models folder
  3. Added custom nerf algorithm name in method_configs to call it using the command line
  4. Used command ns-train custom_name --data ./Video_apt/ --viewer.websocket-port 7008 (used same command on original conda environment)

It is supposed to run a copy of nerfacto. I tried using nerfacto and the edited nerfacto but they keep raising the same "ImportError" error about "cannot import name 'VanillaDataManagerConfig' from 'nerfstudio.data.datamanagers'" in this conda environment. But when I run nerfacto in the original conda environment, it works.

I have tried changing different variables in the method_configs file to see if any new code is messing up the project. I have also tried digging deep into the ns-train, train, base_datamanagers, and method_configs file to locate the problem, to no avail.

IMG_6554

casychow avatar Dec 12 '22 06:12 casychow

instead of using ns-train, could you try using python scripts/train.py?

akristoffersen avatar Dec 12 '22 19:12 akristoffersen

Can you try the latest github main version. It has some fixes regarding circular imports that may fix this issue.

tancik avatar Dec 13 '22 18:12 tancik

Thanks, sorry for the late replies but neither option worked unfortunately.

casychow avatar Dec 14 '22 00:12 casychow

Adding my partner @SanakovDiar who can test the data to this issue thread.

casychow avatar Dec 14 '22 05:12 casychow

Hi, any updates?

tancik avatar Dec 27 '22 17:12 tancik

Hi, any updates?

Hello, yes - unfortunately neither option worked. The error message remained the same.

casychow avatar Dec 30 '22 04:12 casychow

Can you try pulling the latest github version and then post the error you are seeing.

tancik avatar Dec 30 '22 05:12 tancik

Closing due to inactivity. Feel free to reopen if it is still and issue.

tancik avatar Apr 15 '23 00:04 tancik