Deep Relative Attributes

本文介绍了一种深度相对属性(DRA)算法,用于学习图像对的非线性排名函数。与传统方法相比,DRA模型在统一的卷积神经网络框架中联合学习视觉特征和排名函数,提升了相对属性学习的准确性。通过从ImageNet的大规模视觉识别任务转移知识,DRA解决了小规模标注数据的问题。实验表明,DRA在三个数据集上的性能优于现有方法,提高了8%,9%和14%的准确率。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Relative Attributes 用于学习ranking function 来描述strength of the attribute. 多数当前的学习方法都是通过利用hand-crafted visual features对每个attribute学习到线性的ranking function.这篇论文我们提出 deep relative attributes (DRA)算法去学习 visual features ,并且得到描述成对图像相对属性的非线性 ranking function.这里 visual features 和 ranking function同时学习。DRA模型包含 5 convolutional neural layers, 5 fully connected layers, and a relative loss function which contains the contrastive constraint and the similar constraint corresponding to the ordered image pairs and the un-ordered image pairs,respectively.为了有效训练DRA,我们利用transferred knowledge from the large scale visual recognition on ImageNet.最后我们在3个数据集上进行实验,结果DRA确实比 the state-of-the-art relative attribute 学习方法要好一点。准确率提升 8%, 9%, and 14%。

当前许多相对属性的学习算法都是基于SVM框架的,得到的ranking score表示某属性相对其他图像的强度。相对属性学习算法的提升有一下三个方面:
1.Existing relative attribute methods rely on traditional hand-crafted features, such as gist descriptor , and color histogram ,which may not optimally capture the most a

### Vue 属性(Attributes)的使用方法与定义 在 Vue.js 中,`attributes` 并不是一个独立的功能模块,而是指代 HTML 元素上的属性集合。当我们在模板中绑定数据或者操作 DOM 时,Vue 的编译器会自动处理这些 `attributes`。以下是关于 Vue 中 `attributes` 的具体说明: #### 1. **什么是 Attributes** HTML 元素中的 `attributes` 是用来描述该元素特性的键值对。例如 `<div id="app">` 中的 `id="app"` 就是一个 attribute。在 Vue 组件中,未被声明为 `props` 的特性会被视为普通的 `attribute`。 如果组件根节点上存在未声明的 `prop` 或者动态绑定的内容,则这些内容会被传递到组件的根节点作为原生 `attribute`[^2]。 #### 2. **如何使用 Attributes** 可以通过 `$attrs` 访问父作用域中绑定的所有 `attribute` 和事件监听器(不包括类名和样式)。这通常用于高阶组件场景下,将未知的 `attribute` 转发给子组件或内部元素。 ```javascript // 父组件向子组件传递多个未声明的 prop <child-component title="Hello Vue" data-test-id="test"></child-component> ``` 在子组件中可以这样获取并转发它们: ```vue <script> export default { inheritAttrs: false, // 防止默认行为将 $attrs 应用到根节点 }; </script> <template> <button v-bind="$attrs"> Click Me </button> </template> ``` 上述代码片段展示了通过 `v-bind="$attrs"` 把所有的非显式声明 props 自动应用到了按钮标签上[^1]。 #### 3. **控制 Attribute 的继承** 默认情况下,任何未被声明为 `prop` 的特性都会被添加到组件的根元素上去。如果你不想让某些特定的特性影响到根元素,你可以设置选项 `inheritAttrs: false` 来关闭这种行为,并手动决定如何处置这些额外的数据。 #### 4. **Attribute vs Prop** 需要注意的是,虽然两者都表示附加的信息,但是他们有本质区别: - Props 明确地定义了一个接口来接收来自外部的数据; - Attributes 则更像是一种通用机制,允许任意数量的不同类型的元信息附着在一个对象之上而无需提前约定好结构。 --- ### 示例代码展示 下面提供一段简单的例子演示如何利用 `$attrs` 实现跨级传参功能: ```html <!-- ParentComponent.vue --> <template> <ChildComponent customAttr="valueA" anotherCustomAttr="valueB"/> </template> ``` ```js // ChildComponent.vue export default { inheritAttrs: false, } ``` ```html <!-- GrandChildComponent.vue --> <template> <!-- Forward all unknown attributes to inner element --> <input type="text" v-bind="$attrs"> </template> ``` 在这个案例里,尽管 `customAttr` 及其兄弟们并未成为正式参数列表的一部分,但由于启用了 `$attrs` 支持的缘故,最终还是成功抵达目标位置——即嵌套最深的那个输入框控件身上去了! ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值