Programming/c# & winform2020. 10. 23. 14:38

예전 MFC 보다 많이 편해진 느낌?

 

 

private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
    e.Cancel = true;
}

[링크 : https://stackoverflow.com/questions/14943/how-to-disable-alt-f4-closing-form]

'Programming > c# & winform' 카테고리의 다른 글

c# winform picturebox 끼리는 투명 적용 되지 않음  (0) 2020.10.23
자식에서 부모창의 자원 접근하기  (0) 2020.10.23
markdig custom markdown  (0) 2020.10.22
pdfsharp , migradoc  (0) 2020.10.22
itext7  (0) 2020.10.22
Posted by 구차니

결론(?)은 팀 탐색기에서 하면 됨.

 

[링크 : https://ssu-gongdoli.tistory.com/47]

[링크 : http://euhyeji.blogspot.com/2019/08/github-2.html]

Posted by 구차니
Programming/c# & winform2020. 10. 22. 18:24

돌려는 봤는데 어렵네 ㅠㅠ

어떻게 파서를 짜야하려나?

 

[링크 : https://www.cyotek.com/blog/writing-custom-markdig-extensions]

  [링크 : https://www.cyotek.com/downloads/view/MarkdigMantisLink.zip/]

 

[링크 : https://odetocode.com/blogs/scott/archive/2020/01/23/a-custom-renderer-extension-for-markdig.aspx]

 

+ 2020.10.29

원래 구현하고자 하는 것은

[ ]

[x]

을 받으면 HTML의 input type=checkbox 로 변환하는 건데

MantisLink 예제를 따라해보니 [는 걸려지지 않는다.

아무래도 링크로 연관되어 [는 이미 처리되어버리기 때문에 걸러내질 못하는 듯..

 

그러면 github 등에서 어떻게 구현을 해서 쓰고 있는걸까?

'Programming > c# & winform' 카테고리의 다른 글

자식에서 부모창의 자원 접근하기  (0) 2020.10.23
c# winform 자식 다이얼로그에서 F4 막기  (0) 2020.10.23
pdfsharp , migradoc  (0) 2020.10.22
itext7  (0) 2020.10.22
c# pdf itextsharp -> itext7  (0) 2020.10.22
Posted by 구차니
Programming/c# & winform2020. 10. 22. 18:04

MIT license

[링크 : http://www.pdfsharp.net/Licensing.ashx]

 

 

다만 html 을 pdf로 변환하는 기능은 없다고 -_ㅠ

Can I use PDFsharp to convert HTML or RTF to PDF?¶
No, not "out of the box", and we do not plan to write such a converter in the near future.

Yes, PDFsharp with some extra code can do it. But we do not supply that extra code.
On NuGet and other sources you can find a third party library "HTML Renderer for PDF using PdfSharp" that converts HTML to PDF. And there may be other libraries for the same or similar purposes, too. Maybe they work for you, maybe they get you started.

[링크 : https://stackoverflow.com/questions/48759671/convert-html-string-to-pdf-with-migradoc]

 

+

HtmlRenderer.RdfSharp 라는게 가장 위에 나오는데

BSD 3 clause 라이센스..

[링크 : https://archive.codeplex.com/?p=htmlrenderer]

[링크 : https://github.com/ArthurHub/HTML-Renderer]

'Programming > c# & winform' 카테고리의 다른 글

c# winform 자식 다이얼로그에서 F4 막기  (0) 2020.10.23
markdig custom markdown  (0) 2020.10.22
itext7  (0) 2020.10.22
c# pdf itextsharp -> itext7  (0) 2020.10.22
c# print 하기  (0) 2020.10.19
Posted by 구차니
Programming/c# & winform2020. 10. 22. 16:51

HtmlConverter.ConvertToPdf()

는 하나의 HTML을 pdf로 변환하고 close 하기 때문에

merger를 이용해서 합쳐야 하는 듯 하고

 

HtmlConverter.ConvertToDocument()

는 pdf로 변환하지만 ConvertToPdf()와는 다르게 div()를 정상적으로 처리하지 못한다.

 

[링크 : https://kb.itextpdf.com/home/it7kb/ebooks/itext-7-converting-html-to-pdf-with-pdfhtml/chapter-7-frequently-asked-questions-about-pdfhtml/how-to-parse-multiple-html-files-into-one-pdf] java

 

private void button2_Click(object sender, EventArgs e)
        {
            String DEST = "hello_world.pdf";

            FileInfo file = new FileInfo(DEST);
            file.Directory.Create();

            PdfWriter writer = new PdfWriter(DEST);
            PdfDocument pdf = new PdfDocument(writer);
            Document document = new Document(pdf, PageSize.A4.Rotate());
            document.SetMargins(20, 20, 20, 20);
            PdfMerger pdfMerger = new PdfMerger(pdf);

            document.Add(new Paragraph("Hello World!"));

            String[] SRC = {
            @"d:\test1.html",
            @"d:\test2.html",
            @"d:\test3.html",
            @"d:\test4.html" };

            foreach (var html in SRC)
            {
                MemoryStream baos = new MemoryStream();
                PdfDocument temp = new PdfDocument(new PdfWriter(baos));
                temp.SetDefaultPageSize(PageSize.A4.Rotate());
                HtmlConverter.ConvertToPdf(System.IO.File.ReadAllText(html), temp, new ConverterProperties());
                ReaderProperties rp = new ReaderProperties();
                baos = new MemoryStream(baos.ToArray());
                temp = new PdfDocument(new PdfReader(baos, rp));
                pdfMerger.Merge(temp, 1, temp.GetNumberOfPages());
                temp.Close();
            }
            pdfMerger.Close();            
        }

[링크 : https://stackoverflow.com/questions/57415902/generate-one-pdf-document-with-multiple-pages-converting-from-html-using-itext-7] .net

 

pdf 특성상 붙이는 파일의 용지 방향을 지정해 주어야 한다.

[링크 : https://stackoverflow.com/questions/54347293/how-to-set-orientation-to-landscape-in-itext-7]

'Programming > c# & winform' 카테고리의 다른 글

markdig custom markdown  (0) 2020.10.22
pdfsharp , migradoc  (0) 2020.10.22
c# pdf itextsharp -> itext7  (0) 2020.10.22
c# print 하기  (0) 2020.10.19
c# printer 사용하기 - printer enumeration  (0) 2020.10.19
Posted by 구차니
Programming/c# & winform2020. 10. 22. 15:10

iTextSharp

pdf 파일에 직접 내용을 만들어 넣기(Paragraph 등으로)

[링크 : http://www.csharpstudy.com/Practical/Prac-pdf.aspx]

[링크 : https://stackoverflow.com/questions/11307749/creating-multiple-page-pdf-using-itextsharp]

  [링크 : https://www.nuget.org/packages/iTextSharp/]

 

iTextSharp에 HTML 내용을 넣기

[링크 : https://jujun.tistory.com/118]

 

iTextSharp

Docuement.NewPage()

한페이지 추가하기

[링크 : https://stackoverflow.com/questions/4124106/add-a-page-to-pdf-document-using-itextsharp]

 

 

        private void button2_Click(object sender, EventArgs e)
        {

            Document doc = new Document(iTextSharp.text.PageSize.A4);
            PdfWriter wr = PdfWriter.GetInstance(doc, new FileStream("simple.pdf", FileMode.Create));

            doc.Open();

            doc.AddTitle("Simple PDF 생성 예제");
            doc.AddAuthor("Alex");
            doc.AddCreationDate();

            // 영문쓰기
            doc.Add(new Paragraph("English : How are you?"));
            doc.Add(new Paragraph("국문: 어때요?"));

            doc.NewPage();

            StyleSheet styles = new StyleSheet();
            HtmlWorker hw = new HtmlWorker(doc);

            String html_data = System.IO.File.ReadAllText(@"d:\test.html");
            hw.Parse(new StringReader(html_data));

            doc.NewPage();

            String html_data2 = System.IO.File.ReadAllText(@"d:\test2.html");
            hw.Parse(new StringReader(html_data2));

            hw.EndDocument();
            hw.Close();

            doc.Close();
        }

---

 

 

using iText.Kernel.Pdf;
using iText.Layout;
using iText.Layout.Element;

using iText.Html2pdf;
using iText.Html2pdf.Attach.Impl;
using iText.Layout.Font;

        private void button2_Click(object sender, EventArgs e)
        {
            String DEST = "hello_world.pdf";

            FileInfo file = new FileInfo(DEST);
            file.Directory.Create();

            PdfWriter writer = new PdfWriter(DEST);
            PdfDocument pdf = new PdfDocument(writer);
            Document document = new Document(pdf);
            document.Add(new Paragraph("Hello World!"));

            HtmlConverter.ConvertToPdf(new FileStream(@"d:\test2.html", FileMode.Open), pdf);
            document.Close();
        }

[링크 : https://kb.itextpdf.com/home/it7kb/examples/pdfhtml-accessible-pdf-creation]

 

[링크 : https://github.com/itext/itextsharp]

[링크 : https://github.com/itext/itext7-dotnet]

 

+

document.Add(new AreaBreak());

[링크 : https://stackoverflow.com/questions/17198337/how-can-i-make-a-page-break-using-itext]

[링크 : https://www.tutorialspoint.com/itext/itext_adding_areabreak.htm]

 

 

+

ConverToPdf() 메소드는 호출 이후 document를 close() 해버린다고.. -_-

The convertToPdf()/ConvertToPdf() methods create a complete PDF file. Any File, FileInfo, OutputStream, PdfWriter (Java/.NET), or PdfDocument (Java/.NET) that is passed to the convertToPdf()/ConvertToPdf() method is closed once the input is parsed and converted to PDF. This might not always be what you want.

In some cases, you want to add some extra information to the Document(Java/.NET), or maybe you don't want to convert the HTML to a PDF file, but to a series of iText objects you can use for a different purpose. That's what the convertToDocument()/ConvertToDocument() and convertToElements()/ConvertToElements() methods are about.

In the C01E07_HelloWorld.java example, we convert our Hello World HTML to a Document (Java/.NET) because we want to add some extra content after we've done parsing the HTML:

[링크 : https://kb.itextpdf.com/.../itext-7-converting-html-to-pdf-with-pdfhtml/chapter-1-hello-html-to-pdf]

'Programming > c# & winform' 카테고리의 다른 글

pdfsharp , migradoc  (0) 2020.10.22
itext7  (0) 2020.10.22
c# print 하기  (0) 2020.10.19
c# printer 사용하기 - printer enumeration  (0) 2020.10.19
c# dialog dual screen  (0) 2020.10.15
Posted by 구차니
프로그램 사용/xournal2020. 10. 22. 13:56

ubuntu 18.04를 쓰는데

우분투에서 관리하는 xournal++은 프린트가 안되는 문제가 있다.

Version 1.0.16버전에서는 프린트시 파일로 저장하기 밖에 안뜨는데

PPA로 설치하니 1.1.0+dev 버전으로 설치되고 프린트에 정상적으로 목록이 출력된다.

 

[링크 : https://xournalpp.github.io/installation/]

 

짧은 영어로 올린다고 힘들었는데 너무 싱겁게 해결!

[링크 : https://github.com/xournalpp/xournalpp/issues/2329]

'프로그램 사용 > xournal' 카테고리의 다른 글

xournal++  (0) 2020.09.16
xournal 획 삭제 기본값으로 설정하기  (0) 2019.06.03
Posted by 구차니
개소리 왈왈/컴퓨터2020. 10. 22. 10:18

어제 odroid xu4 밑면 닦아주니 노이즈가 덜해져서

위아래로 PCB 세척제를 써서 닦아주면 잘되겠지? 하고 회사 가져왔는데

출근하면서 자다가 눌렸나 금이 쫙! ㅠㅠ

부팅이 안되서 다른거 닦다가 망가트렸나 싶어서 SD 리더에 읽어보니 응답없음.. ㅠㅠ

 

잘가 ㅠㅠ 고생했어 ㅠㅠ

 

 

1년에 하나 부숴먹는건가!

2020/05/19 - [개소리 왈왈/사진과 수다] - sd 카드는 부서지는 거구나 ㅠㅠ

Posted by 구차니

dmesg 결과는 아래와 같은데.. 얘도 google coral 처럼 어떠한 장치명으로 붙는건 아닌듯

[ 1986.033911] usb 2-1.3: new high-speed USB device number 6 using ehci-pci
[ 1986.143012] usb 2-1.3: New USB device found, idVendor=03e7, idProduct=2485, bcdDevice= 0.01
[ 1986.143019] usb 2-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1986.143023] usb 2-1.3: Product: Movidius MyriadX
[ 1986.143027] usb 2-1.3: Manufacturer: Movidius Ltd.
[ 1986.143030] usb 2-1.3: SerialNumber: 00000000

 

coral 보다 더 성의가 없는데? 아예 이름이 없어!

$ lsusb
Bus 002 Device 004: ID 04f2:b242 Chicony Electronics Co., Ltd 
Bus 002 Device 006: ID 03e7:2485  
Bus 002 Device 005: ID 04e8:6860 Samsung Electronics Co., Ltd Galaxy (MTP)
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 04b4:6560 Cypress Semiconductor Corp. CY7C65640 USB-2.0 "TetraHub"
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

 

UNCLAINMED 라고 나오는건 어떤 특성인가? coral과 다르게 serial이 실제로 출력된다.

$ sudo lshw
                 *-usb:1 UNCLAIMED
                      description: Generic USB device
                      product: Movidius MyriadX
                      vendor: Movidius Ltd.
                      physical id: 3
                      bus info: usb@2:1.3
                      version: 0.01
                      serial: 00000000
                      capabilities: usb-2.00
                      configuration: maxpower=500mA speed=480Mbit/s

 

하라는대로 설치하는데 에러가 난다 -_-

tensorflow 버전 1.15.2 에서 3.8을 요구하는데 python이 3.6.9 버전밖에 안되다 보니 중단된다.

/opt/intel/openvino_2021/install_dependencies$ ./install_NCS_udev_rules.sh 
Updating udev rules...
Udev rules have been successfully installed.
/opt/intel/openvino_2021/install_dependencies$ cd ../deployment_tools/model_optimizer/install_prerequisites/
/opt/intel/openvino_2021/deployment_tools/model_optimizer/install_prerequisites$ ./install_prerequisites
install_prerequisites.sh        install_prerequisites_onnx.sh
install_prerequisites_caffe.sh  install_prerequisites_tf.sh
install_prerequisites_kaldi.sh  install_prerequisites_tf2.sh
install_prerequisites_mxnet.sh  
/opt/intel/openvino_2021/deployment_tools/model_optimizer/install_prerequisites$ ./install_prerequisites.sh
기존:1 https://apt.repos.intel.com/openvino/2021 all InRelease
기존:2 https://packages.microsoft.com/repos/vscode stable InRelease            
기존:3 http://apt.postgresql.org/pub/repos/apt bionic-pgdg InRelease           
기존:4 http://dl.openfoam.org/ubuntu bionic InRelease                          
기존:6 http://kr.archive.ubuntu.com/ubuntu bionic InRelease                    
받기:7 https://packages.cloud.google.com/apt coral-edgetpu-stable InRelease [6332 B]
받기:5 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]   
받기:8 http://kr.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]  
받기:10 http://security.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [48.9 kB]
받기:11 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [58.8 kB]
받기:12 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2464 B]
받기:9 http://kr.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
받기:13 http://kr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 DEP-11 Metadata [295 kB]
받기:14 http://kr.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 DEP-11 Metadata [287 kB]
받기:15 http://kr.archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 DEP-11 Metadata [2464 B]
받기:16 http://kr.archive.ubuntu.com/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [9288 B]
내려받기 468 k바이트, 소요시간 10초 (46.4 k바이트/초)                          
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다       
상태 정보를 읽는 중입니다... 완료
8 packages can be upgraded. Run 'apt list --upgradable' to see them.
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다       
상태 정보를 읽는 중입니다... 완료
패키지 python3-pip는 이미 최신 버전입니다 (9.0.1-2.3~ubuntu1.18.04.3).
다음 패키지가 자동으로 설치되었지만 더 이상 필요하지 않습니다:
  linux-headers-5.4.0-48-generic linux-hwe-5.4-headers-5.4.0-48
  linux-image-5.4.0-48-generic linux-modules-5.4.0-48-generic
  linux-modules-extra-5.4.0-48-generic
Use 'sudo apt autoremove' to remove them.
다음 새 패키지를 설치할 것입니다:
  libgfortran5 python3-venv python3.6-venv
0개 업그레이드, 3개 새로 설치, 0개 제거 및 8개 업그레이드 안 함.
596 k바이트 아카이브를 받아야 합니다.
이 작업 후 2704 k바이트의 디스크 공간을 더 사용하게 됩니다.
받기:1 http://kr.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 libgfortran5 amd64 8.4.0-1ubuntu1~18.04 [589 kB]
받기:2 http://kr.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 python3.6-venv amd64 3.6.9-1~18.04ubuntu1.3 [6180 B]
받기:3 http://kr.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 python3-venv amd64 3.6.7-1~18.04 [1208 B]
내려받기 596 k바이트, 소요시간 4초 (159 k바이트/초)
Selecting previously unselected package libgfortran5:amd64.
(데이터베이스 읽는중 ...현재 326645개의 파일과 디렉터리가 설치되어 있습니다.)
Preparing to unpack .../libgfortran5_8.4.0-1ubuntu1~18.04_amd64.deb ...
Unpacking libgfortran5:amd64 (8.4.0-1ubuntu1~18.04) ...
Selecting previously unselected package python3.6-venv.
Preparing to unpack .../python3.6-venv_3.6.9-1~18.04ubuntu1.3_amd64.deb ...
Unpacking python3.6-venv (3.6.9-1~18.04ubuntu1.3) ...
Selecting previously unselected package python3-venv.
Preparing to unpack .../python3-venv_3.6.7-1~18.04_amd64.deb ...
Unpacking python3-venv (3.6.7-1~18.04) ...
python3.6-venv (3.6.9-1~18.04ubuntu1.3) 설정하는 중입니다 ...
libgfortran5:amd64 (8.4.0-1ubuntu1~18.04) 설정하는 중입니다 ...
python3-venv (3.6.7-1~18.04) 설정하는 중입니다 ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1.2) ...
The directory '/home/minimonk/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/minimonk/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Ignoring tensorflow: markers 'python_version >= "3.8"' don't match your environment
Collecting tensorflow<2.0,>=1.15.2 (from -r /opt/intel/openvino_2021/deployment_tools/model_optimizer/install_prerequisites/../requirements.txt (line 1))
  Could not find a version that satisfies the requirement tensorflow<2.0,>=1.15.2 (from -r /opt/intel/openvino_2021/deployment_tools/model_optimizer/install_prerequisites/../requirements.txt (line 1)) (from versions: 0.12.1, 1.0.0, 1.0.1, 1.1.0rc0, 1.1.0rc1, 1.1.0rc2, 1.1.0, 1.2.0rc0, 1.2.0rc1, 1.2.0rc2, 1.2.0, 1.2.1, 1.3.0rc0, 1.3.0rc1, 1.3.0rc2, 1.3.0, 1.4.0rc0, 1.4.0rc1, 1.4.0, 1.4.1, 1.5.0rc0, 1.5.0rc1, 1.5.0, 1.5.1, 1.6.0rc0, 1.6.0rc1, 1.6.0, 1.7.0rc0, 1.7.0rc1, 1.7.0, 1.7.1, 1.8.0rc0, 1.8.0rc1, 1.8.0, 1.9.0rc0, 1.9.0rc1, 1.9.0rc2, 1.9.0, 1.10.0rc0, 1.10.0rc1, 1.10.0, 1.10.1, 1.11.0rc0, 1.11.0rc1, 1.11.0rc2, 1.11.0, 1.12.0rc0, 1.12.0rc1, 1.12.0rc2, 1.12.0, 1.12.2, 1.12.3, 1.13.0rc0, 1.13.0rc1, 1.13.0rc2, 1.13.1, 1.13.2, 1.14.0rc0, 1.14.0rc1, 1.14.0, 2.0.0a0, 2.0.0b0, 2.0.0b1)
No matching distribution found for tensorflow<2.0,>=1.15.2 (from -r /opt/intel/openvino_2021/deployment_tools/model_optimizer/install_prerequisites/../requirements.txt (line 1))
Error on or near line 92; exiting with status 1
/opt/intel/openvino_2021/deployment_tools/model_optimizer/install_prerequisites$ ./install_prerequisites.sh
기존:1 https://apt.repos.intel.com/openvino/2021 all InRelease                 
기존:2 http://security.ubuntu.com/ubuntu bionic-security InRelease             
기존:3 http://apt.postgresql.org/pub/repos/apt bionic-pgdg InRelease           
기존:4 https://packages.microsoft.com/repos/vscode stable InRelease            
기존:5 https://packages.cloud.google.com/apt coral-edgetpu-stable InRelease    
기존:6 http://kr.archive.ubuntu.com/ubuntu bionic InRelease                    
기존:7 http://dl.openfoam.org/ubuntu bionic InRelease                          
기존:8 http://kr.archive.ubuntu.com/ubuntu bionic-updates InRelease            
기존:9 http://kr.archive.ubuntu.com/ubuntu bionic-backports InRelease
패키지 목록을 읽는 중입니다... 완료     
의존성 트리를 만드는 중입니다       
상태 정보를 읽는 중입니다... 완료
8 packages can be upgraded. Run 'apt list --upgradable' to see them.
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다       
상태 정보를 읽는 중입니다... 완료
패키지 libgfortran5는 이미 최신 버전입니다 (8.4.0-1ubuntu1~18.04).
패키지 python3-pip는 이미 최신 버전입니다 (9.0.1-2.3~ubuntu1.18.04.3).
패키지 python3-venv는 이미 최신 버전입니다 (3.6.7-1~18.04).
다음 패키지가 자동으로 설치되었지만 더 이상 필요하지 않습니다:
  linux-headers-5.4.0-48-generic linux-hwe-5.4-headers-5.4.0-48
  linux-image-5.4.0-48-generic linux-modules-5.4.0-48-generic
  linux-modules-extra-5.4.0-48-generic
Use 'sudo apt autoremove' to remove them.
0개 업그레이드, 0개 새로 설치, 0개 제거 및 8개 업그레이드 안 함.
The directory '/home/minimonk/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/minimonk/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Ignoring tensorflow: markers 'python_version >= "3.8"' don't match your environment
Collecting tensorflow<2.0,>=1.15.2 (from -r /opt/intel/openvino_2021/deployment_tools/model_optimizer/install_prerequisites/../requirements.txt (line 1))
  Could not find a version that satisfies the requirement tensorflow<2.0,>=1.15.2 (from -r /opt/intel/openvino_2021/deployment_tools/model_optimizer/install_prerequisites/../requirements.txt (line 1)) (from versions: 0.12.1, 1.0.0, 1.0.1, 1.1.0rc0, 1.1.0rc1, 1.1.0rc2, 1.1.0, 1.2.0rc0, 1.2.0rc1, 1.2.0rc2, 1.2.0, 1.2.1, 1.3.0rc0, 1.3.0rc1, 1.3.0rc2, 1.3.0, 1.4.0rc0, 1.4.0rc1, 1.4.0, 1.4.1, 1.5.0rc0, 1.5.0rc1, 1.5.0, 1.5.1, 1.6.0rc0, 1.6.0rc1, 1.6.0, 1.7.0rc0, 1.7.0rc1, 1.7.0, 1.7.1, 1.8.0rc0, 1.8.0rc1, 1.8.0, 1.9.0rc0, 1.9.0rc1, 1.9.0rc2, 1.9.0, 1.10.0rc0, 1.10.0rc1, 1.10.0, 1.10.1, 1.11.0rc0, 1.11.0rc1, 1.11.0rc2, 1.11.0, 1.12.0rc0, 1.12.0rc1, 1.12.0rc2, 1.12.0, 1.12.2, 1.12.3, 1.13.0rc0, 1.13.0rc1, 1.13.0rc2, 1.13.1, 1.13.2, 1.14.0rc0, 1.14.0rc1, 1.14.0, 2.0.0a0, 2.0.0b0, 2.0.0b1)
No matching distribution found for tensorflow<2.0,>=1.15.2 (from -r /opt/intel/openvino_2021/deployment_tools/model_optimizer/install_prerequisites/../requirements.txt (line 1))
Error on or near line 92; exiting with status 1

 

그래서 로 직접 설치하니 1.14 였나 1.15 였나 약간 낮은 버전이 설치 되면서 넘어간다 (ubuntu 18.04.5 LTS)

$ pip3 install tensorflow

 

그래서 데모를 실행하는데 일단 에러!

에러를 봐서는 "Can not init Myriad device: NC_ERROR" 장치가 연결되지 않아서 그런것 같다.

 

~$ cd /opt/intel/openvino_2021/deployment_tools/demo/
/opt/intel/openvino_2021/deployment_tools/demo$ ./demo_squeezenet_download_convert_run.sh -d MYRIAD
target = MYRIAD
target_precision = FP16
[setupvars.sh] OpenVINO environment initialized


###################################################



Downloading the Caffe model and the prototxt
Installing dependencies
기존:1 https://apt.repos.intel.com/openvino/2021 all InRelease
기존:2 https://packages.microsoft.com/repos/vscode stable InRelease            
기존:3 http://apt.postgresql.org/pub/repos/apt bionic-pgdg InRelease           
받기:4 https://packages.cloud.google.com/apt coral-edgetpu-stable InRelease [6332 B]
기존:5 http://kr.archive.ubuntu.com/ubuntu bionic InRelease                    
기존:6 http://security.ubuntu.com/ubuntu bionic-security InRelease             
기존:7 http://dl.openfoam.org/ubuntu bionic InRelease                          
기존:8 http://kr.archive.ubuntu.com/ubuntu bionic-updates InRelease            
기존:9 http://kr.archive.ubuntu.com/ubuntu bionic-backports InRelease
내려받기 6332 바이트, 소요시간 2초 (3924 바이트/초)
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다       
상태 정보를 읽는 중입니다... 완료
8 packages can be upgraded. Run 'apt list --upgradable' to see them.
Run sudo -E apt -y install build-essential python3-pip virtualenv cmake libcairo2-dev libpango1.0-dev libglib2.0-dev libgtk2.0-dev libswscale-dev libavcodec-dev libavformat-dev libgstreamer1.0-0 gstreamer1.0-plugins-base

패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다       
상태 정보를 읽는 중입니다... 완료
패키지 build-essential는 이미 최신 버전입니다 (12.4ubuntu1).
패키지 cmake는 이미 최신 버전입니다 (3.10.2-1ubuntu2.18.04.1).
패키지 gstreamer1.0-plugins-base는 이미 최신 버전입니다 (1.14.5-0ubuntu1~18.04.1).
gstreamer1.0-plugins-base 패키지는 수동설치로 지정합니다.
패키지 libgstreamer1.0-0는 이미 최신 버전입니다 (1.14.5-0ubuntu1~18.04.1).
libgstreamer1.0-0 패키지는 수동설치로 지정합니다.
패키지 python3-pip는 이미 최신 버전입니다 (9.0.1-2.3~ubuntu1.18.04.3).
다음 패키지가 자동으로 설치되었지만 더 이상 필요하지 않습니다:
  linux-headers-5.4.0-48-generic linux-hwe-5.4-headers-5.4.0-48
  linux-image-5.4.0-48-generic linux-modules-5.4.0-48-generic
  linux-modules-extra-5.4.0-48-generic
Use 'sudo apt autoremove' to remove them.
다음의 추가 패키지가 설치될 것입니다 :
  gir1.2-gtk-2.0 gir1.2-harfbuzz-0.0 icu-devtools libatk1.0-dev libavutil-dev
  libcairo-script-interpreter2 libfontconfig1-dev libfreetype6-dev
  libgdk-pixbuf2.0-dev libglib2.0-dev-bin libgraphite2-dev libharfbuzz-dev
  libharfbuzz-gobject0 libicu-dev libicu-le-hb-dev libicu-le-hb0 libiculx60
  libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libpixman-1-dev
  libpng-dev libpng-tools libswresample-dev libxcb-shm0-dev libxcomposite-dev
  libxcursor-dev libxft-dev libxinerama-dev libxml2-utils libxrandr-dev
  libxrender-dev python3-virtualenv x11proto-composite-dev x11proto-randr-dev
  x11proto-xinerama-dev
제안하는 패키지:
  libcairo2-doc libglib2.0-doc libgraphite2-utils libgtk2.0-doc icu-doc
  libpango1.0-doc
다음 새 패키지를 설치할 것입니다:
  gir1.2-gtk-2.0 gir1.2-harfbuzz-0.0 icu-devtools libatk1.0-dev libavcodec-dev
  libavformat-dev libavutil-dev libcairo-script-interpreter2 libcairo2-dev
  libfontconfig1-dev libfreetype6-dev libgdk-pixbuf2.0-dev libglib2.0-dev
  libglib2.0-dev-bin libgraphite2-dev libgtk2.0-dev libharfbuzz-dev
  libharfbuzz-gobject0 libicu-dev libicu-le-hb-dev libicu-le-hb0 libiculx60
  libpango1.0-dev libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5
  libpixman-1-dev libpng-dev libpng-tools libswresample-dev libswscale-dev
  libxcb-shm0-dev libxcomposite-dev libxcursor-dev libxft-dev libxinerama-dev
  libxml2-utils libxrandr-dev libxrender-dev python3-virtualenv virtualenv
  x11proto-composite-dev x11proto-randr-dev x11proto-xinerama-dev
0개 업그레이드, 45개 새로 설치, 0개 제거 및 8개 업그레이드 안 함.
26.4 M바이트 아카이브를 받아야 합니다.
이 작업 후 123 M바이트의 디스크 공간을 더 사용하게 됩니다.
받기:1 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 gir1.2-gtk-2.0 amd64 2.24.32-1ubuntu1 [172 kB]
받기:2 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 gir1.2-harfbuzz-0.0 amd64 1.7.2-1ubuntu1 [18.6 kB]
받기:3 http://kr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 icu-devtools amd64 60.2-3ubuntu3.1 [179 kB]
받기:4 http://kr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libglib2.0-dev-bin amd64 2.56.4-0ubuntu0.18.04.6 [102 kB]
받기:5 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 libpcre16-3 amd64 2:8.39-9 [147 kB]
받기:6 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 libpcre32-3 amd64 2:8.39-9 [138 kB]
받기:7 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 libpcrecpp0v5 amd64 2:8.39-9 [15.3 kB]
받기:8 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 libpcre3-dev amd64 2:8.39-9 [537 kB]
받기:9 http://kr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libglib2.0-dev amd64 2.56.4-0ubuntu0.18.04.6 [1385 kB]
받기:10 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 libatk1.0-dev amd64 2.28.1-1 [79.9 kB]
받기:11 http://kr.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 libavutil-dev amd64 7:3.4.8-0ubuntu0.2 [294 kB]
받기:12 http://kr.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 libswresample-dev amd64 7:3.4.8-0ubuntu0.2 [68.7 kB]
받기:13 http://kr.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 libavcodec-dev amd64 7:3.4.8-0ubuntu0.2 [5079 kB]
받기:14 http://kr.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 libavformat-dev amd64 7:3.4.8-0ubuntu0.2 [1132 kB]
받기:15 http://kr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcairo-script-interpreter2 amd64 1.15.10-2ubuntu0.1 [53.5 kB]
받기:16 http://kr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpng-dev amd64 1.6.34-1ubuntu0.18.04.2 [177 kB]
받기:17 http://kr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libfreetype6-dev amd64 2.8.1-2ubuntu2.1 [2539 kB]
받기:18 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 libfontconfig1-dev amd64 2.12.6-0ubuntu2 [689 kB]
받기:19 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 libxrender-dev amd64 1:0.9.10-1 [24.9 kB]
받기:20 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 libpixman-1-dev amd64 0.34.0-2 [244 kB]
받기:21 http://kr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libxcb-shm0-dev amd64 1.13-2~ubuntu18.04 [6684 B]
받기:22 http://kr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcairo2-dev amd64 1.15.10-2ubuntu0.1 [626 kB]
받기:23 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 libgdk-pixbuf2.0-dev amd64 2.36.11-2 [46.8 kB]
받기:24 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 libgraphite2-dev amd64 1.3.11-2 [14.5 kB]
받기:25 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 libharfbuzz-gobject0 amd64 1.7.2-1ubuntu1 [13.4 kB]
받기:26 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 libicu-le-hb0 amd64 1.0.3+git161113-4 [14.3 kB]
받기:27 http://kr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libiculx60 amd64 60.2-3ubuntu3.1 [19.0 kB]
받기:28 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 libicu-le-hb-dev amd64 1.0.3+git161113-4 [29.5 kB]
받기:29 http://kr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libicu-dev amd64 60.2-3ubuntu3.1 [8889 kB]
받기:30 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 libharfbuzz-dev amd64 1.7.2-1ubuntu1 [302 kB]
받기:31 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 libxft-dev amd64 2.3.2-1 [45.7 kB]
받기:32 http://kr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpango1.0-dev amd64 1.40.14-1ubuntu0.1 [288 kB]
받기:33 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 x11proto-xinerama-dev all 2018.4-4 [2628 B]
받기:34 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 libxinerama-dev amd64 2:1.1.3-1 [8404 B]
받기:35 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 x11proto-randr-dev all 2018.4-4 [2620 B]
받기:36 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 libxrandr-dev amd64 2:1.5.1-1 [24.0 kB]
받기:37 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 libxcursor-dev amd64 1:1.1.15-1 [26.5 kB]
받기:38 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 x11proto-composite-dev all 1:2018.4-4 [2620 B]
받기:39 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 libxcomposite-dev amd64 1:0.4.4-2 [9136 B]
받기:40 http://kr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libxml2-utils amd64 2.9.4+dfsg1-6.1ubuntu1.3 [35.9 kB]
받기:41 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 libgtk2.0-dev amd64 2.24.32-1ubuntu1 [2652 kB]
받기:42 http://kr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpng-tools amd64 1.6.34-1ubuntu0.18.04.2 [25.6 kB]
받기:43 http://kr.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 libswscale-dev amd64 7:3.4.8-0ubuntu0.2 [166 kB]
받기:44 http://kr.archive.ubuntu.com/ubuntu bionic/universe amd64 python3-virtualenv all 15.1.0+ds-1.1 [43.4 kB]
받기:45 http://kr.archive.ubuntu.com/ubuntu bionic/universe amd64 virtualenv all 15.1.0+ds-1.1 [4476 B]
내려받기 26.4 M바이트, 소요시간 1분 4초 (412 k바이트/초)                       
패키지에서 템플릿을 추출하는 중: 100%
Selecting previously unselected package gir1.2-gtk-2.0.
(데이터베이스 읽는중 ...현재 326659개의 파일과 디렉터리가 설치되어 있습니다.)
Preparing to unpack .../00-gir1.2-gtk-2.0_2.24.32-1ubuntu1_amd64.deb ...
Unpacking gir1.2-gtk-2.0 (2.24.32-1ubuntu1) ...
Selecting previously unselected package gir1.2-harfbuzz-0.0:amd64.
Preparing to unpack .../01-gir1.2-harfbuzz-0.0_1.7.2-1ubuntu1_amd64.deb ...
Unpacking gir1.2-harfbuzz-0.0:amd64 (1.7.2-1ubuntu1) ...
Selecting previously unselected package icu-devtools.
Preparing to unpack .../02-icu-devtools_60.2-3ubuntu3.1_amd64.deb ...
Unpacking icu-devtools (60.2-3ubuntu3.1) ...
Selecting previously unselected package libglib2.0-dev-bin.
Preparing to unpack .../03-libglib2.0-dev-bin_2.56.4-0ubuntu0.18.04.6_amd64.deb ...
Unpacking libglib2.0-dev-bin (2.56.4-0ubuntu0.18.04.6) ...
Selecting previously unselected package libpcre16-3:amd64.
Preparing to unpack .../04-libpcre16-3_2%3a8.39-9_amd64.deb ...
Unpacking libpcre16-3:amd64 (2:8.39-9) ...
Selecting previously unselected package libpcre32-3:amd64.
Preparing to unpack .../05-libpcre32-3_2%3a8.39-9_amd64.deb ...
Unpacking libpcre32-3:amd64 (2:8.39-9) ...
Selecting previously unselected package libpcrecpp0v5:amd64.
Preparing to unpack .../06-libpcrecpp0v5_2%3a8.39-9_amd64.deb ...
Unpacking libpcrecpp0v5:amd64 (2:8.39-9) ...
Selecting previously unselected package libpcre3-dev:amd64.
Preparing to unpack .../07-libpcre3-dev_2%3a8.39-9_amd64.deb ...
Unpacking libpcre3-dev:amd64 (2:8.39-9) ...
Selecting previously unselected package libglib2.0-dev:amd64.
Preparing to unpack .../08-libglib2.0-dev_2.56.4-0ubuntu0.18.04.6_amd64.deb ...
Unpacking libglib2.0-dev:amd64 (2.56.4-0ubuntu0.18.04.6) ...
Selecting previously unselected package libatk1.0-dev:amd64.
Preparing to unpack .../09-libatk1.0-dev_2.28.1-1_amd64.deb ...
Unpacking libatk1.0-dev:amd64 (2.28.1-1) ...
Selecting previously unselected package libavutil-dev:amd64.
Preparing to unpack .../10-libavutil-dev_7%3a3.4.8-0ubuntu0.2_amd64.deb ...
Unpacking libavutil-dev:amd64 (7:3.4.8-0ubuntu0.2) ...
Selecting previously unselected package libswresample-dev:amd64.
Preparing to unpack .../11-libswresample-dev_7%3a3.4.8-0ubuntu0.2_amd64.deb ...
Unpacking libswresample-dev:amd64 (7:3.4.8-0ubuntu0.2) ...
Selecting previously unselected package libavcodec-dev:amd64.
Preparing to unpack .../12-libavcodec-dev_7%3a3.4.8-0ubuntu0.2_amd64.deb ...
Unpacking libavcodec-dev:amd64 (7:3.4.8-0ubuntu0.2) ...
Selecting previously unselected package libavformat-dev:amd64.
Preparing to unpack .../13-libavformat-dev_7%3a3.4.8-0ubuntu0.2_amd64.deb ...
Unpacking libavformat-dev:amd64 (7:3.4.8-0ubuntu0.2) ...
Selecting previously unselected package libcairo-script-interpreter2:amd64.
Preparing to unpack .../14-libcairo-script-interpreter2_1.15.10-2ubuntu0.1_amd64.deb ...
Unpacking libcairo-script-interpreter2:amd64 (1.15.10-2ubuntu0.1) ...
Selecting previously unselected package libpng-dev:amd64.
Preparing to unpack .../15-libpng-dev_1.6.34-1ubuntu0.18.04.2_amd64.deb ...
Unpacking libpng-dev:amd64 (1.6.34-1ubuntu0.18.04.2) ...
Selecting previously unselected package libfreetype6-dev:amd64.
Preparing to unpack .../16-libfreetype6-dev_2.8.1-2ubuntu2.1_amd64.deb ...
Unpacking libfreetype6-dev:amd64 (2.8.1-2ubuntu2.1) ...
Selecting previously unselected package libfontconfig1-dev:amd64.
Preparing to unpack .../17-libfontconfig1-dev_2.12.6-0ubuntu2_amd64.deb ...
Unpacking libfontconfig1-dev:amd64 (2.12.6-0ubuntu2) ...
Selecting previously unselected package libxrender-dev:amd64.
Preparing to unpack .../18-libxrender-dev_1%3a0.9.10-1_amd64.deb ...
Unpacking libxrender-dev:amd64 (1:0.9.10-1) ...
Selecting previously unselected package libpixman-1-dev:amd64.
Preparing to unpack .../19-libpixman-1-dev_0.34.0-2_amd64.deb ...
Unpacking libpixman-1-dev:amd64 (0.34.0-2) ...
Selecting previously unselected package libxcb-shm0-dev:amd64.
Preparing to unpack .../20-libxcb-shm0-dev_1.13-2~ubuntu18.04_amd64.deb ...
Unpacking libxcb-shm0-dev:amd64 (1.13-2~ubuntu18.04) ...
Selecting previously unselected package libcairo2-dev:amd64.
Preparing to unpack .../21-libcairo2-dev_1.15.10-2ubuntu0.1_amd64.deb ...
Unpacking libcairo2-dev:amd64 (1.15.10-2ubuntu0.1) ...
Selecting previously unselected package libgdk-pixbuf2.0-dev.
Preparing to unpack .../22-libgdk-pixbuf2.0-dev_2.36.11-2_amd64.deb ...
Unpacking libgdk-pixbuf2.0-dev (2.36.11-2) ...
Selecting previously unselected package libgraphite2-dev:amd64.
Preparing to unpack .../23-libgraphite2-dev_1.3.11-2_amd64.deb ...
Unpacking libgraphite2-dev:amd64 (1.3.11-2) ...
Selecting previously unselected package libharfbuzz-gobject0:amd64.
Preparing to unpack .../24-libharfbuzz-gobject0_1.7.2-1ubuntu1_amd64.deb ...
Unpacking libharfbuzz-gobject0:amd64 (1.7.2-1ubuntu1) ...
Selecting previously unselected package libicu-le-hb0:amd64.
Preparing to unpack .../25-libicu-le-hb0_1.0.3+git161113-4_amd64.deb ...
Unpacking libicu-le-hb0:amd64 (1.0.3+git161113-4) ...
Selecting previously unselected package libiculx60:amd64.
Preparing to unpack .../26-libiculx60_60.2-3ubuntu3.1_amd64.deb ...
Unpacking libiculx60:amd64 (60.2-3ubuntu3.1) ...
Selecting previously unselected package libicu-le-hb-dev:amd64.
Preparing to unpack .../27-libicu-le-hb-dev_1.0.3+git161113-4_amd64.deb ...
Unpacking libicu-le-hb-dev:amd64 (1.0.3+git161113-4) ...
Selecting previously unselected package libicu-dev.
Preparing to unpack .../28-libicu-dev_60.2-3ubuntu3.1_amd64.deb ...
Unpacking libicu-dev (60.2-3ubuntu3.1) ...
Selecting previously unselected package libharfbuzz-dev:amd64.
Preparing to unpack .../29-libharfbuzz-dev_1.7.2-1ubuntu1_amd64.deb ...
Unpacking libharfbuzz-dev:amd64 (1.7.2-1ubuntu1) ...
Selecting previously unselected package libxft-dev.
Preparing to unpack .../30-libxft-dev_2.3.2-1_amd64.deb ...
Unpacking libxft-dev (2.3.2-1) ...
Selecting previously unselected package libpango1.0-dev.
Preparing to unpack .../31-libpango1.0-dev_1.40.14-1ubuntu0.1_amd64.deb ...
Unpacking libpango1.0-dev (1.40.14-1ubuntu0.1) ...
Selecting previously unselected package x11proto-xinerama-dev.
Preparing to unpack .../32-x11proto-xinerama-dev_2018.4-4_all.deb ...
Unpacking x11proto-xinerama-dev (2018.4-4) ...
Selecting previously unselected package libxinerama-dev:amd64.
Preparing to unpack .../33-libxinerama-dev_2%3a1.1.3-1_amd64.deb ...
Unpacking libxinerama-dev:amd64 (2:1.1.3-1) ...
Selecting previously unselected package x11proto-randr-dev.
Preparing to unpack .../34-x11proto-randr-dev_2018.4-4_all.deb ...
Unpacking x11proto-randr-dev (2018.4-4) ...
Selecting previously unselected package libxrandr-dev:amd64.
Preparing to unpack .../35-libxrandr-dev_2%3a1.5.1-1_amd64.deb ...
Unpacking libxrandr-dev:amd64 (2:1.5.1-1) ...
Selecting previously unselected package libxcursor-dev:amd64.
Preparing to unpack .../36-libxcursor-dev_1%3a1.1.15-1_amd64.deb ...
Unpacking libxcursor-dev:amd64 (1:1.1.15-1) ...
Selecting previously unselected package x11proto-composite-dev.
Preparing to unpack .../37-x11proto-composite-dev_1%3a2018.4-4_all.deb ...
Unpacking x11proto-composite-dev (1:2018.4-4) ...
Selecting previously unselected package libxcomposite-dev:amd64.
Preparing to unpack .../38-libxcomposite-dev_1%3a0.4.4-2_amd64.deb ...
Unpacking libxcomposite-dev:amd64 (1:0.4.4-2) ...
Selecting previously unselected package libxml2-utils.
Preparing to unpack .../39-libxml2-utils_2.9.4+dfsg1-6.1ubuntu1.3_amd64.deb ...
Unpacking libxml2-utils (2.9.4+dfsg1-6.1ubuntu1.3) ...
Selecting previously unselected package libgtk2.0-dev.
Preparing to unpack .../40-libgtk2.0-dev_2.24.32-1ubuntu1_amd64.deb ...
Unpacking libgtk2.0-dev (2.24.32-1ubuntu1) ...
Selecting previously unselected package libpng-tools.
Preparing to unpack .../41-libpng-tools_1.6.34-1ubuntu0.18.04.2_amd64.deb ...
Unpacking libpng-tools (1.6.34-1ubuntu0.18.04.2) ...
Selecting previously unselected package libswscale-dev:amd64.
Preparing to unpack .../42-libswscale-dev_7%3a3.4.8-0ubuntu0.2_amd64.deb ...
Unpacking libswscale-dev:amd64 (7:3.4.8-0ubuntu0.2) ...
Selecting previously unselected package python3-virtualenv.
Preparing to unpack .../43-python3-virtualenv_15.1.0+ds-1.1_all.deb ...
Unpacking python3-virtualenv (15.1.0+ds-1.1) ...
Selecting previously unselected package virtualenv.
Preparing to unpack .../44-virtualenv_15.1.0+ds-1.1_all.deb ...
Unpacking virtualenv (15.1.0+ds-1.1) ...
gir1.2-gtk-2.0 (2.24.32-1ubuntu1) 설정하는 중입니다 ...
libavutil-dev:amd64 (7:3.4.8-0ubuntu0.2) 설정하는 중입니다 ...
libglib2.0-dev-bin (2.56.4-0ubuntu0.18.04.6) 설정하는 중입니다 ...
libcairo-script-interpreter2:amd64 (1.15.10-2ubuntu0.1) 설정하는 중입니다 ...
libpng-tools (1.6.34-1ubuntu0.18.04.2) 설정하는 중입니다 ...
libicu-le-hb0:amd64 (1.0.3+git161113-4) 설정하는 중입니다 ...
libxcb-shm0-dev:amd64 (1.13-2~ubuntu18.04) 설정하는 중입니다 ...
libxml2-utils (2.9.4+dfsg1-6.1ubuntu1.3) 설정하는 중입니다 ...
libxrender-dev:amd64 (1:0.9.10-1) 설정하는 중입니다 ...
libswscale-dev:amd64 (7:3.4.8-0ubuntu0.2) 설정하는 중입니다 ...
gir1.2-harfbuzz-0.0:amd64 (1.7.2-1ubuntu1) 설정하는 중입니다 ...
x11proto-xinerama-dev (2018.4-4) 설정하는 중입니다 ...
libpixman-1-dev:amd64 (0.34.0-2) 설정하는 중입니다 ...
libswresample-dev:amd64 (7:3.4.8-0ubuntu0.2) 설정하는 중입니다 ...
x11proto-randr-dev (2018.4-4) 설정하는 중입니다 ...
libxinerama-dev:amd64 (2:1.1.3-1) 설정하는 중입니다 ...
python3-virtualenv (15.1.0+ds-1.1) 설정하는 중입니다 ...
libiculx60:amd64 (60.2-3ubuntu3.1) 설정하는 중입니다 ...
libpcrecpp0v5:amd64 (2:8.39-9) 설정하는 중입니다 ...
libpcre32-3:amd64 (2:8.39-9) 설정하는 중입니다 ...
icu-devtools (60.2-3ubuntu3.1) 설정하는 중입니다 ...
libpcre16-3:amd64 (2:8.39-9) 설정하는 중입니다 ...
libpng-dev:amd64 (1.6.34-1ubuntu0.18.04.2) 설정하는 중입니다 ...
virtualenv (15.1.0+ds-1.1) 설정하는 중입니다 ...
libgraphite2-dev:amd64 (1.3.11-2) 설정하는 중입니다 ...
libharfbuzz-gobject0:amd64 (1.7.2-1ubuntu1) 설정하는 중입니다 ...
x11proto-composite-dev (1:2018.4-4) 설정하는 중입니다 ...
libxcursor-dev:amd64 (1:1.1.15-1) 설정하는 중입니다 ...
libpcre3-dev:amd64 (2:8.39-9) 설정하는 중입니다 ...
libxrandr-dev:amd64 (2:1.5.1-1) 설정하는 중입니다 ...
libxcomposite-dev:amd64 (1:0.4.4-2) 설정하는 중입니다 ...
libavcodec-dev:amd64 (7:3.4.8-0ubuntu0.2) 설정하는 중입니다 ...
libglib2.0-dev:amd64 (2.56.4-0ubuntu0.18.04.6) 설정하는 중입니다 ...
libfreetype6-dev:amd64 (2.8.1-2ubuntu2.1) 설정하는 중입니다 ...
libavformat-dev:amd64 (7:3.4.8-0ubuntu0.2) 설정하는 중입니다 ...
libfontconfig1-dev:amd64 (2.12.6-0ubuntu2) 설정하는 중입니다 ...
libxft-dev (2.3.2-1) 설정하는 중입니다 ...
libicu-le-hb-dev:amd64 (1.0.3+git161113-4) 설정하는 중입니다 ...
libicu-dev (60.2-3ubuntu3.1) 설정하는 중입니다 ...
Processing triggers for libc-bin (2.27-3ubuntu1.2) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for libglib2.0-0:amd64 (2.56.4-0ubuntu0.18.04.6) ...
libatk1.0-dev:amd64 (2.28.1-1) 설정하는 중입니다 ...
libgdk-pixbuf2.0-dev (2.36.11-2) 설정하는 중입니다 ...
libharfbuzz-dev:amd64 (1.7.2-1ubuntu1) 설정하는 중입니다 ...
libcairo2-dev:amd64 (1.15.10-2ubuntu0.1) 설정하는 중입니다 ...
libpango1.0-dev (1.40.14-1ubuntu0.1) 설정하는 중입니다 ...
libgtk2.0-dev (2.24.32-1ubuntu1) 설정하는 중입니다 ...
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다       
상태 정보를 읽는 중입니다... 완료
패키지 libpng-dev는 이미 최신 버전입니다 (1.6.34-1ubuntu0.18.04.2).
libpng-dev 패키지는 수동설치로 지정합니다.
다음 패키지가 자동으로 설치되었지만 더 이상 필요하지 않습니다:
  linux-headers-5.4.0-48-generic linux-hwe-5.4-headers-5.4.0-48
  linux-image-5.4.0-48-generic linux-modules-5.4.0-48-generic
  linux-modules-extra-5.4.0-48-generic
Use 'sudo apt autoremove' to remove them.
0개 업그레이드, 0개 새로 설치, 0개 제거 및 8개 업그레이드 안 함.
The directory '/home/minimonk/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/minimonk/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: pyyaml in /usr/lib/python3/dist-packages (from -r /opt/intel/openvino_2021/deployment_tools/demo/../open_model_zoo/tools/downloader/requirements.in (line 1))
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from -r /opt/intel/openvino_2021/deployment_tools/demo/../open_model_zoo/tools/downloader/requirements.in (line 2))
Run python3 /opt/intel/openvino_2021/deployment_tools/open_model_zoo/tools/downloader/downloader.py --name squeezenet1.1 --output_dir /home/minimonk/openvino_models/models --cache_dir /home/minimonk/openvino_models/cache

################|| Downloading squeezenet1.1 ||################

========== Downloading /home/minimonk/openvino_models/models/public/squeezenet1.1/squeezenet1.1.prototxt
... 100%, 9 KB, 43302 KB/s, 0 seconds passed

========== Downloading /home/minimonk/openvino_models/models/public/squeezenet1.1/squeezenet1.1.caffemodel
... 100%, 4834 KB, 590 KB/s, 8 seconds passed

========== Replacing text in /home/minimonk/openvino_models/models/public/squeezenet1.1/squeezenet1.1.prototxt



###################################################

Install Model Optimizer dependencies

기존:1 https://apt.repos.intel.com/openvino/2021 all InRelease
기존:2 https://packages.microsoft.com/repos/vscode stable InRelease            
기존:3 http://apt.postgresql.org/pub/repos/apt bionic-pgdg InRelease           
기존:4 https://packages.cloud.google.com/apt coral-edgetpu-stable InRelease    
기존:5 http://dl.openfoam.org/ubuntu bionic InRelease                          
기존:6 http://security.ubuntu.com/ubuntu bionic-security InRelease             
기존:7 http://kr.archive.ubuntu.com/ubuntu bionic InRelease                    
기존:8 http://kr.archive.ubuntu.com/ubuntu bionic-updates InRelease
기존:9 http://kr.archive.ubuntu.com/ubuntu bionic-backports InRelease
패키지 목록을 읽는 중입니다... 완료     
의존성 트리를 만드는 중입니다       
상태 정보를 읽는 중입니다... 완료
8 packages can be upgraded. Run 'apt list --upgradable' to see them.
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다       
상태 정보를 읽는 중입니다... 완료
패키지 libgfortran5는 이미 최신 버전입니다 (8.4.0-1ubuntu1~18.04).
패키지 python3-pip는 이미 최신 버전입니다 (9.0.1-2.3~ubuntu1.18.04.3).
패키지 python3-venv는 이미 최신 버전입니다 (3.6.7-1~18.04).
다음 패키지가 자동으로 설치되었지만 더 이상 필요하지 않습니다:
  linux-headers-5.4.0-48-generic linux-hwe-5.4-headers-5.4.0-48
  linux-image-5.4.0-48-generic linux-modules-5.4.0-48-generic
  linux-modules-extra-5.4.0-48-generic
Use 'sudo apt autoremove' to remove them.
0개 업그레이드, 0개 새로 설치, 0개 제거 및 8개 업그레이드 안 함.
The directory '/home/minimonk/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/minimonk/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting networkx>=1.11 (from -r /opt/intel/openvino_2021/deployment_tools/model_optimizer/install_prerequisites/../requirements_caffe.txt (line 1))
  Downloading https://files.pythonhosted.org/packages/9b/cd/dc52755d30ba41c60243235460961fc28022e5b6731f16c268667625baea/networkx-2.5-py3-none-any.whl (1.6MB)
    100% |████████████████████████████████| 1.6MB 748kB/s 
Requirement already satisfied: numpy>=1.13.0 in /home/minimonk/.local/lib/python3.6/site-packages (from -r /opt/intel/openvino_2021/deployment_tools/model_optimizer/install_prerequisites/../requirements_caffe.txt (line 2))
Collecting protobuf>=3.6.1 (from -r /opt/intel/openvino_2021/deployment_tools/model_optimizer/install_prerequisites/../requirements_caffe.txt (line 3))
  Downloading https://files.pythonhosted.org/packages/30/79/510974552cebff2ba04038544799450defe75e96ea5f1675dbf72cc8744f/protobuf-3.13.0-cp36-cp36m-manylinux1_x86_64.whl (1.3MB)
    100% |████████████████████████████████| 1.3MB 689kB/s 
Collecting test-generator==0.1.1 (from -r /opt/intel/openvino_2021/deployment_tools/model_optimizer/install_prerequisites/../requirements_caffe.txt (line 4))
  Downloading https://files.pythonhosted.org/packages/4a/52/e5eec4d926eb466844eaeeaac84af5372e946dd520fb2b6adf3388e620b0/test_generator-0.1.1-py2.py3-none-any.whl
Collecting defusedxml>=0.5.0 (from -r /opt/intel/openvino_2021/deployment_tools/model_optimizer/install_prerequisites/../requirements_caffe.txt (line 5))
  Downloading https://files.pythonhosted.org/packages/06/74/9b387472866358ebc08732de3da6dc48e44b0aacd2ddaa5cb85ab7e986a2/defusedxml-0.6.0-py2.py3-none-any.whl
Collecting decorator>=4.3.0 (from networkx>=1.11->-r /opt/intel/openvino_2021/deployment_tools/model_optimizer/install_prerequisites/../requirements_caffe.txt (line 1))
  Downloading https://files.pythonhosted.org/packages/ed/1b/72a1821152d07cf1d8b6fce298aeb06a7eb90f4d6d41acec9861e7cc6df0/decorator-4.4.2-py2.py3-none-any.whl
Requirement already satisfied: six>=1.9 in /home/minimonk/.local/lib/python3.6/site-packages (from protobuf>=3.6.1->-r /opt/intel/openvino_2021/deployment_tools/model_optimizer/install_prerequisites/../requirements_caffe.txt (line 3))
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from protobuf>=3.6.1->-r /opt/intel/openvino_2021/deployment_tools/model_optimizer/install_prerequisites/../requirements_caffe.txt (line 3))
Installing collected packages: decorator, networkx, protobuf, test-generator, defusedxml
  Found existing installation: protobuf 3.0.0
    Not uninstalling protobuf at /usr/lib/python3/dist-packages, outside environment /usr
Successfully installed decorator-4.4.2 defusedxml-0.6.0 networkx-2.5 protobuf-3.13.0 test-generator-0.1.1
[WARNING] All Model Optimizer dependencies are installed globally.
[WARNING] If you want to keep Model Optimizer in separate sandbox
[WARNING] run install_prerequisites.sh venv {caffe|tf|tf2|mxnet|kaldi|onnx}


###################################################

Convert a model with Model Optimizer

Run python3 /opt/intel/openvino_2021/deployment_tools/open_model_zoo/tools/downloader/converter.py --mo /opt/intel/openvino_2021/deployment_tools/model_optimizer/mo.py --name squeezenet1.1 -d /home/minimonk/openvino_models/models -o /home/minimonk/openvino_models/ir --precisions FP16

========== Converting squeezenet1.1 to IR (FP16)
Conversion command: /usr/bin/python3 -- /opt/intel/openvino_2021/deployment_tools/model_optimizer/mo.py --framework=caffe --data_type=FP16 --output_dir=/home/minimonk/openvino_models/ir/public/squeezenet1.1/FP16 --model_name=squeezenet1.1 '--input_shape=[1,3,227,227]' --input=data '--mean_values=data[104.0,117.0,123.0]' --output=prob --input_model=/home/minimonk/openvino_models/models/public/squeezenet1.1/squeezenet1.1.caffemodel --input_proto=/home/minimonk/openvino_models/models/public/squeezenet1.1/squeezenet1.1.prototxt

Model Optimizer arguments:
Common parameters:
	- Path to the Input Model: 	/home/minimonk/openvino_models/models/public/squeezenet1.1/squeezenet1.1.caffemodel
	- Path for generated IR: 	/home/minimonk/openvino_models/ir/public/squeezenet1.1/FP16
	- IR output name: 	squeezenet1.1
	- Log level: 	ERROR
	- Batch: 	Not specified, inherited from the model
	- Input layers: 	data
	- Output layers: 	prob
	- Input shapes: 	[1,3,227,227]
	- Mean values: 	data[104.0,117.0,123.0]
	- Scale values: 	Not specified
	- Scale factor: 	Not specified
	- Precision of IR: 	FP16
	- Enable fusing: 	True
	- Enable grouped convolutions fusing: 	True
	- Move mean values to preprocess section: 	None
	- Reverse input channels: 	False
Caffe specific parameters:
	- Path to Python Caffe* parser generated from caffe.proto: 	/opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/front/caffe/proto
	- Enable resnet optimization: 	True
	- Path to the Input prototxt: 	/home/minimonk/openvino_models/models/public/squeezenet1.1/squeezenet1.1.prototxt
	- Path to CustomLayersMapping.xml: 	Default
	- Path to a mean file: 	Not specified
	- Offsets for a mean file: 	Not specified
Model Optimizer version: 	2021.1.0-1237-bece22ac675-releases/2021/1
[ WARNING ]  
Detected not satisfied dependencies:
	protobuf: installed: 3.0.0, required: >= 3.6.1

Please install required versions of components or use install_prerequisites script
/opt/intel/openvino_2021.1.110/deployment_tools/model_optimizer/install_prerequisites/install_prerequisites_caffe.sh
Note that install_prerequisites scripts may install additional components.

[ SUCCESS ] Generated IR version 10 model.
[ SUCCESS ] XML file: /home/minimonk/openvino_models/ir/public/squeezenet1.1/FP16/squeezenet1.1.xml
[ SUCCESS ] BIN file: /home/minimonk/openvino_models/ir/public/squeezenet1.1/FP16/squeezenet1.1.bin
[ SUCCESS ] Total execution time: 6.45 seconds. 
[ SUCCESS ] Memory consumed: 83 MB. 



###################################################

Build Inference Engine samples

-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for C++ include unistd.h
-- Looking for C++ include unistd.h - found
-- Looking for C++ include stdint.h
-- Looking for C++ include stdint.h - found
-- Looking for C++ include sys/types.h
-- Looking for C++ include sys/types.h - found
-- Looking for C++ include fnmatch.h
-- Looking for C++ include fnmatch.h - found
-- Looking for strtoll
-- Looking for strtoll - found
-- Found InferenceEngine: /opt/intel/openvino_2021/deployment_tools/inference_engine/lib/intel64/libinference_engine.so (Required is at least version "2.1") 
CMake Warning at /opt/intel/openvino_2021/deployment_tools/inference_engine/share/ie_parallel.cmake:6 (find_package):
  By not providing "FindTBB.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "TBB", but
  CMake did not find one.

  Could not find a package configuration file provided by "TBB" with any of
  the following names:

    TBBConfig.cmake
    tbb-config.cmake

  Add the installation prefix of "TBB" to CMAKE_PREFIX_PATH or set "TBB_DIR"
  to a directory containing one of the above files.  If "TBB" provides a
  separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  /opt/intel/openvino_2021/deployment_tools/inference_engine/share/InferenceEngineConfig.cmake:170 (include)
  CMakeLists.txt:141 (find_package)


CMake Warning at /opt/intel/openvino_2021/deployment_tools/inference_engine/share/InferenceEngineConfig.cmake:32 (message):
  TBB was not found by the configured TBB_DIR/TBBROOT path.  SEQ method will
  be used.
Call Stack (most recent call first):
  /opt/intel/openvino_2021/deployment_tools/inference_engine/share/ie_parallel.cmake:14 (ext_message)
  /opt/intel/openvino_2021/deployment_tools/inference_engine/share/InferenceEngineConfig.cmake:170 (include)
  CMakeLists.txt:141 (find_package)


-- Configuring done
-- Generating done
-- Build files have been written to: /home/minimonk/inference_engine_samples_build
Scanning dependencies of target gflags_nothreads_static
Scanning dependencies of target format_reader
[  9%] Building CXX object thirdparty/gflags/CMakeFiles/gflags_nothreads_static.dir/src/gflags_reporting.cc.o
[ 18%] Building CXX object thirdparty/gflags/CMakeFiles/gflags_nothreads_static.dir/src/gflags_completions.cc.o
[ 27%] Building CXX object thirdparty/gflags/CMakeFiles/gflags_nothreads_static.dir/src/gflags.cc.o
[ 36%] Building CXX object common/format_reader/CMakeFiles/format_reader.dir/opencv_wraper.cpp.o
[ 45%] Building CXX object common/format_reader/CMakeFiles/format_reader.dir/bmp.cpp.o
[ 54%] Building CXX object common/format_reader/CMakeFiles/format_reader.dir/MnistUbyte.cpp.o
[ 63%] Building CXX object common/format_reader/CMakeFiles/format_reader.dir/format_reader.cpp.o
[ 72%] Linking CXX static library ../../intel64/Release/lib/libgflags_nothreads.a
[ 72%] Built target gflags_nothreads_static
[ 81%] Linking CXX shared library ../../intel64/Release/lib/libformat_reader.so
[ 81%] Built target format_reader
Scanning dependencies of target classification_sample_async
[ 90%] Building CXX object classification_sample_async/CMakeFiles/classification_sample_async.dir/main.cpp.o
[100%] Linking CXX executable ../intel64/Release/classification_sample_async
[100%] Built target classification_sample_async


###################################################

Run Inference Engine classification sample

Run ./classification_sample_async -d MYRIAD -i /opt/intel/openvino_2021/deployment_tools/demo/car.png -m /home/minimonk/openvino_models/ir/public/squeezenet1.1/FP16/squeezenet1.1.xml

[ INFO ] InferenceEngine: 
	API version ............ 2.1
	Build .................. 2021.1.0-1237-bece22ac675-releases/2021/1
	Description ....... API
[ INFO ] Parsing input parameters
[ INFO ] Parsing input parameters
[ INFO ] Files were added: 1
[ INFO ]     /opt/intel/openvino_2021/deployment_tools/demo/car.png
[ INFO ] Creating Inference Engine
	MYRIAD
	myriadPlugin version ......... 2.1
	Build ........... 2021.1.0-1237-bece22ac675-releases/2021/1

[ INFO ] Loading network files
[ INFO ] Preparing input blobs
[ WARNING ] Image is resized from (787, 259) to (227, 227)
[ INFO ] Batch size is 1
[ INFO ] Loading model to the device
E: [ncAPI] [      4953] [classification_] ncDeviceOpen:1011	Failed to find booted device after boot
[ ERROR ] Can not init Myriad device: NC_ERROR
Error on or near line 217; exiting with status 1

 

장치를 연결하고 했다고 먼가 달라지진 않네.. -_-

[ INFO ] Loading model to the device
E: [ncAPI] [    640146] [classification_] ncDeviceOpen:1011	Failed to find booted device after boot
[ ERROR ] Can not init Myriad device: NC_ERROR
Error on or near line 217; exiting with status 1

 

혹시나 해서 리부팅 하고 해보니 된다.

앞에는 매번 패키지 업데이트 하고 그런다고 시간 다 잡아 먹고

정작 가장 끝에는 순식같에 끝나는데.. 시간이 재지지 않으니 알수가 없네

/opt/intel/openvino_2021/deployment_tools/demo$ ./demo_squeezenet_download_convert_run.sh -d MYRIAD
target = MYRIAD
target_precision = FP16
[setupvars.sh] OpenVINO environment initialized


###################################################



Downloading the Caffe model and the prototxt
Installing dependencies
기존:1 https://packages.cloud.google.com/apt coral-edgetpu-stable InRelease    
기존:2 https://apt.repos.intel.com/openvino/2021 all InRelease                 
기존:3 https://packages.microsoft.com/repos/vscode stable InRelease            
기존:4 http://kr.archive.ubuntu.com/ubuntu bionic InRelease                    
기존:5 http://security.ubuntu.com/ubuntu bionic-security InRelease             
기존:6 http://dl.openfoam.org/ubuntu bionic InRelease                          
기존:7 http://kr.archive.ubuntu.com/ubuntu bionic-updates InRelease            
기존:8 http://kr.archive.ubuntu.com/ubuntu bionic-backports InRelease          
기존:9 http://apt.postgresql.org/pub/repos/apt bionic-pgdg InRelease           
패키지 목록을 읽는 중입니다... 완료     
의존성 트리를 만드는 중입니다       
상태 정보를 읽는 중입니다... 완료
8 packages can be upgraded. Run 'apt list --upgradable' to see them.
Run sudo -E apt -y install build-essential python3-pip virtualenv cmake libcairo2-dev libpango1.0-dev libglib2.0-dev libgtk2.0-dev libswscale-dev libavcodec-dev libavformat-dev libgstreamer1.0-0 gstreamer1.0-plugins-base

패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다       
상태 정보를 읽는 중입니다... 완료
패키지 build-essential는 이미 최신 버전입니다 (12.4ubuntu1).
패키지 libgtk2.0-dev는 이미 최신 버전입니다 (2.24.32-1ubuntu1).
패키지 virtualenv는 이미 최신 버전입니다 (15.1.0+ds-1.1).
패키지 cmake는 이미 최신 버전입니다 (3.10.2-1ubuntu2.18.04.1).
패키지 gstreamer1.0-plugins-base는 이미 최신 버전입니다 (1.14.5-0ubuntu1~18.04.1).
패키지 libcairo2-dev는 이미 최신 버전입니다 (1.15.10-2ubuntu0.1).
패키지 libglib2.0-dev는 이미 최신 버전입니다 (2.56.4-0ubuntu0.18.04.6).
패키지 libgstreamer1.0-0는 이미 최신 버전입니다 (1.14.5-0ubuntu1~18.04.1).
패키지 libpango1.0-dev는 이미 최신 버전입니다 (1.40.14-1ubuntu0.1).
패키지 libavcodec-dev는 이미 최신 버전입니다 (7:3.4.8-0ubuntu0.2).
패키지 libavformat-dev는 이미 최신 버전입니다 (7:3.4.8-0ubuntu0.2).
패키지 libswscale-dev는 이미 최신 버전입니다 (7:3.4.8-0ubuntu0.2).
패키지 python3-pip는 이미 최신 버전입니다 (9.0.1-2.3~ubuntu1.18.04.3).
다음 패키지가 자동으로 설치되었지만 더 이상 필요하지 않습니다:
  linux-headers-5.4.0-48-generic linux-hwe-5.4-headers-5.4.0-48
  linux-image-5.4.0-48-generic linux-modules-5.4.0-48-generic
  linux-modules-extra-5.4.0-48-generic
Use 'sudo apt autoremove' to remove them.
0개 업그레이드, 0개 새로 설치, 0개 제거 및 8개 업그레이드 안 함.
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다       
상태 정보를 읽는 중입니다... 완료
패키지 libpng-dev는 이미 최신 버전입니다 (1.6.34-1ubuntu0.18.04.2).
다음 패키지가 자동으로 설치되었지만 더 이상 필요하지 않습니다:
  linux-headers-5.4.0-48-generic linux-hwe-5.4-headers-5.4.0-48
  linux-image-5.4.0-48-generic linux-modules-5.4.0-48-generic
  linux-modules-extra-5.4.0-48-generic
Use 'sudo apt autoremove' to remove them.
0개 업그레이드, 0개 새로 설치, 0개 제거 및 8개 업그레이드 안 함.
The directory '/home/minimonk/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/minimonk/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: pyyaml in /usr/lib/python3/dist-packages (from -r /opt/intel/openvino_2021/deployment_tools/demo/../open_model_zoo/tools/downloader/requirements.in (line 1))
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from -r /opt/intel/openvino_2021/deployment_tools/demo/../open_model_zoo/tools/downloader/requirements.in (line 2))
Run python3 /opt/intel/openvino_2021/deployment_tools/open_model_zoo/tools/downloader/downloader.py --name squeezenet1.1 --output_dir /home/minimonk/openvino_models/models --cache_dir /home/minimonk/openvino_models/cache

################|| Downloading squeezenet1.1 ||################

========== Retrieving /home/minimonk/openvino_models/models/public/squeezenet1.1/squeezenet1.1.prototxt from the cache

========== Retrieving /home/minimonk/openvino_models/models/public/squeezenet1.1/squeezenet1.1.caffemodel from the cache

========== Replacing text in /home/minimonk/openvino_models/models/public/squeezenet1.1/squeezenet1.1.prototxt



Target folder /home/minimonk/openvino_models/ir/public/squeezenet1.1/FP16 already exists. Skipping IR generation  with Model Optimizer.If you want to convert a model again, remove the entire /home/minimonk/openvino_models/ir/public/squeezenet1.1/FP16 folder. Then run the script again



###################################################

Build Inference Engine samples

-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for C++ include unistd.h
-- Looking for C++ include unistd.h - found
-- Looking for C++ include stdint.h
-- Looking for C++ include stdint.h - found
-- Looking for C++ include sys/types.h
-- Looking for C++ include sys/types.h - found
-- Looking for C++ include fnmatch.h
-- Looking for C++ include fnmatch.h - found
-- Looking for strtoll
-- Looking for strtoll - found
-- Found InferenceEngine: /opt/intel/openvino_2021/deployment_tools/inference_engine/lib/intel64/libinference_engine.so (Required is at least version "2.1") 
CMake Warning at /opt/intel/openvino_2021/deployment_tools/inference_engine/share/ie_parallel.cmake:6 (find_package):
  By not providing "FindTBB.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "TBB", but
  CMake did not find one.

  Could not find a package configuration file provided by "TBB" with any of
  the following names:

    TBBConfig.cmake
    tbb-config.cmake

  Add the installation prefix of "TBB" to CMAKE_PREFIX_PATH or set "TBB_DIR"
  to a directory containing one of the above files.  If "TBB" provides a
  separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  /opt/intel/openvino_2021/deployment_tools/inference_engine/share/InferenceEngineConfig.cmake:170 (include)
  CMakeLists.txt:141 (find_package)


CMake Warning at /opt/intel/openvino_2021/deployment_tools/inference_engine/share/InferenceEngineConfig.cmake:32 (message):
  TBB was not found by the configured TBB_DIR/TBBROOT path.  SEQ method will
  be used.
Call Stack (most recent call first):
  /opt/intel/openvino_2021/deployment_tools/inference_engine/share/ie_parallel.cmake:14 (ext_message)
  /opt/intel/openvino_2021/deployment_tools/inference_engine/share/InferenceEngineConfig.cmake:170 (include)
  CMakeLists.txt:141 (find_package)


-- Configuring done
-- Generating done
-- Build files have been written to: /home/minimonk/inference_engine_samples_build
[ 36%] Built target gflags_nothreads_static
[ 81%] Built target format_reader
[100%] Built target classification_sample_async


###################################################

Run Inference Engine classification sample

Run ./classification_sample_async -d MYRIAD -i /opt/intel/openvino_2021/deployment_tools/demo/car.png -m /home/minimonk/openvino_models/ir/public/squeezenet1.1/FP16/squeezenet1.1.xml

[ INFO ] InferenceEngine: 
	API version ............ 2.1
	Build .................. 2021.1.0-1237-bece22ac675-releases/2021/1
	Description ....... API
[ INFO ] Parsing input parameters
[ INFO ] Parsing input parameters
[ INFO ] Files were added: 1
[ INFO ]     /opt/intel/openvino_2021/deployment_tools/demo/car.png
[ INFO ] Creating Inference Engine
	MYRIAD
	myriadPlugin version ......... 2.1
	Build ........... 2021.1.0-1237-bece22ac675-releases/2021/1

[ INFO ] Loading network files
[ INFO ] Preparing input blobs
[ WARNING ] Image is resized from (787, 259) to (227, 227)
[ INFO ] Batch size is 1
[ INFO ] Loading model to the device
[ INFO ] Create infer request
[ INFO ] Start inference (10 asynchronous executions)
[ INFO ] Completed 1 async request execution
[ INFO ] Completed 2 async request execution
[ INFO ] Completed 3 async request execution
[ INFO ] Completed 4 async request execution
[ INFO ] Completed 5 async request execution
[ INFO ] Completed 6 async request execution
[ INFO ] Completed 7 async request execution
[ INFO ] Completed 8 async request execution
[ INFO ] Completed 9 async request execution
[ INFO ] Completed 10 async request execution
[ INFO ] Processing output blobs

Top 10 results:

Image /opt/intel/openvino_2021/deployment_tools/demo/car.png

classid probability label
------- ----------- -----
817     0.6708984   sports car, sport car
479     0.1922607   car wheel
511     0.0936890   convertible
436     0.0216064   beach wagon, station wagon, wagon, estate car, beach waggon, station waggon, waggon
751     0.0075760   racer, race car, racing car
656     0.0049667   minivan
717     0.0027428   pickup, pickup truck
581     0.0019779   grille, radiator grille
468     0.0014219   cab, hack, taxi, taxicab
661     0.0008636   Model T

[ INFO ] Execution successful

[ INFO ] This sample is an API example, for any performance measurements please use the dedicated benchmark_app tool


###################################################

Demo completed successfully.

 

 

아무튼 intel NCS2 작동은 확인! 개발환경도 완료!

'프로그램 사용 > intel ncs2' 카테고리의 다른 글

intel ncs2 설치  (0) 2020.10.21
intel Movidius NCS / VPU  (0) 2020.10.21
Posted by 구차니

설치 부터가 드럽게 친절하지 않네

일단 openVINO가 intel 사이트에 통합된게 아니라

web 버전으로 받아 보니 rpm이 잔뜩 있어서 아닌것 같고 apt로 받으려고 가니 이상한 소리만 하고 있다.

 

 

openVINO 랑 참조해서 아래의 명령어들을 이용해서 설치하면 되긴한데

(다음글에서 개고생한걸 생각하면 openvino 2021이 아니라 약간 구버전을 쓰면

python 버전과 tensorflow 버전 문제로 고생을 덜하지 않았을까 하는 생각이 들긴한데

2020 버전에 대한 gpg를 찾지 못하겠다)

 

$ wget "https://apt.repos.intel.com/openvino/2021/GPG-PUB-KEY-INTEL-OPENVINO-2021"
$ sudo apt-key add GPG-PUB-KEY-INTEL-OPENVINO-2021
$ echo "deb https://apt.repos.intel.com/openvino/2021 all main" | sudo tee /etc/apt/sources.list.d/intel-openvino-2021.list
deb https://apt.repos.intel.com/openvino/2021 all main
$ sudo apt-get update
$ sudo apt-cache search intel-openvino-dev-ubuntu18
intel-openvino-dev-ubuntu18-2021.1.110 - Intel® Deep Learning Deployment Toolkit 2021.1 for Linux*
$ sudo apt-get install intel-openvino-dev-ubuntu18-2021.1.110
$ cd /opt/intel/openvino_2021

 

[링크 : https://docs.openvinotoolkit.org/latest/openvino_docs_install_guides_installing_openvino_apt.html]

 

[링크: https://software.intel.com/content/www/us/en/develop/articles/get-started-with-neural-compute-stick.html]

[링크 : https://software.intel.com/content/www/us/en/develop/tools/openvino-toolkit/download.html...]

 

+

한번 해봤는데 GPG 키는 동일하게 나온다. 그 아래의 openvino/2021 all main 대신 2020으로 해봐야 하나 귀찮아..

[링크 : https://apt.repos.intel.com/openvino/2020/GPG-PUB-KEY-INTEL-OPENVINO-2020]

[링크 : https://apt.repos.intel.com/openvino/2021/GPG-PUB-KEY-INTEL-OPENVINO-2021]

'프로그램 사용 > intel ncs2' 카테고리의 다른 글

intel NCS2 ubuntu 설치?  (0) 2020.10.21
intel Movidius NCS / VPU  (0) 2020.10.21
Posted by 구차니