Generate feature in Webassembly

Question/Issue:
I’m trying to run my Object detection in the browser, but when I download and run the WAS i need to input features.
Is there a way to convert a image input into raw features?

Context/Use case:
Run Objectdetection in web browser.
I need it for a project of school.

Hi @aronb,

raw_features should just be a 1D array of your data. That means flattening your 2D image data into a 1D array in HWC format, and then normalizing (dividing) the individual pixel values by 255 to get a floating point value between 0 and 1.0. For example, if the first pixel (in rgb888 format) is 0x6e767c, it would become 3 separate values: 0.4314, 0.4627, 0.4863. See the “Image” processing block in your Studio project to see how to flatten image data.

Once you have a normalized 1D array of features representing your image, you can pass that array into your WebAssembly library to perform inference. See this example.