这个的东西困扰我很久,终于弄成了。不知道我做的是不是太繁琐,如果有人做的更简单,希望指出,谢谢。
docker中,目前有一个容器。mtcnn其中包括:pnet,rnet和onet,这三个是要布置在一起,其中加入了reshape操作。
没学明白之前,一直以为多模型之间有什么联系。现在明白了。下面是一个多用户单模型的配置文件。
model_config_list:{ config:{ name:"pnet", base_path:"/models/facenet", model_platform:"tensorflow" }, config:{ name:"rnet", base_path:"/models/facenet", model_platform:"tensorflow" }, config:{ name:"onet", base_path:"/models/facenet", model_platform:"tensorflow" }, config:{ name:"classify", base_path:"/models/facenet", model_platform:"tensorflow" }, }如果实际应用可能要多用户多模.
假设环境你都布置完了
转化模型成servedmodel类型。写配置文件发布模型绑定固定ip不要用rest这个接口(也就是8501),需要把numpy转化json类型。浪费时间.
可以在线更新配置文件,不用停下来。
还有就是更新模型的问题。
--------------
mtcnn的三个模型,在预测时候,可以放到一个graph中,输入为三个尺寸的图像,输出为9个预测接结果(每个net有3个结果)。
我想这个融合应该预测速度更快。pnet和rnet的分类是用不到的。这里可以不给出来。也就是只有7个输出。