Closed Morgansgun closed 9 months ago
@Gentlyweep Thanks for your interest in our work.
To resolve this error, you can easily fix it by appending "tokens3, tokens4" to the first line of the training file, specifically Sr3D_release.csv. Please refrain from modifying train_referit3d.py to ensure smooth training.
We appreciate your reminder, and will promptly update the training file. Thank you! : )
Sorry for the mistake, I have updated the right file link.
When I run the "train.sh",the error is:
Traceback (most recent call last): File "/home/sd/Harddisk/sba/BS/ViewRefer3D-main/referit3d/scripts/train_referit3d.py", line 63, in
referit_data = load_referential_data(args, args.referit3D_file, scans_split)
File "/home/sd/Harddisk/sba/BS/ViewRefer3D-main/referit3d/in_out/neural_net_oriented.py", line 78, in load_referential_data
'multiview_text', 'tokens2','tokens3','tokens4']]
File "/home/sd/anaconda3/envs/viewrefer/lib/python3.7/site-packages/pandas/core/frame.py", line 3464, in getitem
indexer = self.loc._get_listlike_indexer(key, axis=1)[1]
File "/home/sd/anaconda3/envs/viewrefer/lib/python3.7/site-packages/pandas/core/indexing.py", line 1314, in _get_listlike_indexer
self._validate_read_indexer(keyarr, indexer, axis)
File "/home/sd/anaconda3/envs/viewrefer/lib/python3.7/site-packages/pandas/core/indexing.py", line 1377, in _validate_read_indexer
raise KeyError(f"{not_found} not in index")
KeyError: "['tokens3', 'tokens4'] not in index"
So I delete tokens3 and tokens4 ,another error comes:
Traceback (most recent call last): File "/home/sd/Harddisk/sba/BS/ViewRefer3D-main/referit3d/scripts/train_referit3d.py", line 63, in
referit_data = load_referential_data(args, args.referit3D_file, scans_split)
File "/home/sd/Harddisk/sba/BS/ViewRefer3D-main/referit3d/in_out/neural_net_oriented.py", line 81, in load_referential_data
referit_data.tokens = referit_data['tokens'].apply(literal_eval)
File "/home/sd/anaconda3/envs/viewrefer/lib/python3.7/site-packages/pandas/core/series.py", line 4357, in apply
return SeriesApply(self, func, convert_dtype, args, kwargs).apply()
File "/home/sd/anaconda3/envs/viewrefer/lib/python3.7/site-packages/pandas/core/apply.py", line 1043, in apply
return self.apply_standard()
File "/home/sd/anaconda3/envs/viewrefer/lib/python3.7/site-packages/pandas/core/apply.py", line 1101, in apply_standard
convert=self.convert_dtype,
File "pandas/_libs/lib.pyx", line 2859, in pandas._libs.lib.map_infer
File "/home/sd/anaconda3/envs/viewrefer/lib/python3.7/ast.py", line 91, in literal_eval
return _convert(node_or_string)
File "/home/sd/anaconda3/envs/viewrefer/lib/python3.7/ast.py", line 90, in _convert
return _convert_signed_num(node)
File "/home/sd/anaconda3/envs/viewrefer/lib/python3.7/ast.py", line 63, in _convert_signed_num
return _convert_num(node)
File "/home/sd/anaconda3/envs/viewrefer/lib/python3.7/ast.py", line 55, in _convert_num
raise ValueError('malformed node or string: ' + repr(node))
ValueError: malformed node or string: <_ast.Name object at 0x7fe199e8bc90>
And the code in issue should be this: referit_data = referit_data[['tokens', 'instance_type', 'scan_id', 'dataset', 'target_id', 'utterance', 'stimulus_id', 'multiview_text', 'tokens2']] referit_data.tokens = referit_data['tokens'].apply(literal_eval)
Can anybody help me?thanks!