Skip to content

valueError: could not convert string to float:  #79

Description

@readilychen

all .txt files are empy, cause following error when run ./scripts/train_nsvf_lego.sh

[Taichi] version 1.7.0, llvm 15.0.4, commit daeb0139, linux, python 3.10.12
[Taichi] Starting on arch=cuda
self.root_dir is ./Synthetic_NeRF/Lego
line is
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /opt/ml/volume/default/work/taichi-nerfs/train.py:312 in │
│ │
│ 309 │ │ ).render() │
│ 310 │
│ 311 if name == 'main': │
│ ❱ 312 │ main() │
│ 313 │
│ │
│ /opt/ml/volume/default/work/taichi-nerfs/train.py:62 in main │
│ │
│ 59 │ │
│ 60 │ # datasets │
│ 61 │ dataset = dataset_dict[hparams.dataset_name] │
│ ❱ 62 │ train_dataset = dataset( │
│ 63 │ │ root_dir=hparams.root_dir, │
│ 64 │ │ split=hparams.split, │
│ 65 │ │ downsample=hparams.downsample, │
│ │
│ /opt/ml/volume/default/work/taichi-nerfs/datasets/nsvf.py:18 in init
│ │
│ 15 │ def init(self, root_dir, split='train', downsample=1.0, **kwargs): │
│ 16 │ │ super().init(root_dir, split, downsample) │
│ 17 │ │ │
│ ❱ 18 │ │ self.read_intrinsics() │
│ 19 │ │ │
│ 20 │ │ if kwargs.get('read_meta', True): │
│ 21 │ │ │ xyz_min, xyz_max = \ │
│ │
│ /opt/ml/volume/default/work/taichi-nerfs/datasets/nsvf.py:41 in read_intrinsics │
│ │
│ 38 │ │ │ with open(os.path.join(self.root_dir, 'intrinsics.txt')) as f: │
│ 39 │ │ │ │ line = f.readline() │
│ 40 │ │ │ │ print("line is{}".format(line)) │
│ ❱ 41 │ │ │ │ fx = fy = float(line.split()[0]) * self.downsample │
│ 42 │ │ │ if 'Synthetic' in self.root_dir: │
│ 43 │ │ │ │ w = h = int(800 * self.downsample) │
│ 44 │ │ │ else: │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ValueError: could not convert string to float:
'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
00\x00'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions