opencv 分割边界

This is part of a series describing the development of Moviegoer, a multi-disciplinary data science project with the lofty goal of teaching machines how to “watch” movies and interpret emotion and antecedents (behavioral cause/effect).

这是描述 Moviegoer 开发的系列文章的一部分, Moviegoer 是一个跨学科的数据科学项目,其崇高目标是教学机器如何“观看”电影以及解释情感和前因(行为因果)。

Films are divided into individual scenes, a self-contained series of shots which may contain dialogue, visual action, and more. Being able to programmatically identify specific scenes is key to turning a film into structured data. We attempt to identify the start and end frames for individual scenes by using Keras’ VGG16 image model to group similar frames (images) into clusters known as shots. Then an original algorithm, rooted in film editing expertise, is applied to partition individual scenes.

电影分为各个场景,一系列独立的镜头,其中可能包含对话,视觉动作等。 能够以编程方式识别特定场景是将电影转换为结构化数据的关键。 我们尝试通过使用Keras的VGG16图像模型将相似的帧(图像)分组为称为镜头的簇,来确定单个场景的开始和结束帧。 然后,将以电影编辑专业知识为基础的原始算法应用于分割各个场景。

Overview

总览

Our goal is to, given a set of input frames, identify the start frame and end frame for individual scenes. (This is completely unsupervised, but for the purposes of explanation, I’ll comment on our progress, as well as provide visualization.) In this example, 400 frames, one taken every second from The Hustle (2019) are being fed into the algorithm. Keras’ VGG16 image model is used to vectorize these images, and then unsupervised HAC clustering is applied to group similar frames into clusters. Frames with equal cluster values are similar, so a set of three consecutive frames with the same cluster value could represent a three-second shot of a character.

我们的目标是在给定一组输入帧的情况下,确定各个场景的开始帧和结束帧。 (这是完全不受监督的,但出于解释的目的,我将评论我们的进度并提供可视化效果。)在此示例中,将400帧(每秒从The Hustle(2019)中获取)输入到算法。 使用Keras的VGG16图像模型对这些图像进行矢量化,然后应用无监督的HAC聚类将相似的帧分组为聚类。 具有相同簇值的帧是相似的,因此一组具有相同簇值的三个连续帧可以表示一个角色的三秒钟拍摄。

Here is the vectorization of our sample 400 frames from The Hustle.

这是The The Hustle的样本400帧的向量化。

Clustering of 400 frames from “The Hustle”
来自“ The Hustle”的400帧的聚类

Target visualization

目标可视化

In this example, we have two partial scenes and two complete scenes. Our goal is to identify the scene boundaries of each scene; in this example, we’ll try and identify the boundaries of the blue scene. I’ve colored in this visualization manually, to illustrate our “target”.

在此示例中,我们有两个局部场景和两个完整场景。 我们的目标是确定每个场景的场景边界; 在此示例中,我们将尝试确定蓝色场景的边界。 我已在此可视化中手动上色,以说明我们的“目标”。

Manual annotation of the 400 frames, divided into scenes
手动注释400帧,分为场景

五步算法 (Five-step algorithm)

Step 1: Finding the A/B/A/B Shot Pattern

步骤1:找出A / B / A / B射击图案

Among all 400 frames, we look for any pairs of shots that form an A/B/A/B pattern.

在所有400帧中,我们寻找形成A / B / A / B模式的任何镜头对。

A/B/A/B pattern
A / B / A / B模式

Step 2: Checking for MCUs

步骤2:检查MCU

Finding four A/B/A/B patterns, we run each shot through the MCU image classifier. Two of the patterns were rejected because they contain a shot that doesn’t pass the MCU check. In the below image, the top shot-pair represents our example scene.

找到四个A / B / A / B模式,我们通过MCU图像分类器运行每个镜头。 其中两个模式被拒绝,因为它们包含未通过MCU检查的镜头。 在下图中,最上面的镜头对代表我们的示例场景。

MCU Check
MCU检查

Step 3: Designating a Preliminary Scene Boundary: Anchor Start/End

步骤3:指定初步的场景边界:锚点开始/结束

Once we’ve confirmed that we’re looking at Medium Close-Up shots, we can reasonably believe that we’re looking at a two-character dialogue scene. We look for the first and last appearances of either shot (regardless of A or B). These frames define the Anchor Start and Anchor End Frames, a preliminary scene boundary.

一旦我们确认要查看中景特写镜头,就可以合理地认为我们正在查看两个字符的对话场景。 我们寻找镜头的第一和最后出现(无论A或B)。 这些框架定义了初始场景边界“锚定起点”和“锚定终点”。

Anchor Frames: Preliminary Scene Boundaries
锚框架:初步场景边界

Step 4: Identify Cutaways

步骤4:确定切面

In between the Anchor Start and Anchor End are many other shots known as cutaways. These may represent any of the following:

在Anchor Start和Anchor End之间还有许多其他镜头,称为切面图。 这些可能代表以下任何一种:

  • POV shots, showing what characters are looking at offscreenPOV镜头,显示在屏幕外正在看什么角色
  • Inserts, different shots of Speaker A or B, such as a one-off close-up插入扬声器A或B的不同镜头,例如一次性特写镜头
  • Other characters, both silent and speaking其他字符,包括静音和说话

After we identify these cutaways, we may be able to expand the scene’s start frame backward, and the end frame forward. If we see these cutaways again, but before the Anchor start or after the Anchor end, they must still be part of the scene.

确定这些切点后,我们可以向后扩展场景的开始帧,向后扩展结束帧。 如果再次看到这些切角,但在“锚点”开始之前或“锚点”结束之后,它们仍必须是场景的一部分。

Cutaways Which Appear Between the Anchor Frames
出现在锚框之间的切角

Step 5a: Extending the Scene End

步骤5a:扩展场景结束

After the Anchor End are three frames with a familiar shot (cluster). Since we saw this cluster earlier, as a Cutaway, we incorporate these three frames into our scene. The following frames are unfamiliar, and are indeed not part of this scene.

锚端之后是三帧,并带有熟悉的镜头(群集)。 由于我们较早地看到了该群集,因此它是Cutaway,因此将这三个帧合并到场景中。 以下帧是陌生的,并且确实不是该场景的一部分。

Extending the Scene End, Forward
扩展场景结束,向前

Step 5b: Extending the Scene Start

步骤5b:扩展场景开始

We apply this same technique to the scene’s beginning, in the opposite direction. We find many Cutaways, so we keep progressing earlier and earlier until no more Cutaways are found.

我们将相同的技术应用于相反方向的场景开始。 我们发现了很多剖面图,因此我们会越来越快地进行开发,直到找不到更多剖面图为止。

Extending the Scene Start, Backward
扩展场景开始,向后

Evaluation

评价

Below is a visualization of the total frames in the scene, with the blue highlighted frames included in our prediction, and the orange highlighted frames not included in our prediction. This algorithm managed to label most frames of the scene. Although some frames were missed at the scene’s beginning, these are non-speaking introductory frames. The scene takes some time to get started, and we’ve indeed captured all frames containing dialogue, the most important criteria.

以下是场景中所有帧的可视化,蓝色的突出显示的帧包含在我们的预测中,橙色的突出显示的帧不包含在我们的预测中。 该算法设法标记了场景的大多数帧。 尽管在场景开始时就错过了一些框架,但这些都是非言语性的入门框架。 场景需要一些时间才能开始,我们确实捕获了所有包含对话(最重要的条件)的帧。

Blue Frames Were Captured by the Algorithm
该算法捕获了蓝框

Wanna see more?

想看更多吗?

  • Repository: Moviegoer

    资料库: Moviegoer

  • Part 1: Can a Machine Watch a Movie?

    第1部分: 机器可以看电影吗?

  • Part 2: Cinematography Shot Modeling

    第2部分: 摄影镜头建模

  • Part 3: Scene Boundary Partitioning

    第3部分: 场景边界分区

  • Part 4: Dialogue Attribution

    第4部分: 对话归因

  • Part 5: Four Categories of Comprehension

    第五部分: 四类理解

  • Part 6: Vision Features

    第6部分: 视觉功能

翻译自: https://medium.com/swlh/moviegoer-scene-boundary-partitioning-95a0192baf1e

opencv 分割边界


http://www.taodudu.cc/news/show-863654.html

相关文章:

  • 监督学习无监督学习_无监督学习简介
  • kusto使用_Python查找具有数据重复问题的Kusto表
  • 使用GridSearchCV和RandomizedSearchCV进行超参数调整
  • rust面向对象_面向初学者的Rust操作员综合教程
  • 深度学习术语_您应该意识到这些(通用)深度学习术语和术语
  • 问题解决方案_问题
  • airflow使用_使用AirFlow,SAS Viya和Docker像Pro一样自动化ML模型
  • 迁移学习 nlp_NLP的发展-第3部分-使用ULMFit进行迁移学习
  • 情感分析朴素贝叶斯_朴素贝叶斯推文的情感分析
  • 梯度下降优化方法'原理_优化梯度下降的新方法
  • DengAI —数据预处理
  • k 最近邻_k最近邻与维数的诅咒
  • 使用Pytorch进行密集视频字幕
  • 5g与edge ai_使用OpenVINO部署AI Edge应用
  • 法庭上认可零和博弈的理论吗_从零开始的本征理论
  • 极限学习机和支持向量机_极限学习机I
  • 如何在不亏本的情况下构建道德数据科学系统?
  • ann人工神经网络_深度学习-人工神经网络(ANN)
  • 唐宇迪机器学习课程数据集_最受欢迎的数据科学和机器学习课程-2020年8月
  • r中如何求变量的对数转换_对数转换以求阳性。
  • 美团脱颖而出的经验_使数据科学项目脱颖而出的6种方法
  • aws rds同步_将数据从Python同步到AWS RDS
  • 扫描二维码读取文档_使用深度学习读取和分类扫描的文档
  • 电路分析导论_生存分析导论
  • 强化学习-第3部分
  • 范数在机器学习中的作用_设计在机器学习中的作用
  • 贝叶斯深度神经网络_深度学习为何胜过贝叶斯神经网络
  • 模型监控psi_PSI和CSI:前2个模型监控指标
  • flask渲染图像_用于图像推荐的Flask应用
  • pytorch贝叶斯网络_贝叶斯神经网络:2个在TensorFlow和Pytorch中完全连接

opencv 分割边界_电影观众:场景边界分割相关推荐

  1. 使用Python,OpenCV实现简单的场景边界/拍摄转换检测器

    使用Python,OpenCV进行简单的场景边界/拍摄转换检测器 1. 效果图 2. 实现 2.1 步骤 2.2 什么是"场景边界"和"拍摄过渡"? 2.3 代 ...

  2. 21天Jmeter打卡Day17 后置处理器_JSON_正则表达式_边界提取器_完成删除场景模拟测试

    1天Jmeter打卡Day17 后置处理器_JSON_正则表达式_边界提取器_完成删除场景模拟测试 https://www.jianshu.com/p/5c1d64e5d724 Json提取器见Day ...

  3. python opencv输出mp4_Python玩转视频处理(四):视频按场景进行分割

    在上一篇文章(python在手,女神视频轻松有)分享了用AI人脸识别技术标记人物出现时间点来截取视频片段的教程,它的局限性在于只能通过识别特定的对象(比如人脸)来操作.在本文中将分享一个按场景进行分割 ...

  4. 场景解析和语义分割区别_语义分割概念及应用介绍

    摘要: 一份关于语义分割的基本概述,涵盖语义分割的特征和可能的用途,包括地质检测.自动驾驶.面部识别等. 近年来,以深度学习为中心的机器学习技术引起了人们的关注.比如自动驾驶汽车已经逐渐成为可能,但在 ...

  5. 道路场景语义分割综述_王飞龙

    挖坑:暂时还没有理解的定义或者方法,但因为暂时不重要留到后面看 论文结构 一.引言 1.道路场景语义分割定义 针对道路场景进行语义分割是对采集到的道路场景图像中的每个像素都划分到对应的类别,实现道路场 ...

  6. VTK:场景边界SceneBounds用法实战

    VTK:场景边界SceneBounds用法实战 程序输出 程序完整源代码 程序输出 程序完整源代码 #include <vtkActor.h> #include <vtkAssemb ...

  7. OpenCV图像旋转,指定填充背景颜色边界颜色

    OpenCV图像旋转,指定填充背景颜色边界颜色 OpenCV与图像旋转有关的函数: (1)warpAffine函数 void cv::warpAffine ( InputArray  src,     ...

  8. 打破场景边界,PDFlux助你多领域表格提取

    打破场景边界,PDFlux助你多领域表格提取:https://zhuanlan.zhihu.com/p/70092369

  9. python 画出决策边界_决策边界可视化,让你的分类合理有序

    作者--Navoneel Chakrabarty 在数据科学领域,分类问题是一个非常普遍和重要的问题.例如:糖尿病视网膜病变.情绪分析.数字识别.癌症类型预测(恶性或良性)等.这些问题往往通过机器学习 ...

最新文章

  1. vantui框架switch上显示提示文字_?Switch主机账号官网注册教程
  2. <马哲>生产方式是社会发展的决定力量2017-12-27
  3. 硬盘安装Fedora16
  4. 返回内容验签失败_邮件经常失败回弹很糟心?一定要知道这几个小知识
  5. linux 网络有关的5个命令
  6. CCNA 学习笔记(七)--交换知识(VLAN VTP TRUNK)
  7. java进行图片和字符串的互相转换
  8. ki4so-发起一个史上最开源的sso项目
  9. 寻找黑匣子——程序行为记录与跟踪
  10. 64位 mxcomponent_三菱MX Component 4.16S下载
  11. 阿里巴巴矢量图标库的引入——symbol类型的使用——阿里图标组件封装
  12. java报销流程的实现_Filenet实现报销流程
  13. logo计算机语言,LOGO语言
  14. GAN网络学习笔记系列2-Cluster GAN
  15. python+nodejs+Vue体检信息管理系统项目源码
  16. java 熄灯问题_遍历搜索空间的例子:熄灯问题
  17. android一键刷机工具,刷机也能如此轻松 Android一键刷机工具
  18. Reservoir sampling(水塘抽样)
  19. 学号20182325袁源 实验一《Linux基础与Java开发环境》实验报告
  20. html53列多行表格样式,教程(53):表格之美--了解布局菜单!

热门文章

  1. 想靠大数据创业 你需要了解什么
  2. 《Android UI基础教程》——2.1节创建一个应用
  3. nginx location配置详解
  4. CSS行高——line-height
  5. 最新TurboMail邮件服务器Linux_安腾版本上市
  6. [共享]一个文件上传的控件,绝对是精品源码
  7. scala java maven项目_IntelliJ IDEA下Maven创建Scala项目的方法步骤
  8. java 虚拟机 新生代与老年代gc_java 虚拟机--新生代与老年代GC
  9. 八皇后非递归算法c语言,要求;编写实现八皇后问题的递归解法或非递归解法,对于任意给定的一? 爱问知识人...
  10. java中Mark接口_JVM源码分析之Java对象头实现