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
random crop function #5258
Comments
Hi @DAVID-Hown, Thank you for reaching out.
|
@JanuszL Thank you, But I get a error TypeError: Invalid shape (3, 224, 224) for image data
maybe format is not right. this is my code:
I plan to input an image, then use DALI library to accelerate IO speed, and directly output batch_size=16 tensor, do you have any suggestions |
If you want to show it you need to change layout to
|
@JanuszL |
@JanuszL hi,batch size=16, obtain 16 dimensions tensorgpulist, how to stack into 16X224X224X3 pytorch supported dimensions |
Hi, You can call crop/slice operator 16 times and stack the results using |
How about:
|
I found that the function did not normalize my input |
If you want to normalize it to 0-1 range please:
|
Describe the question.
eii = ExternalInputIterator(batch_size) pipe = Pipeline(batch_size=batch_size, num_threads=2, device_id=3) with pipe: jpegs = fn.external_source(source=eii, num_outputs=1, dtype=types.UINT8) decode = fn.decoders.image(jpegs, device="mixed", output_type=types.RGB) pipe.set_outputs(crop_patch)
how to add random crop to 224x224, between decode and output
Check for duplicates
The text was updated successfully, but these errors were encountered: