简体   繁体   English

Amazon Rekognition从流视频中检测名人

[英]Amazon Rekognition detect celebrity from stream video

Amazon Rekognition Celebrity Detection Ios: Done for face detection with a provided image via camera and photo library. Amazon Rekognition名人检测Ios:通过相机和照片库使用提供的图像进行面部检测。

Tried to manage with video (Either from bundle or live URL), to detect celebrity image over the video. 试图通过视频进行管理(从捆绑销售广告或实时URL),以检测视频中的名人图像。

sendVideoToRekognition(celebVideoData: video)

    func sendVideoToRekognition(celebVideoData: URL){
        //Delete older labels or buttons
        DispatchQueue.main.async {
            [weak self] in
            for subView in (self?.CelebImageView.subviews)! {
                subView.removeFromSuperview()
            }
        }
        rekognitionObject = AWSRekognition.default()
        let celebVideoAWS = AWSRekognitionVideo()
        //celebVideoAWS?.bytes = celebVideoData
        let celebRequest = AWSRekognitionRecognizeCelebritiesRequest()

    }

What parameters required and how to get video celebrity name? 需要哪些参数以及如何获得视频名人姓名?

Amazon Rekognition provides Celebrity image detection in several ways: Amazon Rekognition通过多种方式提供名人图像检测:

RecognizeCelebrities() returns an array of celebrities recognized in a still image . RecognizeCelebrities()返回在静止图像中识别出的一系列名人。 The image bytes can be provided with the call, or it can be supplied as an Amazon S3 object. 图像字节可以随调用一起提供,也可以作为Amazon S3对象提供。

StartCelebrityRecognition() starts asynchronous recognition of celebrities in a video stored in Amazon S3 . StartCelebrityRecognition()开始异步存储在Amazon S3中存储视频中的名人识别。 This is probably what you are seeking. 这可能是您要寻找的。

Please note that Amazon Rekognition outputs JSON data highlighting which frame contains a recognized face and where the face is located in the frame. 请注意,Amazon Rekognition输出JSON数据,突出显示哪个框架包含可识别的面孔以及该面孔在框架中的位置。 It does not draw boxes on top of the video. 它不会在视频顶部绘制框。 You would need to do this in your own software. 您将需要在自己的软件中执行此操作。

You can also Recognize Faces in a Streaming Video by providing a Face Collection . 您还可以通过提供人脸收藏识别流视频中的人 The video must be streamed to Amazon Kinesis Video and it will output a Kinesis stream of recognized faces. 该视频必须流式传输到Amazon Kinesis Video,并将输出已识别脸部的Kinesis流。 However, it is not possible to recognize celebrities in a Streaming Video — it only operates off a Face Collection that you provide. 但是, 无法在流视频中识别名人 -它只能在您提供的Face Collection上运行。

Therefore, the demonstration video that you linked can not be done on Amazon Rekognition as a streaming video . 因此, 您链接演示视频无法在Amazon Rekognition上作为流视频完成 However, it could be done by analyzing a video stored in Amazon S3, taking the output data stream and then using it in an application to overlay the name information. 但是,可以通过分析存储在Amazon S3中的视频,获取输出数据流,然后在应用程序中使用它来覆盖名称信息来完成此操作。

The video you linked appears to be using technology from SightHound . 您链接的视频似乎正在使用SightHound的技术。

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

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