-
Notifications
You must be signed in to change notification settings - Fork 630
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
Fix warp perspective documentation #5815
base: main
Are you sure you want to change the base?
Conversation
…ened 1D. Signed-off-by: Bryce Ferenczi <[email protected]>
Hello, |
When I initially developed for GPU, I used numpy.flatten() on my homographies to make 1D as per the docs and got the error message that I added in the original post "Expected a uniform list of 3x3 matrices. Instead got data with shape: {9, 9, 9, 9, 9, 9}" I've actually just tried to check that the CPU has the same behaviour with assering 3x3 mat, but I just got the error: |
!build |
CI MESSAGE: [23960901]: BUILD STARTED |
CI MESSAGE: [23960901]: BUILD FAILED |
Since there is no warp_perspective operator for CPU, only the CV-CUDA wrapper, I plan on adding one in my spare time, maybe over the weekend, just based on cv::warpPerspective. We can move this minor doc fix to that PR. This is also the case for fn.experimental.debayer, only CUDA op available based on npp, an opencv wrapper is needed for CPU impl. I think the [0,0], [0,1] notation is also a bit awkward imo, and is different from NPP and OpenCV which is an enum. |
Warp perspective requires 3x3 tensor list (not 1D), fixing documetation to reflect this requirement.
Category:
Bug fix (non-breaking change which fixes an issue)
Description:
Documentation doesn't reflect the assertions made in the code:
Additional information:
I'm not familiar with how to fix the automatically generated documetation of "matrix",
.addOptionalArg<float>("matrix", ..., std::vector<float>({}), ...)
generates "float or list of float or TensorList of float, optional, default = []" which is also incorrect. I think this problem could be pervasive in the codebase, where the inputs to operators should be 2D but the class used in .add(Optional)Arg is 1D std::vector. Maybe this is doable with ArgValue<float, 2> somehow, I'm not sure, I didn't test implementing/building this.An additional pain point for this operator in general is that size has to be on CPU, but if I have some other target image I am warping to that is already on GPU, I can't use target.shape() because cpu()->gpu() isn't allowed without experimental feature activated.
Tests:
Checklist
Documentation
DALI team only
Requirements
REQ IDs: N/A
JIRA TASK: N/A