1218嘗試
(一)情緒識別器
運行結(jié)果展示

不足:每次只能運行單張圖片,下午修改使能夠讀取多行圖片。(參考id_invert)
(二)修改代碼實現(xiàn)批量圖片導(dǎo)入并保存
添加了圖像.list文件并結(jié)合循環(huán)實現(xiàn)了批量導(dǎo)入
運行結(jié)果展示


(三)id_invert批量生成某一層下變動的文件觀察效果
只需要修改下保存文件夾,讓它直接把一層的結(jié)果保存在一個而不是多個文件夾下即可
步數(shù)減少為2-5
幅度8-16之間隨便走,多數(shù)維度都不會有太大變化

(四)tensorflow警告
在用 pip 安裝tensorflow的CPU版本后,在運行的時候通常會出現(xiàn)如下提示:Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
解決方案
借助github上編譯好的版本進(jìn)行安裝
github地址:?https://github.com/lakshayg/tensorflow-build
其他版本鏈接見https://blog.csdn.net/u012995500/article/details/105576593
卸載原有版本 pip uninstall tensorflow
下載ensorflow-1.9.0-cp36-cp36m-linux_x86_64.whl?,然后直接對應(yīng)的環(huán)境中:
pip install?tensorflow-1.9.0-cp36-cp36m-linux_x86_64.whl
安裝成功后編譯

不再出現(xiàn)編譯警告問題,且運行速度也有所提升。
參考代碼
https://github.com/oarriaga/face_classification
https://ai.baidu.com/tech/face/detect #情緒檢測API
https://blog.csdn.net/u012995500/article/details/105576593
