Synology Photos人脸识别-转载于-我不是矿神
仅适用于X86_64的黑群晖7.0-7.2机型,目前测试识别正常,索引期间CPU占用率也不高。
原理修改为不调用GPU显卡,只用CPU,所以不算完美!仅测试了DS918+、DS920+,其它机型自行研究!
像万由NS202直接支持face识别,不需要修复,BIOS里面关闭vt-d即可!所以建议先研究下实在不行再搞补丁。
9代及以前的英特尔CPU能搞定核显就不要折腾这个补丁!NEW:12代及以后也能搞核显了。。。10-11未知
如果CPU不带核显但安装机型支持核显,肯定要搞这个补丁了!安装机型原版CPU不带核显也不需要折腾补丁。
操作步骤
1、先!!!停用Synology Photos套件
2、SSH连接群晖执行修复(2023.10.31更新脚本)
Synology Photos 1.6.x版本手动打补丁(建议方式)
wget http://code.imnks.com/face/PatchELFSharp
chmod +x PatchELFSharp
# support face and concept
./PatchELFSharp "/var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-platform.so.1.0" "_ZN9synophoto6plugin8platform20IsSupportedIENetworkEv" "B8 00 00 00 00 C3"
# force to support concept
./PatchELFSharp "/var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-platform.so.1.0" "_ZN9synophoto6plugin8platform18IsSupportedConceptEv" "B8 01 00 00 00 C3"
# force no Gpu
./PatchELFSharp "/var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-platform.so.1.0" "_ZN9synophoto6plugin8platform23IsSupportedIENetworkGpuEv" "B8 00 00 00 00 C3"
Synology Photos 1.3.3及之前的旧版本手动打补丁(建议方式)
wget http://code.imnks.com/face/PatchELFSharp
chmod +x PatchELFSharp
./PatchELFSharp "/var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-model.so.1.0" "_ZN9synophoto6plugin7network9IeNetwork11IsSupportedEv" "B8 00 00 00 00 C3"
Synology Photos 1.6.1-0641已打好的补丁,一键替换
wget http://code.imnks.com/face/1.6.1-0641/libsynophoto-plugin-platform.so.1.0 -O /var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-platform.so.1.0 && synopkgctl stop SynologyPhotos && synopkgctl start SynologyPhotos
Synology Photos 1.6.0-0629已打好的补丁,一键替换
wget http://code.imnks.com/face/1.6.0-0629/libsynophoto-plugin-platform.so.1.0 -O /var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-platform.so.1.0 && synopkgctl stop SynologyPhotos && synopkgctl start SynologyPhotos
Synology Photos 1.3.3-0330已打好的补丁,一键替换
wget http://code.imnks.com/face/1.3.3-0330/libsynophoto-plugin-model.so.1.0 -O /var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-model.so.1.0 && synopkgctl stop SynologyPhotos && synopkgctl start SynologyPhotos
注:一键替换脚本也提供了原版备份文件 ...so.1.0.bak 替换文件名即可一键恢复官方。
重新索引,修复效果
PS:视频缩略图问题(群友实测OK,成功条件?:CPU核数≥4)
提前安装矿神SPK源里面的ffmpeg套件
mv /usr/bin/ffmpeg /usr/bin/ffmpeg.bak
ln -s /var/packages/ffmpeg/target/bin/ffmpeg /usr/bin/ffmpeg
进入DSM后台,“控制面板”-“共享文件夹”,为“photo”和“homes”设置“sc-ffmpge”的“可读写”访问权限;登录Synology Photos,进入“设置”-“个人”,点击“重建索引”。
(已屏蔽旧内容)
修复原理、项目来源
群晖7.0系统中的Synology Photos支持人脸识别的补丁
jinlife/Synology_Photos_Face_Patch
恢复官方原版
下载官方套件spk安装包,套件中心手动安装覆盖即可:Synology Photos
本文来自转载,文中观点不代表本站立场,文章出自:https://blog.jinlife.com/index.php/archives/49/
评论区