How to verify an input image with output tensor data

Dear Technical supporters,
root@Khadas:~/inceptionv3# ./inceptionv3 inception_v3.nb goldfish_299x299.jpg

When I ran the “./inceptionv3 inception_v3.nb goldfish_299x299.jpg” command, I got the output data (e.g., output0_1001_1.dat) as follows.

khadas# ls -al *.dat
-rw-rw-r-- 1 1000 1000 268203 Feb 13  2020 input_0.dat
-rw-rw-r-- 1 1000 1000   2002 Feb 13  2020 output0_1001_1.dat

I wonder how can I display the Top5 with generated output data (e.g., output0_1001_1.dat) above.
Fore example,
vim3# ./output0_1001_1.dat ./inceptionv3-label.txt

Welcome to any hints.

Geunsik Lim.

I don’t understand what want you mean. Log information will show the top five options of probability.

Can you explain the function of this order ?

@Frank, Let’s assume that a developer generates a output tensor (e.g., ./output0_1001_1.dat). Then, when we receive the output tensor file from the developer, I wonder how to check the ./output0_1001_1.dat file that is shared by the developer.

@leemgs Did you mean that how to check correctness of the content of the output file output0_1001_1.dat .

@Frank, Right, I want to check the correctness of the output file.

@leemgs I haven’t thought about it yet . When supporting ./inceptionv3 inception_v3.nb goldfish_299x299.jpg, in fact, the terminal will have a log information output, and finally a tpo5 with a probability value. I think comparing this value with the label file is a way to confirm whether the output file is correct . I think it’s a good time for developers to verify the output file before giving it to you. Developers can see the log information .

@Frank, Since the VIM3 board is popular with the developers that are interested in the NPU hardware, they frequently try to share the output file to compare the different precision of the output results. So, I think that the script that can display the Top5 with the output file will be greatly helpful to extend the VIM3 ecosystem and proliferation.

In this case, developers have to make a script to check a correctness on the output file directly after referencing the vnn_ShowTp5Result function at the below webpage in case of inceptionv3?

@leemgs From my point of view. It’s the safest and most effective way to do it . I think it’s not necessarily a script file, but also a verification function written in the source code. Leave a parameter entry in the main function. After generating the binary file, verify it by providing a relevant parameter .

This method is complex. If there is a unified verification script or method, it will be relatively convenient

1 Like

I think so. BTW, Does Khadas/VIM3 provide the unified verification script or method? Or Is they a plan to provide that?