fix camera path bug
This commit is contained in:
parent
1c1cdca2a3
commit
a308bfee18
@ -230,7 +230,7 @@ class Base(BaseData):
|
||||
self.reader = reader
|
||||
self.writer = writer
|
||||
if camera != 'none':
|
||||
if not os.path.isabs(camera):
|
||||
if not os.path.exists(camera) and not os.path.isabs(camera):
|
||||
camera = join(self.root, camera)
|
||||
if os.path.exists(camera):
|
||||
cameras = read_cameras(camera)
|
||||
@ -464,7 +464,10 @@ class ImageFolder(Base):
|
||||
data[key] = Undistort.points(data[key], K, dist)
|
||||
data[key+'_unproj'] = unproj(data[key], invK)
|
||||
for _key in [key, key+'_distort', key+'_unproj']:
|
||||
self.cache_shape[_key] = np.zeros_like(data[_key])
|
||||
try:
|
||||
self.cache_shape[_key] = np.zeros_like(data[_key])
|
||||
except KeyError:
|
||||
print(f"missed key: {_key}")
|
||||
if self.loadmp:
|
||||
data['annots'] = data['annots']['annots']
|
||||
# compose the data
|
||||
|
Loading…
Reference in New Issue
Block a user