Community Articles
Find and share helpful community-sourced technical articles
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.
Super Guru

Part 1: Installation and Setup

Part 2: Classifying Images with ImageNet

Part 3: Detecting Faces in Images

34722-tim.jpg

34723-outputfacetim.png

34727-jetsonvsrpi.jpg

34724-jetsonlandscape.jpg

NVidia also provides a good example C++ program for detecting faces, so we try that out next. You can add more training data to improve results, but it found me okay.

In the next step we'll connect to MiniFi.

Shell Source:

root@tegra-ubuntu:/media/nvidia/96ed93f9-7c40-4999-85ba-3eb24262d0a5/jetson-inference-master/build/aarch64/bin# ./facedetect.sh
detectnet-console
  args (4):  0 [/media/nvidia/96ed93f9-7c40-4999-85ba-3eb24262d0a5/jetson-inference-master/build/aarch64/bin/detectnet-console]  1 [backupimages/tim.jpg]  2 [images/outputtim.png]  3 [facenet]

detectNet -- loading detection network model from:
          -- prototxt    networks/facenet-120/deploy.prototxt
          -- model       networks/facenet-120/snapshot_iter_24000.caffemodel
          -- input_blob  'data'
          -- output_cvg  'coverage'
          -- output_bbox 'bboxes'
          -- threshold   0.500000
          -- batch_size  2


[GIE]  attempting to open cache file networks/facenet-120/snapshot_iter_24000.caffemodel.2.tensorcache
[GIE]  loading network profile from cache... networks/facenet-120/snapshot_iter_24000.caffemodel.2.tensorcache
[GIE]  platform has FP16 support.
[GIE]  networks/facenet-120/snapshot_iter_24000.caffemodel loaded
[GIE]  CUDA engine context initialized with 3 bindings
[GIE]  networks/facenet-120/snapshot_iter_24000.caffemodel input  binding index:  0
[GIE]  networks/facenet-120/snapshot_iter_24000.caffemodel input  dims (b=2 c=3 h=450 w=450) size=4860000
[cuda]  cudaAllocMapped 4860000 bytes, CPU 0x100ce0000 GPU 0x100ce0000
[GIE]  networks/facenet-120/snapshot_iter_24000.caffemodel output 0 coverage  binding index:  1
[GIE]  networks/facenet-120/snapshot_iter_24000.caffemodel output 0 coverage  dims (b=2 c=1 h=28 w=28) size=6272
[cuda]  cudaAllocMapped 6272 bytes, CPU 0x1011a0000 GPU 0x1011a0000
[GIE]  networks/facenet-120/snapshot_iter_24000.caffemodel output 1 bboxes  binding index:  2
[GIE]  networks/facenet-120/snapshot_iter_24000.caffemodel output 1 bboxes  dims (b=2 c=4 h=28 w=28) size=25088
[cuda]  cudaAllocMapped 25088 bytes, CPU 0x1012a0000 GPU 0x1012a0000
networks/facenet-120/snapshot_iter_24000.caffemodel initialized.
[cuda]  cudaAllocMapped 16 bytes, CPU 0x1013a0000 GPU 0x1013a0000
maximum bounding boxes:  3136
[cuda]  cudaAllocMapped 50176 bytes, CPU 0x1012a6200 GPU 0x1012a6200
[cuda]  cudaAllocMapped 12544 bytes, CPU 0x1011a1a00 GPU 0x1011a1a00
loaded image  backupimages/tim.jpg  (400 x 400)  2560000 bytes
[cuda]  cudaAllocMapped 2560000 bytes, CPU 0x1014a0000 GPU 0x1014a0000
detectnet-console:  beginning processing network (1505047556083)
[GIE]  layer deploy_transform input reformatter 0 - 4.594114 ms
[GIE]  layer deploy_transform - 1.522865 ms
[GIE]  layer conv1/7x7_s2 + conv1/relu_7x7 - 24.272917 ms
[GIE]  layer pool1/3x3_s2 - 4.988593 ms
[GIE]  layer pool1/norm1 - 1.322396 ms
[GIE]  layer conv2/3x3_reduce + conv2/relu_3x3_reduce - 2.462032 ms
[GIE]  layer conv2/3x3 + conv2/relu_3x3 - 29.438957 ms
[GIE]  layer conv2/norm2 - 3.703281 ms
[GIE]  layer pool2/3x3_s2 - 3.817292 ms
[GIE]  layer inception_3a/1x1 + inception_3a/relu_1x1 || inception_3a/3x3_reduce + inception_3a/relu_3x3_reduce || inception_3a/5x5_reduce + inception_3a/relu_5x5_reduce - 4.193281 ms
[GIE]  layer inception_3a/3x3 + inception_3a/relu_3x3 - 11.074271 ms
[GIE]  layer inception_3a/5x5 + inception_3a/relu_5x5 - 2.207708 ms
[GIE]  layer inception_3a/pool - 1.708906 ms
[GIE]  layer inception_3a/pool_proj + inception_3a/relu_pool_proj - 1.522240 ms
[GIE]  layer inception_3a/1x1 copy - 0.194323 ms
[GIE]  layer inception_3b/1x1 + inception_3b/relu_1x1 || inception_3b/3x3_reduce + inception_3b/relu_3x3_reduce || inception_3b/5x5_reduce + inception_3b/relu_5x5_reduce - 8.700052 ms
[GIE]  layer inception_3b/3x3 + inception_3b/relu_3x3 - 21.696459 ms
[GIE]  layer inception_3b/5x5 + inception_3b/relu_5x5 - 10.463386 ms
[GIE]  layer inception_3b/pool - 2.265937 ms
[GIE]  layer inception_3b/pool_proj + inception_3b/relu_pool_proj - 1.910729 ms
[GIE]  layer inception_3b/1x1 copy - 0.354375 ms
[GIE]  layer pool3/3x3_s2 - 1.903125 ms
[GIE]  layer inception_4a/1x1 + inception_4a/relu_1x1 || inception_4a/3x3_reduce + inception_4a/relu_3x3_reduce || inception_4a/5x5_reduce + inception_4a/relu_5x5_reduce - 4.471615 ms
[GIE]  layer inception_4a/3x3 + inception_4a/relu_3x3 - 6.044531 ms
[GIE]  layer inception_4a/5x5 + inception_4a/relu_5x5 - 0.968907 ms
[GIE]  layer inception_4a/pool - 1.064114 ms
[GIE]  layer inception_4a/pool_proj + inception_4a/relu_pool_proj - 1.103750 ms
[GIE]  layer inception_4a/1x1 copy - 0.152396 ms
[GIE]  layer inception_4b/1x1 + inception_4b/relu_1x1 || inception_4b/3x3_reduce + inception_4b/relu_3x3_reduce || inception_4b/5x5_reduce + inception_4b/relu_5x5_reduce - 4.764219 ms
[GIE]  layer inception_4b/3x3 + inception_4b/relu_3x3 - 4.324583 ms
[GIE]  layer inception_4b/5x5 + inception_4b/relu_5x5 - 1.413073 ms
[GIE]  layer inception_4b/pool - 1.132969 ms
[GIE]  layer inception_4b/pool_proj + inception_4b/relu_pool_proj - 1.176146 ms
[GIE]  layer inception_4b/1x1 copy - 0.132864 ms
[GIE]  layer inception_4c/1x1 + inception_4c/relu_1x1 || inception_4c/3x3_reduce + inception_4c/relu_3x3_reduce || inception_4c/5x5_reduce + inception_4c/relu_5x5_reduce - 4.738177 ms
[GIE]  layer inception_4c/3x3 + inception_4c/relu_3x3 - 5.503698 ms
[GIE]  layer inception_4c/5x5 + inception_4c/relu_5x5 - 1.394011 ms
[GIE]  layer inception_4c/pool - 1.132656 ms
[GIE]  layer inception_4c/pool_proj + inception_4c/relu_pool_proj - 1.157812 ms
[GIE]  layer inception_4c/1x1 copy - 0.111927 ms
[GIE]  layer inception_4d/1x1 + inception_4d/relu_1x1 || inception_4d/3x3_reduce + inception_4d/relu_3x3_reduce || inception_4d/5x5_reduce + inception_4d/relu_5x5_reduce - 4.727709 ms
[GIE]  layer inception_4d/3x3 + inception_4d/relu_3x3 - 6.811302 ms
[GIE]  layer inception_4d/5x5 + inception_4d/relu_5x5 - 1.772187 ms
[GIE]  layer inception_4d/pool - 1.132084 ms
[GIE]  layer inception_4d/pool_proj + inception_4d/relu_pool_proj - 1.161718 ms
[GIE]  layer inception_4d/1x1 copy - 0.103438 ms
[GIE]  layer inception_4e/1x1 + inception_4e/relu_1x1 || inception_4e/3x3_reduce + inception_4e/relu_3x3_reduce || inception_4e/5x5_reduce + inception_4e/relu_5x5_reduce - 7.476458 ms
[GIE]  layer inception_4e/3x3 + inception_4e/relu_3x3 - 12.779844 ms
[GIE]  layer inception_4e/5x5 + inception_4e/relu_5x5 - 3.287656 ms
[GIE]  layer inception_4e/pool - 1.165417 ms
[GIE]  layer inception_4e/pool_proj + inception_4e/relu_pool_proj - 2.159844 ms
[GIE]  layer inception_4e/1x1 copy - 0.195000 ms
[GIE]  layer inception_5a/1x1 + inception_5a/relu_1x1 || inception_5a/3x3_reduce + inception_5a/relu_3x3_reduce || inception_5a/5x5_reduce + inception_5a/relu_5x5_reduce - 11.466510 ms
[GIE]  layer inception_5a/3x3 + inception_5a/relu_3x3 - 12.746927 ms
[GIE]  layer inception_5a/5x5 + inception_5a/relu_5x5 - 3.235729 ms
[GIE]  layer inception_5a/pool - 1.818386 ms
[GIE]  layer inception_5a/pool_proj + inception_5a/relu_pool_proj - 3.259010 ms
[GIE]  layer inception_5a/1x1 copy - 0.194844 ms
[GIE]  layer inception_5b/1x1 + inception_5b/relu_1x1 || inception_5b/3x3_reduce + inception_5b/relu_3x3_reduce || inception_5b/5x5_reduce + inception_5b/relu_5x5_reduce - 14.704739 ms
[GIE]  layer inception_5b/3x3 + inception_5b/relu_3x3 - 11.462292 ms
[GIE]  layer inception_5b/5x5 + inception_5b/relu_5x5 - 4.753594 ms
[GIE]  layer inception_5b/pool - 1.817604 ms
[GIE]  layer inception_5b/pool_proj + inception_5b/relu_pool_proj - 3.259792 ms
[GIE]  layer inception_5b/1x1 copy - 0.274687 ms
[GIE]  layer cvg/classifier - 2.113386 ms
[GIE]  layer coverage/sig - 0.059687 ms
[GIE]  layer coverage/sig output reformatter 0 - 0.042969 ms
[GIE]  layer bbox/regressor - 2.062864 ms
[GIE]  layer bbox/regressor output reformatter 0 - 0.053386 ms
[GIE]  layer network time - 301.203705 ms
detectnet-console:  finished processing network  (1505047556394)
1 bounding boxes detected
bounding box 0   (17.527779, -34.222221)  (193.388885, 238.500000)  w=175.861115  h=272.722229
draw boxes  1  0   0.000000 200.000000 255.000000 100.000000
detectnet-console:  writing 400x400 image to 'images/outputtim.png'
detectnet-console:  successfully wrote 400x400 image to 'images/outputtim.png'


References:

740 Views
Don't have an account?
Coming from Hortonworks? Activate your account here
Version history
Revision #:
2 of 2
Last update:
‎08-17-2019 11:19 AM
Updated by:
 
Contributors
Top Kudoed Authors