一、打开群晖套件中心,已安装,找到Synology Photos,查看下图位置,确认一下当前安装的版本号是1.6.2-0710,如果不是该版本请先更新到此版本;
二、在电脑打开SSH软件,用root用户登录到群晖的SSH下,如果你的群晖没有启用root,可以参考《群晖6.2和6.2以上版本开启root的方法(支持DSM7.X版本)》教程开启root,看到以root@开头的就表示已经处于root状态了;
三、输入以下命令(如果你的NAS有代理的,可以把第5行和第6行命令的“https://mirror.ghproxy.com/”这几个字删除):
synopkgctl stop SynologyPhotos
cp -f /var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-platform.so /var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-platform.so-bak
cp -f /var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-platform.so.1.0 /var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-platform.so.1.0-bak
cd /tmp
wget --no-check-certificate https://mirror.ghproxy.com/https://github.com/jinlife/Synology_Photos_Face_Patch/releases/download/1.6.2-0710/libsynophoto-plugin-platform.so
wget --no-check-certificate https://mirror.ghproxy.com/https://github.com/jinlife/Synology_Photos_Face_Patch/releases/download/1.6.2-0710/libsynophoto-plugin-platform.so.1.0
cp -f libsynophoto-plugin-platform.so /var/packages/SynologyPhotos/target/usr/lib/
cp -f libsynophoto-plugin-platform.so.1.0 /var/packages/SynologyPhotos/target/usr/lib/
chmod +x /var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-platform.so
chmod +x /var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-platform.so.1.0
chown SynologyPhotos:SynologyPhotos /var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-platform.so
chown SynologyPhotos:SynologyPhotos /var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-platform.so.1.0
synopkgctl start SynologyPhotos
四、在浏览器打开Synonlogy Photos,在右上角设置菜单,点”重建索引“,耐心等待;
五、如果有重装DSM系统、升级DSM系统、重装Synlology Photos套件、升级Synlology Photos套件行为的,需要重新打上对应版本的补丁。
六、如果使用虚拟机安装群晖,至少要分四个CPU核心给群晖虚拟机,否则这个人脸识别有可能无法正常使用。
七、Synology Photos关于heic文件的说明:需要先激活群晖的 Advanced Media Extensions 套件(简称“AME”套件,可参考《DSM7.X系统Advanced Media Extensions套件(AME)激活教程》激活),然后在Apple iOS系统和MacOS系统中使用Synology Photos这个app上传到群晖Synology Photos的heic文件,才可以正常显示缩略图,使用电脑上传或者别的app上传均不能显示缩略图。
八、如果使用上述补丁后,想恢复系统默认的文件,需要输入以下命令:
synopkgctl stop SynologyPhotos
rm -f /var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-platform.so
rm -f /var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-platform.so.1.0
mv -f /var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-platform.so-bak /var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-platform.so
mv -f /var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-platform.so.1.0-bak /var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-platform.so.1.0
chmod +x /var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-platform.so
chmod +x /var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-platform.so.1.0
chown SynologyPhotos:SynologyPhotos /var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-platform.so
chown SynologyPhotos:SynologyPhotos /var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-platform.so.1.0
synopkgctl start SynologyPhotos
本文使用的人脸补丁来源于:https://github.com/jinlife/Synology_Photos_Face_Patch
感谢jinlife大佬!