嘉嘉同学

Advertisements

tensor voting

上次isvc最大的收获就是听了堂tensor voting的讲座

tensor voting的创始人讲的。讲的非常简单,浅显易懂。之前下过那本书,但是一到理论部分感觉就糊了。而听Philippos Mordohai同学的讲座则感觉完全不一样。就像他说的,很simple,很beautiful。

今天又开始看这个。感觉又有一点儿糊。voting field的部分很清楚,tensor也很清楚。但是关键的细节不是很清楚。比如从头到尾的一个流程是如何,如果是pseudo code该怎么写?首先第一步,如何从一堆的点得到一些tensor呢?有了tensor才能做voting阿。那本书也没讲清楚。到网上找slides也没发现。后来来回看一篇paper,就是tensor voting, theory and applications,再看3D的那张slides,再进行强力的inference才搞明白。其实也很简单,就是对每一个点,取他邻近的一个点,可以得到一个tensor,汇集所有邻近的点所得到的tensor,就得到这个点本身的tensor。有了这个tensor,就可以对空间每一个网格点作voting。每个voting也是一个tensor。有了densor tensor map,就可以提取salient的特征,通过找local最大值。

还有一个问题一直萦绕着的,就是怎么得到那个三维模型的。那个模型显然不是简单的一个点。后来从一张slides里看到,原来是通过marching cubes。

以前我觉得这个东西其实没啥,如果简单的作一个multi scale,似乎也可以得到同样的效果。那些noise可以直接通过一个threshold过滤掉。后来听懂后,感觉还是有一些东西在里面。最关键的是那个field,就像电磁场一样。这个东西编码了local的结构特征,以及smoothness的constraints。用这个东西可以算出未知网格的值,可以算是一种更高级的interpolate。

当时听讲座的时候有一个人其实问的很好,说你这个跟clustering有啥区别。不过Philippos Mordohai同学直接把这个问题给回避了,说不怎么了解clustering领域。

很欣赏Philippos Mordohai同学做研究的方式。开始有一个简单的想法,然后一直坚持做下去,不断的完善和扩充理论,以及应用到各个方面。其实tensor voting这个东西已经研究了很多年。

再说tensor voting的应用。首先很广,从early vision到high level vision都有应用。其实核心很简单,就是从一堆的有noise的点里inference出结构特征,比如线,面等等,同时把noisy data过滤掉。有一篇paper是拿这个做epipolar geometry。原理和直线拟合是一样的。一般的方式是ransac。outliers要多了就不行了。tensor voting的另一个好处是可以同时得到多个salient的模型。比如空间里的多个面。

发现很多问题到最后都变成了面的拟合问题。。。。 

presentation zen digest(Crafting the story)

The Heath brothers were interested in what makes some ideas effective and memorable and other ideas utterly forgettable. Some stick and others fade away. Why? What the authors found—and explain simply and brilliantly in their book—is that "sticky" ideas have six key principles in common: simplicity, unexpectedness, concreteness, credibility, emotions, and stories.
 
the biggest reason why most people fail to craft effective or "sticky" messages is because of what they call the "Curse of Knowledge." 
 
The easiest way to explain complicated ideas is through examples or by sharing a story that  underscores the point. 
 
To do this, they scrutinized every scene to make sure that the scene—no matter how cool it was— actually contributed to the story. 
 
eliminating parts that are not absolutely crucial to your overall point or purpose of the talk. You must be ruthless. When in doubt, cut it out. 
 
 

presentation zen digest (planning analog)

One of the most important things you can do in the initial stage of preparing for your presentation is to get away from your computer.
 
A fundamental mistake people make is spending almost the entire time thinking about their talk and preparing their content while sitting in front of a computer screen.
 
Before you design your presentation, you need to see the big picture and identify your core messages—or the single core message.
 
This can be difficult unless you create a stillness of mind for yourself, something which is hard to do while puttering around in slideware.
 
I don’t think anything is as quick, easy, and immediate as a simple pad and pencil, and nothing gives me space to jot down ideas quite like a massive whiteboard.
 
"If you have the ideas, you can do a lot without machinery. Once you have those ideas, the machinery starts working for you…. Most ideas you can do pretty darn well with a stick in the sand." —Alan Kay
(Interview in Electronic Learning,April 1994)
 
I spend a lot of time working outside of my office in coffee shops, in parks, and while riding on the Japanese Bullet Train (Shinkansen) on one of my trips to Tokyo.
 
And although I have a MacBook Pro or PC with me at virtually all times, it is pen and paper that I use to privately brainstorm, explore ideas, make lists, and generally sketch out my ideas. 
 
I could use the computer, but I find—as many do—that the act of holding a pen in my hand to sketch out ideas seems to have a greater, more natural connection to my right brain and allows for a more spontaneous flow and rhythm for visualizing and recording ideas. 
 
Compared to sitting at a keyboard, the act of using paper and pen to explore ideas, and the visualization of those ideas, seems far more powerful. 
 
The analog approach (paper or whiteboard) to sketch out my ideas and create a rough storyboard really helps solidify and simplify my message in my own head. I then have a far easier time laying out those ideas in PowerPoint or Keynote. 
 
Slowing down is not just good advice for a healthier, happier, more fulfilling life, but it is also a practice that leads to greater clarity. 
 
When you think about it, the really great creatives—designers, musicians, even entrepreneurs, programmers, etc.—are the ones who see things differently and who have unique insights, perspectives, and questions. (Answers are important, but first come questions.) 
 
This special insight and knowledge, as well as plain of gut feel and intuition, can only come about for many of us when slowing down, stopping, and seeing all sides of our particular issue. 
 
One reason why many presentations are so ineffective is that people today just do not take or do not have—enough time to step back and really assess what is important and what is not
 
they did not have the time alone to slow down and contemplate the problem.
 
Seeing the big picture and finding your core message may take some time alone
 
you will be pleasantly surprised if you can create more time every day, every week, month, and year to experience solitude
 
For me at least, solitude helps achieve greater focus and clarity, while also allowing me to see the big picture.
 
Clarity and the big picture are the fundamental elements that are missing from most presentations. 
 
Many believe that solitude is a basic human need, and to deny it is unhealthy for both mind and body.
 
Solitude is required for the unconcious to process and unravel problems.
 
Questions We Should Be Asking
  • How much time do I have?
  • What’s the venue like?
  • What time of the day?
  • Who is the audience?
  • What’s their background?
  • What do they expect of me (us)?
  • Why was I asked to speak? • What do I want them to do? 
  • What visual medium is most appropriate for this particular situation and audience?
  • What is the fundamental purpose of my talk?
  • What’s the story here?
 
What is my absolutely central point? 
Or put it this way: If the audience could remember only one thing (and you’ll be lucky if they do), what do you want it to be? 
 
The presentation would have been greatly improved if the presenter had simply kept two questions in mind in preparing for the talk: What’s my point? And why does it matter? 
 
the presenter is so close to his material that the question of why it should matter simply seems obvious, too obvious to make explicit. Yet, that is what people (including most audiences) are hoping and praying that you’ll tell them. "Why should we care?" That’s going to take persuasion, emotion, and empathy in addition to logical argument. 
 
When building the content of your presentation, you should always put yourself in the shoes of the audience and ask Really ask yourself the tough questions throughout the planning process.
 
Could you sell your idea in the elevator ride and the walk to the parking lot? 
 
practicing what you would do in such a case forces you to get your message down and make your overall content tighter and clearer. 
 
Handouts Can Set You Free
 
Never, ever hand out copies of your slides, and certainly not before your presentation. That is the kiss of death. 
 
The flip side of this is that if the slides can stand by themselves, why the heck are you up there in front of them?"
 
Slides are slides. Documents are documents. They aren’t the same thing. Attempts to merge them result in what I call the slideument 
 
Presentation preparation is about organizing thoughts and focusing the storytelling so it’s all clear to your audience. 
 
If you prepare well, the preparation process itself should help you really know your story. 
 
The computer is a moron. try getting away from the computer in the early stages, the time when your creativity is needed most. 
 
 

presentation zen digest

In 2001, marketing guru and bestselling author Seth Godin—who’s seen more bad presentations than any man should be subjected to— had had enough. Seth decided he’d try to make a difference. So he wrote a 10-page e-book called Really Bad PowerPoint that he sold on Amazon for $2 (money went to charity), and it became the best-selling e-book of the year. "PowerPoint could be the most powerful tool on your computer, but it’s not," Seth said. "It’s actually a dismal failure. Almost every PowerPoint presentation sucks rotten eggs." 

most presentations remain mind-numbingly dull, something to be endured by both presenter and audience alike. 

My favorite book in the summer of 2006 was Daniel Pink’s best-seller, A Whole New Mind (Riverhead Trade). Tom Peters called the book "a miracle." 

"The future belongs to a different kind of person," Pink says. "Designers, inventors, teachers, storytellers—creative and empathetic right-brain thinkers whose abilities mark the fault line between who gets ahead and who doesn’t." 

We’re living in an age, says Pink, that is "…animated by a different form of thinking and a new approach to life—one that prizes aptitudes that I call ‘high concept’ and ‘high touch.’ High concept involves the capacity to detect patterns and opportunities, to create artistic and emotional beauty, to craft a satisfying narrative…." 

it’s increasingly clear that logic alone is not a sufficient condition for success for individuals and for organizations. 

The six aptitudes are: design, story, symphony, empathy, play, and meaning. Mastering them is not sufficient, but leveraging these aptitudes has now become necessary for professional success and personal fulfillment in today’s world. 

Focus, specialization, and analysis have been important in the "information age," but in the "conceptual age," synthesis and the ability to use seemingly unrelated pieces to form and articulate the big picture before us is crucial, even a differentiator. Pink calls this aptitude "symphony." 

Communication is about getting others to adopt your point of view, to help them understand why you’re excited (or sad, or optimistic or whatever else you are.) 

Logic is not enough. Communication is the transfer of emotion. 

If you believe in your idea, sell it.

deep down, we all want to be sold.

No more than six words on a slide. EVER. There is no presentation so complex that this rule needs to be broken. 

Talking about pollution in Houston? Instead of giving me four bullet points of EPA data, why not read me the stats but show me a photo of a bunch of dead birds, some smog and even a diseased lung? This is cheating! It’s unfair! It works. 

Third, no dissolves, spins or other transitions. Keep it simple. 

The home run is easy to describe: You put up a slide. It triggers an emotional reaction in the audience. They sit up and want to know what you’re going to say that fits in with that image. Then, if you do it right, every time they think of what you said, they’ll see the image (and vice versa). 

The art of comics is another place to look for knowledge and inspiration. Comics, for example, are amazingly effective at partnering text and images that together form a powerful narrative which is engaging and memorable. 

Comics and film are the two major ways that stories are told through imagery. 

 

最近的事情

昨天哥哥结婚,恭喜他。祝愿百年好合,白头偕老!

昨天参加了同工会,kai卸任,bo成为新主席。真快啊。上次开同工会还是我卸任,kai上台。转眼大家叫我老主席了。我一直很欣赏kai,他是一个非常厚道,踏实,虔诚的人。有女生让我帮忙找男朋友,我第一个想到的就是他。不过他已经不available了。也就感恩节时候才知道的,kai跟yue恋爱上了。kai不小了,yue比他更大。其实很早我就想到过他们俩,没想到真的成了。老婆说yue是一个又红又专的人。确实,以yue的虔诚,能满足她条件的不会超过三个。kai是其中一个。如果照常人的眼光,他们俩似乎根本不可能。kai比yue小,而且比yue矮。也只有在神的国里,他们是最般配的。上次chen li的婚礼,yue捡到新娘扔出的花,看来是有原因的。kai的父母也刚到。我本来担心他们不同意。不过前天在团契,感觉他父母应该是赞成的。而且他父亲说希望kai在明年能结婚。

cindy星期四回来参加毕业典礼。父亲也过来了。一起照相,吃饭。碰到hu na了,她也毕业。还有好多认识的人。哎,自己还在这儿。cindy说sharp那边也在裁人了。不过她们部门目前还行。但她们也还是有担心。怪不得louie也在linkedin上到处拉关系了。太可怕了。本来还千方百计想进去的。吃饭的时候老板说young career award基本上拿到了。这真是个好消息。这样不仅有四十万的funding,评tenure也是很大的筹码。 

重写代码

之前的代码特别慢

感觉测试和demo都不是很方便

总之感觉非常非常不爽 

这两天重新想了架构,目标是尽量高效

基本上对模块进行完全重写

今天测试了一下,很快揪出问题

原来是一个类的copy太慢

里面缺省定义了一些矩阵buffer

每次copy的时候这些矩阵都被重新算一遍

改用直接copy矩阵,速度也没快多少

有可能矩阵create和release都特别耗时间

重新定义了个参数类,不包含任何矩阵buffer

把需要的矩阵buffer放到另外一个地方

这样一下子速度快了一百多倍!

我开始明白为什么很多c/c++程序员对程序速度的提高非常痴迷

我开始恨不得把每个函数,每个算法都优化一下 

在新的架构下,做这种改变非常容易

另外,细节的visualize, log,测试也都变得容易很多

其实之前还将一个核心的算法单独提取出来作为一个模块

结果一下子又扩展了十几个类

老板昨天又问how far

我说基本上算法部分都完成了,主要是测试real data

这两天换了架构,估计把系统重新搭好还得花两天 

唉,本来一个月前就要搞定的,到现在还不知道啥时候才能做完

 

算法

//接着说速度

除了良好的代码设计,提升编码速度的另一个核心是对领域问题的理解以及对解决方案的理解。或者,这个核心更加重要。

代码说白了其实是头脑知识的编码。

如果对一个问题的理解不够彻底,缺乏洞见,那么,写程序的时候必然会受到各种各样的魔鬼缠绕。这些魔鬼看不见,也不知道藏身何处,或者,即使知道是某个地方出了问题,却也无法纠出魔鬼,因为可能是我们本身的算法出了问题。

以前读书的时候,书上写程序=算法+数据结构。

而代码的设计与算法无关。

而算法其实相当重要。这一点经常被忽视。

不同的问题会有不同的算法。而好的算法,则需要好的数学功底。

最近搞robot。发觉很多不同的问题,最后都归结到一两个核心的问题。而核心的问题,我的解决方案并不能令人满意。于是我找了ye教授。ye教授不愧是数学牛人。问题说出来,答案立马出来。算法相当好,而且简单。唉。我就觉得我的数学还是不够。相当不够。

算法的问题一般到大量数据处理的时候才会冒出来。

对每个细微的算法,都必须有详尽的测试,批量数据的测试。保证算法的每个细节,自己都能有清晰的理解。

而算法本身,还需要专门写文档,用公式来描述。公式比代码更简洁。

之前头的那篇paper的算法,本来已经写到类库里。但是总感觉有问题。后来单独抽取出来作一个项目,写模拟,error evaluation,发现果然有漏洞。后来把所有的漏洞都解决,花费了不少功夫,但也发现了一些以前所没看到的东西。这些东西隐藏的很深。而这些漏洞的解决,基本上都要依赖数学的逻辑。

恩。对于核心的算法模块,必须详尽的写文档,分析每个可能发生的情况,必须作详尽的测试,做模拟,error analysis。