简体   繁体   English

在 go 上重新训练 Tensorflow Model

[英]Retrain Tensorflow Model on the go

I m trying to create an application that captures the feed of one camera, detects the faces in the feed, then takes pictures of them and adds them to the image database.我正在尝试创建一个应用程序来捕获一个相机的提要,检测提要中的人脸,然后为它们拍照并将它们添加到图像数据库中。 Simultaneously another camera feed will be captured and another neural network will compare the faces in the second camera feed with the face images in the database and then will display the name of the person.同时将捕获另一个摄像头,另一个神经网络会将第二个摄像头中的人脸与数据库中的人脸图像进行比较,然后显示该人的姓名。 Ideally, the new face images should be loaded into the neural network model without it completely retraining.理想情况下,新的人脸图像应该在没有完全重新训练的情况下加载到神经网络 model 中。

Right now I'm trying to achieve that with TensorFlow and OpenCV.现在我正在尝试使用 TensorFlow 和 OpenCV 来实现这一目标。

Would a dynamic neural network be possible with TensorFlow? TensorFlow 是否可以实现动态神经网络?

As for step two(getting the name of the person), I don't think you would need any retraining to achieve this.至于第二步(获取人名),我认为您不需要任何再培训即可实现这一目标。

You could use Convolutional LSTM or a similar nn.您可以使用卷积 LSTM 或类似的 nn。 input shape could be (None,image_dimension_x,y,3) (3 is the color channel, for RGB)输入形状可以是(None,image_dimension_x,y,3) (3 是颜色通道,对于 RGB)

where None would be the current total number of images in the database.其中 None 将是数据库中当前的图像总数。 It passes all the images in the database into the nn and returns a number as an index.它将数据库中的所有图像传递到 nn 并返回一个数字作为索引。

Or alternatively, you could use a normal convolution (without the None)and make it output the confidence it has for each image in the database to be the person on camera right now.或者,您可以使用普通卷积(没有 None)并使其 output 对数据库中的每个图像现在成为相机上的人的信心。 Then choose the person with the highest confidence.然后选择最有信心的人。

I would say the second one is easier and probably better, that's my suggestion anyway.我会说第二个更容易,可能更好,无论如何这是我的建议。

Hope it helps:)希望能帮助到你:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM