今天闲来无事,看了一下《雪中悍刀行》,剧情到还可以,关键有个问题,很多美女傻傻分不情况,我就在想,不知道人脸识别模型会不会脸盲 😃
加载模型
Criteria<Image, float[]> criteria = Criteria.builder()
.setTypes(Image.class, float[].class)
.optModelUrls("https://www.d2lcoder.com/model/face_feature.zip")
.optModelName("face_feature")
.optTranslator(new FaceFeatureTranslator())
.optProgress(new ProgressBar())
.optEngine("PyTorch") // Use PyTorch engine
.build();
ZooModel<Image, float[]> model = criteria.loadModel()
编写Translator
private static final class FaceFeatureTranslator implements Translator<Image, float[]> {
FaceFeatureTranslator() {
}