[VTA] Yolov3-tiny Generate many 0 or 1 Width Frame

Hi There,

Following is my network for Yolov3-tiny on VTA , this network would work after apply this patch https://github.com/apache/incubator-tvm/pull/4887 , but one problem on this network is that there are many small (0, 1 as width) frame, if removed these frame, all the detection is same like using quantization only on yolov3-tiny with llvm , please kindly advise if anything wrong in my logic.

Regards

Hua

ouput some small box like right left bot top (38, 38, 286, 286) right left bot top (173, 171, 272, 272) right left bot top (58, 58, 286, 286)

network vta related change as following

pack_dict = {
    "yolov3-tiny": ["nn.max_pool2d", "cast", 4, 185],#include all conv2d
}
with autotvm.tophub.context(target):
    # Perform quantization in Relay
    with relay.build_config(opt_level=optl,disabled_pass=dpass):
        with relay.quantize.qconfig(global_scale=33,
                                skip_conv_layers=[0]):
            mod = relay.quantize.quantize(mod, params=params)
        mod = graph_pack(
                    mod["main"],
                    env.BATCH,
                    env.BLOCK,
                    env.WGT_WIDTH,
                    start_name=pack_dict[MODEL_NAME][0],
                    stop_name=pack_dict[MODEL_NAME][1],
                    start_name_idx=pack_dict[MODEL_NAME][2],
                    stop_name_idx=pack_dict[MODEL_NAME][3])
        with vta.build_config(debug_flag=debug_f,disabled_pass=dpass):
            graph, lib, params = relay.build(
                                mod, 
                                target=target,
                                params=params, 
                                target_host=env.target_host)
1 Like

Issue like following, @thierry, do you think is this VTA existing bug or some parameter what i used is wrong?

VTA + Yolov3-tiny

Just do Quantization

issue fixed, it caused by reshape logic not correct handle problem.

1 Like

Thanks for this contribution @hjiang, this brings a lot of value to the VTA project! It would be great to package that into a tutorial similar to that one: https://docs.tvm.ai/vta/tutorials/frontend/deploy_vision_on_vta.html#sphx-glr-vta-tutorials-frontend-deploy-vision-on-vta-py

I’ve left some comments in your open PR.

@thierry, thanks for the follow up, would base my test network working for a tutorial.