torch-opencv-demos icon indicating copy to clipboard operation
torch-opencv-demos copied to clipboard

`locate haarcascade_frontalface_default.xml`

Open gouxiayibu opened this issue 9 years ago • 3 comments

I can not find locate haarcascades_cuda/haarcascade_frontalface_default.xml. what is this? where to find it?

gouxiayibu avatar Aug 05 '16 03:08 gouxiayibu

it's a part of opencv https://github.com/opencv/opencv/tree/master/data/haarcascades_cuda

szagoruyko avatar Aug 05 '16 09:08 szagoruyko

Is the directory search path relative? Do we place the file under torch-opencv-demos/face_recognition/haarcascades_cuda? Is the code searching under $OpenCV_DIR? (e.g. OpenCV_DIR=$HOME/opencv-3.1.0/release)

demo.lua: local XMLTarget = 'haarcascades_cuda/haarcascade_frontalface_default.xml' local command = io.popen('locate '..XMLTarget, 'r')


nvidia@tegra-ubuntu:~/torch-opencv-demos/face_recognition$ th demo.lua camera

================== Use 1..9 keys to change the person to be labeled ================== ================== Double-click the face to label it ================== ================== Press Space to pause the stream ==================

Looking for haarcascades_cuda/haarcascade_frontalface_default.xml... sh: 1: locate: not found /home/nvidia/torch/install/bin/luajit: demo.lua:53: attempt to index local 'locateOutput' (a nil value) stack traceback: demo.lua:53: in main chunk [C]: in function 'dofile' ...idia/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk [C]: at 0x004061f0

kaisark avatar Mar 23 '18 20:03 kaisark

I installed mlocate (sudo apt-get install mlocate) and updated the db (sudo updatedb) and the issue was resolved. no worries...

kaisark avatar Mar 23 '18 21:03 kaisark