projectstreet-detection-docker

Docker for detecting streets. (WIP)
git clone git://archive.git.mtrnord.blog/Nordgedanken/projectstreet-detection-docker.git
Log | Files | Refs | README

stage2_generateHaarDetector.sh (779B)


      1 #!/bin/bash
      2 
      3 export PYTHONPATH="/usr/lib/python2.7/dist-packages/" 
      4 NUM_FILES=$(ls -1 neg --file-type | grep -v '/$' | wc -l)-10
      5 
      6 echo "add cronjob"
      7 #cache optimisation
      8 crontab -l > cron
      9 #echo new cron into cron file
     10 {
     11         echo "* * * * * echo 1 > /proc/sys/vm/drop_caches"
     12         echo "* * * * * echo 2 > /proc/sys/vm/drop_caches"
     13         echo "* * * * * echo 3 > /proc/sys/vm/drop_caches" 
     14 } >> cron
     15 #install new cron file
     16 crontab cron
     17 rm cron
     18 
     19 echo "train haar cascade"
     20 NUM_FILES=$(ls -1 neg --file-type | grep -v '/$' | wc -l)-10
     21 NUM_FILES_HALF=$NUM_FILES/2
     22 opencv_traincascade -data ./data -vec ./positives.vec -bg ./bg.txt -numPos $NUM_FILES -numNeg $NUM_FILES_HALF -numStages 20 -w 50 -h 50
     23 cp "data/cascade.xml" "/root/shared/results/street-cascade-$(date +%s).xml"