-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LoadMultiViewImageFromFiles fails in data pipeline #227
Comments
Hi @SimonDoll , |
Hi @ZwwWayne, thanks for Your fast response 👍
It seems as if |
Hi @ZwwWayne, I think when use
and is assigned to So apparently |
This issue is fixed by #611 |
* refactor mmocr unit tests * fix unit tests * resolve comments
* fix the related questions of Connection failed [IP: 91.189.88.152 80] or [IP: 91.189.88.142 80] in Dockerfile * add an ARG to control whether to change the download source for GPU and CPU Dockerfile, and update corresponding changes to the documents * add an ARG to control whether to change the download source for GPU and CPU Dockerfile, and update corresponding changes to the documents * update documentation * update documentation * fix lint error Co-authored-by: zhangwenjun <[email protected]>
Shape error in mmdet3d/datasets/pipelines/formating.py when loading multi view images.
Line 50: img = np.ascontiguousarray(results['img'].transpose(2, 0, 1))
For multiview images
results['img']
is of shape (height, width, 3 (rgb), 6 (multi view))The transpose call fails with
ValueError: axes don't match array
due to the last axis.Reproduction
I added loading multi view images to the default nuscenes config (train and test pipeline):
Environment
sys.platform: linux
Python: 3.7.7 (default, May 7 2020, 21:25:33) [GCC 7.3.0]
CUDA available: True
GPU 0: GeForce RTX 2070 SUPER
CUDA_HOME: /usr/local/cuda
NVCC: Cuda compilation tools, release 10.1, V10.1.243
GCC: gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
PyTorch: 1.6.0
PyTorch compiling details: PyTorch built with:
TorchVision: 0.7.0
OpenCV: 4.4.0
MMCV: 1.2.1
MMCV Compiler: GCC 7.3
MMCV CUDA Compiler: 10.1
MMDetection: 2.7.0
MMDetection3D: 0.8.0+e5a155e
Error traceback
Bug fix
The transpose call fails with
ValueError: axes don't match array
due to the last axis. I'm new to the framework and do not know wether fixing this by simply leaving the last dimension for the multi view images is enough:As a hotfix this definitively works out for me...
Is this function called for 3D arrays as well?
I'm happy to do a pull request if You tell me wether we need different cases for single view (3 dimensions) vs multi view (4 dimensions) arrays and if using transpose is enough or if I should do the same with swapaxes to be invariant to the array shape..
Thanks for any help 👍
The text was updated successfully, but these errors were encountered: