Closed shengjie-lin closed 1 year ago
Looks good to me!, @chungmin99 could you take a look at the cache path changes for dataloaders?
Thanks for the PR :)
Thanks for the reply! To be fair, changing the cache path is not necessary (lerf/data/lerf_datamanager.py#L82). However, explictly creating the cache_dir is necessary (lerf/data/utils/feature_dataloader.py#L45), otherwise nothing gets saved if cache_dir does not exist already.
The intention behind the original cache_dir = f"outputs/{self.config.dataparser.data.name}
was to store each scene's clip/dino data separately (e.g., outputs/teatime
, outputs/kitchen
, ...). Would it possible for you to revert that change?
@chungmin99 Sure, no problem. But just in case my point is missed, even with my modified code cache_dir = self.config.dataparser.data / 'lerf_cache'
, each scene's clip/dino data are still stored separately, but alongside their training data. Also, as I said earlier, explicitly creating the cache_dir is necessary. Consider the case when we do ns-train lerf
and do not pass --output-dir
to it, nerfstudio will create the default outputs/[scene_name]
dir for us. That's why you might not encounter this problem. However, when we do pass a different --output-dir
, there won't be outputs/[scene_name]
. So we need to make the dir when needed. I created another PR just containing the necessary changes. Closed this one.
The second time get_max_across method is called, its preset_scales parameter gets used. When there are multiple query phrases, preset_scales[i] should be the scale to be used for the i-th phrase. However, the current implementation will search again for the "best" scale for every phrase for all candidates in preset_scales. This will result in unintended behavior, and cause artifacts in the rendered relevancy map as below. This pull request fixes this issue by making sure that when preset_scales is not None, preset_scales[i] only applies to the corresponding phrase.