{"id":2001,"date":"2018-08-06T13:06:21","date_gmt":"2018-08-06T05:06:21","guid":{"rendered":"http:\/\/www.magicandlove.com\/blog\/?p=2001"},"modified":"2018-08-06T13:26:11","modified_gmt":"2018-08-06T05:26:11","slug":"deep-neural-network-dnn-module-with-processing","status":"publish","type":"post","link":"http:\/\/www.magicandlove.com\/blog\/2018\/08\/06\/deep-neural-network-dnn-module-with-processing\/","title":{"rendered":"Deep Neural Network (dnn) module with Processing"},"content":{"rendered":"<p>This is my first demo run of the <a href=\"https:\/\/github.com\/opencv\/opencv\/wiki\/Deep-Learning-in-OpenCV\" target=\"_blank\" rel=\"noopener\">dnn<\/a> (deep neural network) module in OpenCV 3.4.2 with Processing, using my <a href=\"http:\/\/www.magicandlove.com\/blog\/2018\/07\/20\/opencv-3-4-2-java-build\/\">CVImage<\/a> library. The module can input pre-trained models from <a href=\"http:\/\/caffe.berkeleyvision.org\/\" target=\"_blank\" rel=\"noopener\">Caffe<\/a>, <a href=\"https:\/\/www.tensorflow.org\/\" target=\"_blank\" rel=\"noopener\">Tensorflow<\/a>, <a href=\"https:\/\/pjreddie.com\/darknet\/\" target=\"_blank\" rel=\"noopener\">Darknet<\/a>, and <a href=\"http:\/\/torch.ch\/\" target=\"_blank\" rel=\"noopener\">Torch<\/a>.\u00a0 In this example, I used the Tensorflow model Inception v2 SSD COCO from <a href=\"https:\/\/github.com\/opencv\/opencv\/wiki\/TensorFlow-Object-Detection-API\" target=\"_blank\" rel=\"noopener\">here<\/a>. I also obtained the label map file from the <a href=\"https:\/\/github.com\/tensorflow\/models\/tree\/master\/research\/object_detection\/data\" target=\"_blank\" rel=\"noopener\">Tensorflow GitHub<\/a>. The following 3 files are in the <strong>data<\/strong> folder of the Processing sketch.<\/p>\n<ul>\n<li>frozen_inference_graph.pb<\/li>\n<li>ssd_inception_v2_coco_2017_11_17.pbtxt<\/li>\n<li>mscoco_label_map.pbtxt<\/li>\n<\/ul>\n<p>The source code is in my GitHub repository of this website <a href=\"https:\/\/github.com\/chungbwc\/Magicandlove\/tree\/master\/ml20180806a\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2002\" src=\"http:\/\/www.magicandlove.com\/blog\/wp-content\/uploads\/2018\/08\/tensorflow0109.png\" alt=\"\" width=\"640\" height=\"360\" srcset=\"http:\/\/www.magicandlove.com\/blog\/wp-content\/uploads\/2018\/08\/tensorflow0109.png 640w, http:\/\/www.magicandlove.com\/blog\/wp-content\/uploads\/2018\/08\/tensorflow0109-300x169.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is my first demo run of the dnn (deep neural network) module in OpenCV 3.4.2 with Processing, using my CVImage library. The module can input pre-trained models from Caffe, Tensorflow, Darknet, and Torch.\u00a0 In this example, I used the Tensorflow model Inception v2 SSD COCO from here. I also obtained the label map file [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[89,79],"tags":[3,62,154],"class_list":["post-2001","post","type-post","status-publish","format-standard","hentry","category-research","category-software-2","tag-opencv","tag-processing-org","tag-tensorflow"],"_links":{"self":[{"href":"http:\/\/www.magicandlove.com\/blog\/wp-json\/wp\/v2\/posts\/2001","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.magicandlove.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.magicandlove.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.magicandlove.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.magicandlove.com\/blog\/wp-json\/wp\/v2\/comments?post=2001"}],"version-history":[{"count":2,"href":"http:\/\/www.magicandlove.com\/blog\/wp-json\/wp\/v2\/posts\/2001\/revisions"}],"predecessor-version":[{"id":2004,"href":"http:\/\/www.magicandlove.com\/blog\/wp-json\/wp\/v2\/posts\/2001\/revisions\/2004"}],"wp:attachment":[{"href":"http:\/\/www.magicandlove.com\/blog\/wp-json\/wp\/v2\/media?parent=2001"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.magicandlove.com\/blog\/wp-json\/wp\/v2\/categories?post=2001"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.magicandlove.com\/blog\/wp-json\/wp\/v2\/tags?post=2001"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}