ONE icon indicating copy to clipboard operation
ONE copied to clipboard

DRAFT: Introduce visq module

Open jinevening opened this issue 3 years ago • 6 comments

On going draft to introduce visq module.

ONE-DCO-1.0-Signed-off-by: Hyukjin Jeong [email protected]


Related to: https://github.com/Samsung/ONE/issues/9694

jinevening avatar Oct 17 '22 01:10 jinevening

@seanshpark I've made a json file from MV1 model using this draft.

Could you visualize the generate file with visquv? I think that can be a test for both this draft and visquv.

{
    "meta": {
        "model": "mobilenet_v1_keepdims_relu6.0to33.circle",
        "metric": "MPEIR",
        "colorscheme": [
            {
                "b": -Infinity,
                "e": 0.1111,
                "c": "#ffffcc"
            },
            {
                "b": 0.1111,
                "e": 0.2222,
                "c": "#ffeda0"
            },
            {
                "b": 0.2222,
                "e": 0.3333,
                "c": "#fed976"
            },
            {
                "b": 0.3333,
                "e": 0.4444,
                "c": "#feb24c"
            },
            {
                "b": 0.4444,
                "e": 0.5556,
                "c": "#fd8d3c"
            },
            {
                "b": 0.5556,
                "e": 0.6667,
                "c": "#fc4e2a"
            },
            {
                "b": 0.6667,
                "e": 0.7778,
                "c": "#e31a1c"
            },
            {
                "b": 0.7778,
                "e": 0.8889,
                "c": "#bd0026"
            },
            {
                "b": 0.8889,
                "e": Infinity,
                "c": "#800026"
            }
        ]
    },
    "qerror": [
        {
            "conv_pw_2_relu/Relu6": 0.3107,
            "conv_dw_3_relu/Relu6": 0.4123,
            "conv_pw_1_relu/Relu6": 0.4148,
            "conv_pw_3_relu/Relu6": 0.3561,
            "conv_dw_13_relu/Relu6": 0.3424,
            "conv_dw_11_relu/Relu6": 0.2673,
            "conv_pad_6/Pad": 0.3413,
            "conv_pad_4/Pad": 0.3561,
            "conv_pw_5_relu/Relu6": 0.3413,
            "conv_pad_2/Pad": 0.4148,
            "conv_dw_5_relu/Relu6": 0.3664,
            "conv_dw_12_relu/Relu6": 0.2074,
            "conv_dw_10_relu/Relu6": 0.2552,
            "conv_dw_2_relu/Relu6": 0.2368,
            "conv_pw_9_relu/Relu6": 0.2879,
            "conv_preds/BiasAdd": 0.096,
            "conv_dw_7_relu/Relu6": 0.5072,
            "conv1_pad/Pad": 0.002,
            "conv_pw_10_relu/Relu6": 0.3139,
            "conv_pw_13_relu/Relu6": 0.8512,
            "conv_pw_4_relu/Relu6": 0.3238,
            "conv_dw_9_relu/Relu6": 0.2811,
            "conv_dw_8_relu/Relu6": 0.3756,
            "conv_dw_6_relu/Relu6": 0.3342,
            "conv_dw_1_relu/Relu6": 0.1459,
            "conv_dw_4_relu/Relu6": 0.3763,
            "conv1_relu/Relu6": 0.0172,
            "conv_pw_8_relu/Relu6": 0.2751,
            "conv_pw_12_relu/Relu6": 0.278,
            "conv_pw_6_relu/Relu6": 0.4567,
            "Mean": 0.238,
            "conv_pw_7_relu/Relu6": 0.3852,
            "conv_pw_11_relu/Relu6": 0.256,
            "conv_pad_12/Pad": 0.256
        }
    ]
}

jinevening avatar Oct 17 '22 01:10 jinevening

where can I get mobilenet_v1_keepdims_relu6.0to33.circle model?

--> found it in internal release server :)

seanshpark avatar Oct 17 '22 01:10 seanshpark

Found some problem with given json file;

  • cannot use -Infinity --> should use "-Infinity"
    • JavaScript JSON module cannot parse without "
  • it was error not qerror
    • if you want to use qerror key, I'll revise this
  • MPEIR is shown as PEIR as I didn't use the metric key yet

image

seanshpark avatar Oct 17 '22 02:10 seanshpark

zoom out capture

image

seanshpark avatar Oct 17 '22 02:10 seanshpark

Thanks for testing!

JavaScript JSON module cannot parse without "

It seems that Python and JSON module have different conventions for infinity in JSON. "Infinity" or "-Infinity" is not correctly parsed in Python (they are parsed as a string).

Inifinity or NaN is not necessary for now, so I'll prohibit using them in visq.

it was error not qerror

I'll change it back to error.

jinevening avatar Oct 17 '22 02:10 jinevening

Commit roadmap

  • [x] Init visq module (README, requires.cmake, CMakeLists.txt) #9876
  • [x] Add unittest
  • [x] MSE
  • [x] infra format
  • [x] infra packaging

jinevening avatar Oct 18 '22 07:10 jinevening

Close this as visq is landed.

jinevening avatar Nov 24 '22 02:11 jinevening