gemenerik / gap8-obstacle-avoidance

MIT License
0 stars 2 forks source link

[bug] make errors #2

Closed boomer319 closed 9 months ago

boomer319 commented 9 months ago

Hello @gemenerik,

I watched the ai deck workshop 1 giving some insight into flashing onto the ai deck.

I moved nanoflownet_unquantized.json into the BUILD_MODEL directory as needed to overcome this error: FileNotFoundError: [Errno 2] No such file or directory: 'BUILD_MODEL/nanoflownet_unquantized.json'

Running make all in the gap8-obstacle-avoidance directory I got this error: ModuleNotFoundError: No module named 'stats'

This was fixed by adding the path of the nntools to the pythonpath, making the nntool stats python package available: export PYTHONPATH=$PYTHONPATH:~/repo/gap_sdk/tools/nntool/nntool

Now I run into this error when I make all: nntool.quantization.range_provider.RangesMissingError: no ranges found for DEPTHWISE_CONV_2D_0_128

boomer319 commented 9 months ago

@gemenerik,

Possible issue: Image size mismatch causing errors. AI deck images (324x244px) ≠ Network's requirement (112x160px).

Resizing with opencv (keeping png format) and pillow (conversion to ppm) triggers dtype error: EXCEPTION of type 'ArithmeticError' occurred with message: 'Expression QUANTIZE_0_455 evaluated to incorrect dtype'

boomer319 commented 9 months ago

@gemenerik,

upon commenting out fusions -a expression_matcher in nntool_script the process runs without errors. Only runtime warnings. Until this comes up: NotImplementedError: Don't know how to generate kernel for parameter type MUL_0_437 mul. Perhaps you need to run fusions -a expression_matcher.

Am I missing steps?

boomer319 commented 9 months ago

@gemenerik,

I have found the QUANTIZE_0_455 Node in the nanoflownet_unquantized.tflite using netron as mentioned here (highlighted in red). It seems to be fed by ResizeBilinear.

Screenshot from 2023-12-05 17-44-27