擅长:python、mysql、java
<p><strong>面部检测</strong></p>
<p><a href="https://github.com/wavexx/facedetect" rel="nofollow noreferrer">https://github.com/wavexx/facedetect</a>是一个很好的Python OpenCV CLI包装器,我使用ImageMagick在他们的自述文件中有<a href="https://github.com/wavexx/facedetect/pull/7#event-675223551" rel="nofollow noreferrer">just added</a>这个示例:</p>
<pre><code>for file in path/to/pictures/*.jpg; do
name=$(basename "$file")
i=0
facedetect "$file" | while read x y w h; do
convert "$file" -crop ${w}x${h}+${x}+${y} "path/to/faces/${name%.*}_${i}.${name##*.}"
i=$(($i+1))
done
done
</code></pre>
<p>在Ubuntu16.04上测试了数千张(未标记的)Facebook个人资料图片,请参见:<a href="https://github.com/cirosantilli/art/tree/d4352a46064d156591817c4eae5199f5ac8f23be/facebook" rel="nofollow noreferrer">https://github.com/cirosantilli/art/tree/d4352a46064d156591817c4eae5199f5ac8f23be/facebook</a></p>