Skip to content

How do I modify the code if I change the model input? #1630

Answered by gemenerik
SUJUSTDO asked this question in Q&A
Discussion options

You must be logged in to vote

To adapt the input size from 324x244 to the model’s expected 160x160, you can add a resizing step to the code after capturing the image. This resizing can be done by scaling down the 'cameraBuffer' using interpolation, such as nearest-neighbor or bilinear methods, to reduce it to 160x160 dimensions. Or you can do subsampling. Since GAP SDK does not have built-in resizing functions, you probably need to write a custom resizing loop that iterates over pixels, similar to other image-processing operations like demosaicking. Define the new 160x160 buffer and map pixels from the original 'cameraBuffer' into it according to the scaling factor. You should also be aware that GAP SDK offers a QQVGA…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Bananazooka
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants