Skip to content
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

Resize input image (ID3D12Resource) to model size using directx #681

Open
bvnp43 opened this issue Jan 11, 2025 · 1 comment
Open

Resize input image (ID3D12Resource) to model size using directx #681

bvnp43 opened this issue Jan 11, 2025 · 1 comment

Comments

@bvnp43
Copy link

bvnp43 commented Jan 11, 2025

Hello,

I have a ID3D12Resource that contain input image, data is already on gpu. I need to be able to resize it to match the model fixed size, like 640x480. Then model's processing result need to be upscaled back. Is there any C/C++ code example where resize of the input/output resouce is implemented on directx? How this could be achieved without passing data to cpu, that obv would be a significant slowdown.

@bvnp43 bvnp43 changed the title Resize input image to model size using directx Resize input image (ID3D12Resource) to model size using directx Jan 11, 2025
@roman380
Copy link

yolov4 sample has sample code here

commandList->Dispatch(DivUp(m_origTextureWidth, 32), DivUp(m_origTextureHeight, 16), 1);
and around m_computePSO - it does exactly this, scales input image to dimensions the model expects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants