You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For anyone who had to generate the validation folder, here's what I used.
`import os
import shutil
root = ''
with open(os.path.join(root, "mv3d_kitti_splits", "val.txt")) as _f:
lines = _f.readlines()
split = [line.rstrip("\n") for line in lines]
for sub in ['calib', 'image_2', 'label_2']:
for file in split:
if sub == 'calib' or sub == 'label_2':
file += '.txt'
else:
file += '.png'
shutil.copyfile(os.path.join(root, 'training',sub, file), os.path.join(root, 'val',sub,file))`
The text was updated successfully, but these errors were encountered:
Hi @tom-bu, thanks for this script. It works perfectly, just a small addition: One must create "val" folder along with sub folders "calib", "image_2", "label_2" before executing your script. Or, you can use the below one with integrated os.makedirs() command:
For anyone who had to generate the validation folder, here's what I used.
`import os
import shutil
root = ''
with open(os.path.join(root, "mv3d_kitti_splits", "val.txt")) as _f:
lines = _f.readlines()
split = [line.rstrip("\n") for line in lines]
for sub in ['calib', 'image_2', 'label_2']:
for file in split:
if sub == 'calib' or sub == 'label_2':
file += '.txt'
else:
file += '.png'
shutil.copyfile(os.path.join(root, 'training',sub, file), os.path.join(root, 'val',sub,file))`
The text was updated successfully, but these errors were encountered: