Intel® Distribution of OpenVINO™ Toolkit
Community support and discussions about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all things computer vision-related on Intel® platforms.
5932 Discussions

Can't readnetwork from Blob Ptr* on x86 smart camera. but readnetwork from xml Files is ok!!

yu__rui
Beginner
235 Views

Here is the example code:

int main()
{
Core core;
CNNNetwork network1;
ExecutableNetwork exec_work1;

std::string xmlFilePath = "xxxxx.xml";
std::string binFilePath = "xxxxx.bin";

FILE* fileXml = fopen(xmlFilePath.c_str(), "rb+");
FILE* fileBin = fopen(binFilePath.c_str(), "rb+");

fseek(fileBin, 0, SEEK_END);
long int sizeBin = ftell(fileBin);
fclose(fileBin);

fileBin = fopen(binFilePath.c_str(), "rb+");
unsigned char* inbin = (unsigned char*)malloc(sizeBin);
int bytesReadBin = fread(inbin, sizeof(unsigned char), sizeBin, fileBin);
fclose(fileBin);

std::vector<uint8_t> binChar;
for (int i = 0; i < sizeBin; i++)
{
binChar.push_back(inbin[i]);
}

fseek(fileXml, 0, SEEK_END);
long int sizeXml = ftell(fileXml);
fclose(fileXml);

fileXml = fopen(xmlFilePath.c_str(), "rb+");
unsigned char* inXml = (unsigned char*)malloc(sizeXml);
int bytesReadXml = fread(inXml, sizeof(unsigned char), sizeXml, fileXml);
fclose(fileXml);

std::vector<uint8_t> XmlChar;
for (int i = 0; i < sizeXml; i++)
{
XmlChar.push_back(inXml[i]);
}
std::string xmlStr(XmlChar.begin(), XmlChar.end());
auto weightsBin = make_shared_blob<uint8_t>({ Precision::U8,{binChar.size()},Layout::ANY }, binChar.data());

network1 = core.ReadNetwork(xmlStr, weightsBin);

//network1 = core.ReadNetwork(xmlFilePath );

....

}

 

my cpu is Atom 3940?

Could Any one has met this kind of problem,?

0 Kudos
4 Replies
Wan_Intel
Moderator
209 Views

Hi Yu Rui,

Thank you for reaching out to us.


For your information, the OpenVINO™ toolkit requires Intel Atom® processor with Intel® Streaming SIMD Extensions 4.2 (Intel® SSE4.2) for target system platforms. Intel Atom® x5-E3940 Processor) is not one of them, and hence, is not supported by the OpenVINO™ toolkit.


System requirements for using OpenVINO™ toolkit is available at the following page:

https://software.intel.com/content/www/us/en/develop/tools/openvino-toolkit/system-requirements.html


On another note, Crossroad Camera C++ Demo is a demo application for person detection which supports images/video and camera as inputs.

You may refer to its main.cpp to understand how to create input blob.



Regards,

Wan


yu__rui
Beginner
185 Views

Dear Wan:

         Thanks for replying! But, I have more questions  for “Intel Atom® x5-E3940 Processor) is not one of them, and hence, is not supported by the OpenVINO™ toolkit.”:

         1. Why it works for me to read  local xml file path?

         2. Why  Atom® x5-E3940 Processor is included in openvino benchmark results? 

Wan_Intel
Moderator
174 Views

Hi Yu Rui,

Thanks for your information.


My apologies, I could not find Intel® Streaming SIMD Extensions 4.2 from Intel Atom® x5-E3940 Processor’s Product Specifications. Hence, I assumed it was not supported by Intel® Distribution of OpenVINO™ toolkit.


I had read through the Intel® Distribution of OpenVINO™ toolkit Benchmark Results. Intel® Atom™ x5-3940 was supported by Intel® Distribution of OpenVINO™ toolkit.


On another note, have you solved the issue after you referred to Crossroad Camera C++ Demo’s main.cpp?



Best regards,

Wan


Wan_Intel
Moderator
148 Views

Hi Yu Rui,


This thread will no longer be monitored since we have provided a suggestion.

If you need any additional information from Intel, please submit a new question.



Regards,

Wan


Reply