Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6406 Discussions

[security_barrier_camera_demo] How to get output data

LEE__JS1
Beginner
405 Views

Dear Dear Sir or Madam,

I got some troubles with the 'security_barrier_camera_demo' while I am modifying some.

I am trying to change the license plate character recognition model to my own model.
My concern is that how to get correct output data with my own xml file.

<My own xml file>
        <layer id="47" name="189/reshape_back" precision="FP32" type="Reshape">
            <input>
                <port id="0">
                    <dim>1</dim>
                    <dim>215</dim>
                    <dim>1</dim>
                    <dim>32</dim>
                </port>
                <port id="1">
                    <dim>3</dim>
                </port>
            </input>
            <output>
                <port id="2">
                    <dim>1</dim>
                    <dim>215</dim>
                    <dim>32</dim>
                </port>
            </output>
        </layer>
...
...

        <edge from-layer="46" from-port="1" to-layer="47" to-port="1"/>


There was some clues in 'getResults' function of 'class Lpr' in 'security_barrier_camera_demo/net_wrappers.hpp' file.
The original output data should follow the rules in 'license-plate-recognition-barrier-0001.xml'.
And I have no idea how to get the output data with my own model.

Sincerely,
JS


<'security_barrier_camera_demo/net_wrappers.hpp'>

std::string result;
        result.reserve(14u + 6u);  // the longest province name + 6 plate signs
        // up to 88 items per license plate, ended with "-1"
        const auto data = inferRequest.GetBlob(LprOutputName)->buffer().as<float*>();
        for (int i = 0; i < maxSequenceSizePerPlate; i++) {
            if (data == -1) {
                break;
            }
            result += items[static_cast<std::vector<std::string>::size_type>(data)];
        }
        return result;


<'license-plate-recognition-barrier-0001.xml'>
        <layer id="44" name="decode" precision="FP16" type="CTCGreedyDecoder">
            <data ctc_merge_repeated="1"/>
            <input>
                <port id="0">
                    <dim>88</dim>
                    <dim>1</dim>
                    <dim>71</dim>
                </port>
                <port id="1">
                    <dim>88</dim>
                    <dim>1</dim>
                </port>
            </input>
            <output>
                <port id="2">
                    <dim>1</dim>
                    <dim>88</dim>
                    <dim>1</dim>
                    <dim>1</dim>
                </port>
            </output>
        </layer>
...
...
...
        <edge from-layer="43" from-port="0" to-layer="44" to-port="1"/>

0 Kudos
0 Replies
Reply