chensjtu / GaussianObject

GaussianObject: High-Quality 3D Object Reconstruction from Four Views with Gaussian Splatting (SIGGRAPH Asia 2024, TOG)
887 stars 54 forks source link

Error running train_lora.py #26

Open YSYYU opened 7 months ago

YSYYU commented 7 months ago

Traceback (most recent call last): File "/home/featurize/work/GaussianObject/train_lora.py", line 115, in trainer.fit(model, dataloader) File "/environment/miniconda3/lib/python3.10/site-packages/pytorch_lightning/trainer/trainer.py", line 545, in fit call._call_and_handle_interrupt( File "/environment/miniconda3/lib/python3.10/site-packages/pytorch_lightning/trainer/call.py", line 44, in _call_and_handle_interrupt return trainer_fn(*args, kwargs) File "/environment/miniconda3/lib/python3.10/site-packages/pytorch_lightning/trainer/trainer.py", line 581, in _fit_impl self._run(model, ckpt_path=ckpt_path) File "/environment/miniconda3/lib/python3.10/site-packages/pytorch_lightning/trainer/trainer.py", line 990, in _run results = self._run_stage() File "/environment/miniconda3/lib/python3.10/site-packages/pytorch_lightning/trainer/trainer.py", line 1036, in _run_stage self.fit_loop.run() File "/environment/miniconda3/lib/python3.10/site-packages/pytorch_lightning/loops/fit_loop.py", line 202, in run self.advance() File "/environment/miniconda3/lib/python3.10/site-packages/pytorch_lightning/loops/fit_loop.py", line 359, in advance self.epoch_loop.run(self._data_fetcher) File "/environment/miniconda3/lib/python3.10/site-packages/pytorch_lightning/loops/training_epoch_loop.py", line 136, in run self.advance(data_fetcher) File "/environment/miniconda3/lib/python3.10/site-packages/pytorch_lightning/loops/training_epoch_loop.py", line 259, in advance call._call_callback_hooks(trainer, "on_train_batch_end", batch_output, batch, batch_idx) File "/environment/miniconda3/lib/python3.10/site-packages/pytorch_lightning/trainer/call.py", line 208, in _call_callback_hooks fn(trainer, trainer.lightning_module, args, kwargs) File "/home/featurize/work/GaussianObject/cldm/logger.py", line 75, in on_train_batch_end self.log_img(pl_module, batch, batch_idx, split="train") File "/home/featurize/work/GaussianObject/cldm/logger.py", line 56, in log_img images = pl_module.log_images(batch, split=split, self.log_images_kwargs) File "/environment/miniconda3/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(args, kwargs) File "/home/featurize/work/GaussianObject/cldm/cldm.py", line 366, in log_images log["conditioning"] = log_txt_as_img((512, 512), batch[self.cond_stage_key], size=16) # text File "/home/featurize/work/GaussianObject/ldm/util.py", line 19, in log_txt_as_img font = ImageFont.truetype('font/DejaVuSans.ttf', size=size) File "/environment/miniconda3/lib/python3.10/site-packages/PIL/ImageFont.py", line 791, in truetype return freetype(font) File "/environment/miniconda3/lib/python3.10/site-packages/PIL/ImageFont.py", line 788, in freetype return FreeTypeFont(font, size, index, encoding, layout_engine) File "/environment/miniconda3/lib/python3.10/site-packages/PIL/ImageFont.py", line 226, in init self.font = core.getfont( OSError: cannot open resource May I ask why such an error occurred and how should it be corrected.

defe41251135 commented 6 months ago

Hi @YSYYU , i meet the same question as you, have you solved it?

GaussianObject commented 6 months ago

Sorry for the delayed response and thank you for your patience. We apologize for the oversight of missing font/DejaVuSans.ttf in our repository. It has now been added. Please check the updated repo.

defe41251135 commented 6 months ago

Sorry for the delayed response and thank you for your patience. We apologize for the oversight of missing font/DejaVuSans.ttf in our repository. It has now been added. Please check the updated repo.

Hi @GaussianObject , thank you for your solution, it works for me.

By the way, thank you for the great work!