around

【dlib代码解读】人脸关键点检测器的训练

左心房为你撑大大i 提交于 2020-05-03 16:17:37
1. 源代码 先给出测试的结果,关键点并不是特别准,原因是训练样本数据量太少。 以下给出完整的人脸关键点检测器训练代码。详细的代码解读请看第二部分。 /* faceLandmarksTrain.cpp function:借助dlib训练自己的人脸关键点检测器(参考dlib/examples/train_shape_predictor_ex) date:2016/11/6 author:Elaine_Bao */ #include <dlib/image_processing.h> #include <dlib/data_io.h> #include <iostream> using namespace dlib; using namespace std; // ---------------------------------------------------------------------------------------- //获取两眼间距离,输出D[i][j]表示objects[i][j]中人脸的两眼间距离 std::vector<std::vector<double> > get_interocular_distances( const std::vector<std::vector<full_object_detection> >& objects ); // -

解決 Elasticsearch 使用 Java High Level REST Client 時出現 NoClassDefFoundError 錯誤

China☆狼群 提交于 2020-05-02 14:21:17
原文地址: https://medium.com/@hsiehjenhsuan/解決-elasticsearch-使用-java-high-level-rest-client-時出現-noclassdeffounderror-錯誤-10077fcda6b3 因為工作關係需要用到 Elasticsearch,評估過後決定使用 high-level REST client 來進行開發,但在環境建置上卻出現了一些問題 錯誤訊息如下: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'restHighLevelClient' defined in class path resource [org/springframework/boot/autoconfigure/elasticsearch/rest/RestClientAutoConfiguration$RestHighLevelClientConfiguration.class]: Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: Failed to

git worktree 实际使用

泪湿孤枕 提交于 2020-05-01 20:53:30
Create 1.mkdir Connect_Backend_Database 2. cd Connect_Backend_Database 3. git clone url main 4. cd main 5. git worktree add -b v5 ../v5 origin/v5 6. git worktree add -b v6 ../v6 origin/v6 7. git worktree list Clean 1.cd Connect_Backend_Database/main 2. rm -rf ../v5 3. rm -rf ../v6 4. git worktree prune 5. git worktree list https://git-scm.com/docs/git-worktree You are in the middle of a refactoring session and your boss comes in and demands that you fix something immediately. You might typically use git-stash[1] to store your changes away temporarily, however, your working tree is in such a

6D姿态估计从0单排——看论文的小鸡篇——Learning Analysis-by-Synthesis for 6D Pose Estimation in RGB-D Images

人盡茶涼 提交于 2020-05-01 01:41:06
迎来了第一篇使用CNN对姿态进行估计的文章了,哭了。 这篇文章是基于2014_Learning 6D Object Pose Estimation using 3D Object Coordinates(我们读过的)这篇文章,在14年的文章中作者把模型渲染的结果——一个像素点可能的模型坐标轴和位置、以及可能所属的object这两点用随机丛林来保存,然后通过像素级别的估计合成结果,最后利用一个energy function来评估pose渲染出的估计结果和实际值之间的误差来优化pose。这篇文章主要做的内容,就是在之前的随机森林的基础上,吧之前能量函数的部分用CNN来完成——用CNN对比模板生成的结果和实际观测的结果来生成能量值,从而利用能量值来精化得到的Pose。 Analysis-by-Synthesis: compare the observation with the output of a forward process, such as a rendered image of the object of interest in a particular pose. We propose an approach that "learns to compare", while taking these difficulties (occlusion, complicated

6D姿态估计从0单排——看论文的小鸡篇——A Novel Representation of Parts for Accurate 3D Object Detection and Trackin...

a 夏天 提交于 2020-04-30 19:49:23
这个可以算我最长的一片笔记。。因为大部分的文字描述都是和公式做法密切相关。这个方法就是通过2个CNN模型,一个预测图片patch所属模型的部分part的control point,另一个预测part中心的reprojection,然后利用雅可比行列式和 Using a single Gaussian Pose Prior 中介绍的公式来迭代得到使得模型预测的reprojection和control point中心距离最小的pose,然后在经过训练的线性回归分类器检测选出来最好的pose,并且每帧的pose都会作为下一帧的先验 使用CNN来估计2D图像中的关键点位置,而且不只是2D,这篇文章的输入要求是灰度图 Our key idea is to then predict the 3D pose of each part in the form of the 2D projections of a few control points. Even though part of the object is visible, it can predict the 3D pose very accurate. a depth sensor, which would fail on metallic objects or outdoor scenes we therefore propose

Python ThreadPoolExecutor 中的假守护线程

只谈情不闲聊 提交于 2020-04-30 03:08:31
现象 观察 ThreadPoolExecutor的submit代码: def _adjust_thread_count(self): # When the executor gets lost, the weakref callback will wake up # the worker threads. def weakref_cb(_, q=self._work_queue): q.put(None) # TODO(bquinlan): Should avoid creating new threads if there are more # idle threads than items in the work queue. if len(self._threads) < self._max_workers: t = threading.Thread(target=_worker, args=(weakref.ref(self, weakref_cb), self._work_queue)) t.daemon = True #确实是守护线程 t.start() self._threads.add(t) _threads_queues[t] = self._work_queue 在线程池里面启动的线程确实都是守护线程,但是主线程退出后,进程并没有退出,而是还在等子线程结束

改组对象列表

删除回忆录丶 提交于 2020-04-30 01:42:33
问题: I have a list of objects and I want to shuffle them. 我有一个对象列表,我想对其进行洗牌。 I thought I could use the random.shuffle method, but this seems to fail when the list is of objects. 我以为可以使用 random.shuffle 方法,但是当列表中包含对象时,这似乎失败了。 Is there a method for shuffling objects or another way around this? 是否有一种用于改组对象的方法或解决此问题的另一种方法? import random class A: foo = "bar" a1 = a() a2 = a() b = [a1, a2] print(random.shuffle(b)) This will fail. 这将失败。 解决方案: 参考一: https://stackoom.com/question/468A/改组对象列表 参考二: https://oldbug.net/q/468A/Shuffling-a-list-of-objects 来源: oschina 链接: https://my.oschina.net/u/4438370/blog

Google's R Style Guide【转】

我的梦境 提交于 2020-04-28 18:51:45
Google's R Style Guide R is a high-level programming language used primarily for statistical computing and graphics. The goal of the R Programming Style Guide is to make our R code easier to read, share, and verify. The rules below were designed in collaboration with the entire R user community at Google. Summary: R Style Rules File Names : end in .R Identifiers : variable.name , FunctionName , kConstantName Line Length : maximum 80 characters Indentation : two spaces, no tabs Spacing Curly Braces : first on same line, last on own line Assignment : use <- , not = Semicolons : don't use them

微信小程序_(组件)flex布局

走远了吗. 提交于 2020-04-28 14:04:28
  小程序建议使用flex布局进行排版   flex是一个盒装弹性布局   flex是一个容器,所有子元素都是他的成员      定义布局:display:flex   flex容器的属性:     一、flex-direction:排列方向     二、flex-wrap:换行规则     三、justify-content:对齐方式     四、order:成员之间的显示顺序     五、flex:成员所占屏幕的比例 一、flex-direction:排列方向    【默认】 row:从左到右行排序   row-reverse:从右到左行排序   colomn:从上到下列排序   colomn-reverse:从下到上列排序    index.html中定义五个<view>分别加上a、b、c、d、e五个文本标签, 微信小程序中默认flex-direction:row <!-- index.wxml --> Cynical丶Gary < view class ="container" > < view class ='a size' > a </ view > < view class ='b size' > b </ view > < view class ='c size' > c </ view > < view class ='d size' > d </ view >

微信小程序学习 -flex布局

泄露秘密 提交于 2020-04-28 12:31:28
flex布局简介 微信小程序页面布局方式采用的是 Flex 布局。 Flex 布局,是W3c在2009年提出的一种新的方案,可以简便,完整,响应式的实现各种页面布局。 Flex布局提供了元素在容器中的对齐,方向以及顺序,甚至他们可以是动态的或者不确定的大小的。 样式设置为 display:flex : 采用 Flex 布局的元素,称为 Flex 容器(flex container),简称"容器" 容器默认有两个轴:主轴(main axis)和侧轴(cross axis)。 主轴的开始位置为主轴起点(main start),主轴的结束位置为主轴终点(main end),而主轴的长度为主轴长度(main size)。 同理侧轴的起点为侧轴起点(cross start),结束位置为侧轴终点(cross end),长度为侧轴长度(cross size)。详情见下图: flex布局的属性 1.flex-direction 主轴的方向使用 flex-direction 属性控制, 主轴 并不是一定是 从左到右 的,同理 侧轴 也不一定是 从上到下 ,它有4个可选值: row(默认值):主轴为水平方向,起点在左端。 row-reverse:主轴为水平方向,起点在右端。 column:主轴为垂直方向,起点在上沿。 column-reverse:主轴为垂直方向,起点在下沿 2.justify