Tuesday, February 19, 2008

有感于复旦停订SPIE

去年图书馆停订了science online,原因是:"鉴于Science Online的涨价幅实在太高太快,本馆的正常经费难以承受",今天把SPIE也停订了,这是什么世道,这是什么大学!有钱盖没有用的破楼,就没钱买期刊。校领导干脆把生科,光学两个系也给废了算了,复旦真腐蛋

An interesting workshop of CVPR2008

A workshop called internetvision, topics of interest in this workshop are:
Video/image categorization                                  Collaborative video/image annotation
Automatic video/image parsing                              Object recognition in large scale
Interactive video/image parsing                              Video/image recommendation
Image search refinement with visual content           Integrating text and image search
3D reconstruction/modeling in large scale        Visualization of large photo collection
Internet assisted video/image editing                     Video/image-based advertisement
Internet photo quality assessment                     Virtual 3D maps

This workshop is held for the first time, and many program committee are from companies like MS Adlab, Adobe, Amason, Google, IBM, Yahoo. And I think internetvision will become much hotter, for Youtube(Goolge) needs more efficient ways to annotate, organize its videos, and similarly for Flickr(Yahoo), who needs better methods to manipulate its images. Meanwhile, UW has done some researches in 3D modeling in large scale, and maybe it can be intergrated with Google earth by using images offered by Panoramio , which is useful for vitural  3D maps.  Virtual 3D maps  also need improving,  though  Goolgemap introduced street view.   Besides, for these famous  campanies,  video/image-based ad is much more important, especially for Google,  ideas  in this  area will be valuable.  Forgery image detection on internet is also an interesting problem, for there are numerous flat-cats in China..

Monday, January 07, 2008

IEEE简介之搞笑版 zz

电子类工科学生大都知道IEEE, 这个IEEE就像一个大的BBS论坛,而这个协会下面有很多杂志,比如图像处理,信号处理,微波技术等。这些杂志就是论坛下的分版面。每个版面有版主(主编),版副(副主编)等职务。

大学里的教授负责组织人力在IEEE灌水。教授灌的水被别的论坛或版面转载或引用。这就叫坑。大牛教授挖大坑,小牛教授挖小坑。同学们就在这些大坑,小坑中灌水。

水越多的坑,坑就越牛,从而挖坑的教授(坑主)名气也越大。根据挖坑的大小,和水量,IEEE会评选出IEEE senior member (高级坑主),IEEE fellow (坑王),IEEE life fellow (终生坑王)。一般同学只要交了注册费就可以成为student member (灌水学员), 毕业后可成为member(灌水员)。

IEEE每个版面一般会举行一年一度的版聚(IEEE symposium)。大家从四面八方聚在一起交流灌水心得。一些坑王会在版聚时介绍挖坑经验(IEEE workshop)。为了鼓励灌水学员灌好水,为成为坑主作准备,版聚设了本年度最佳灌水员奖(best student paper)。

一般灌水在IEEE的发贴区(IEEE sponsored conferences)。有价值的坑或者连环坑经编辑后会保留到精华区(IEEE Transaction).

Tuesday, August 14, 2007

Speed up matlab script

http://www-h.eng.cam.ac.uk/help/tpl/programs/Matlab/faster_scripts.html
It's useful for me

Matlab - faster scripts

Matlab is easy to use, but the easiest method might not be the fastest. Fortunately, some of the simpler ways to improve the speed of matlab programs are also amongst the most effective, leading to order-of-magnitude improvements.

Firstly, make sure you're not writing unnecessary code. Each new version of matlab has new functions that might be useful, and functions that have been made faster. Remember that some of matlab's commands are scripts and some are built-in functions which are going to be faster than anything you can write. Use the which command to find out whether or not a function is a script (cumsum for example, isn't).

Also make sure you're up to date with matlab's newer features: Some (like cells and structures) might make your code tidier but slower; others (like the newer visualisation routines) may speed up your code considerably.

Matlab 6.5 introduced the "JIT-Accelerator" which greatly speeds up some scripts with big simple "for" loops. If you have pre-2006 matlabs it might be worth use the profile routine to help you adapt your code to take advantage of it. See the JIT-Accelerator example. Newer matlabs don't show JIT information in the profile output.

Then go through this checklist of issues to consider

Matlab Routines

Some matlab routines are *.m files, others are compiled into matlab (built-in) and are much faster. Try to use built-ins where possible. Use type functionname to see if a function is a built-in.

Functions and Scripts

There are 2 sorts of M-files - functions and scripts. When you call an M-file function MATLAB parses it and stores it in memory, so that on subsequent calls it runs faster. The difference isn't much, but functions are better than scripts anyway - they make use of their own local variables and accept input arguments. Look up the function command to find out how to write functions.

You can convert a function into matlab's internal form yourself using the pcode command, but it's hardly worth it.

Matrix pre-allocation

Matlab has the ability to increase the size of a matrix on demand. If you know the maximum size of a matrix beforehand, it's worth creating the matrix with this size initially rather than making the matrix grow incrementally. Speed-up factors of 500 are possible using this method.

Sparse Arrays

Matlab has 2 ways of storing matrices - full and sparse. Full matrices store their all of their elements in a block of memory; sparse matrices keep a list of the non-zero elements. If matrices aren't dense, using sparse matrices saves memory and increases speed. If you save the following text as spdemo.m you can experiment with using different matrix sizes and densities. For example, spdemo(100,.1) compares multiplication for full and sparse matrices of size 100 by 100 and density .1.
function sp = spdemo(arg1, arg2)
% Comparison of sparse vs full matrices
if (nargin ~= 2)
error('Give order and density');
return
end
S = sprandn(arg1,arg1,arg2);
F = full(S);
% Compare speed.

t0=cputime;
B = S * S;
stime=cputime-t0;

t0=cputime;
C = F * F;
ftime=cputime-t0;

sprintf('Order %d matrix, density %f: Full=%f, Sparse=%f', arg1, ...
arg2, ftime, stime)

Structures and Arrays

Structures of arrays are faster than arrays of structures.

Note that if you're processing a 2D array, it's faster to scan down the columns than along the rows.

Profiling

Before you start spending a lot of time on optimising it's useful to find out where the main bottlenecks are. The profile command can do this for you, providing text or graphical output. For example, this is how you could profile spdemo.m
  profile on 
spdemo(100, .1)
profile off
profile viewer
You'll need to click on the function names displayed by the viewer in order to get detailed information. Within the department one particular diagnostic session led to a speedup of 3000 times (to several hours to several seconds) when it turned out that the same huge .mat file was being loaded on every iteration of a loop.

Vectorisation

Matlab scripts can be written using fortran/C-style "for" loops, but to make the most of matlab's abilities you should try whenever possible to treat matrices as a single entity rather than a bundle of elements. A separate document deals with vectorisation tricks

Algorithms

Matlab routines deal with general cases. If your data has a special feature (matrices are symmetrical, for instance) you may be able to implement an algorithm which is tuned to your special case. See Mex files - an example.

Compilers

It's possible to combine the ease of writing M-files with the speed provided by writing in C or Fortran. Compilers (Mathworks' mcc or the free matcom) convert M-files into compiled C code. Our Signal Processing & Communications group have used mcc successfully. However, mcc isn't free. Also speed improvements depend strongly on the particular application. In some cases, performance improves by more than 200 times, while other files show little or no improvement. Whether or not you use a compiler, it's worth using other optimisation techniques too.

Thursday, August 09, 2007

Tuesday, July 10, 2007

birds of a feather flock together :-)

The first time I read Adelson Edward's paper is one from Nature 2007, focusing on how human perceives the surface property of materials. His research is really solid. From his website, I find that many top researchers in CV field are his students, like Y Weiss, W Freeman, D Heeger. These researchers' name appear in CVPR ICCV ECCV Siggrpah from time to time. Y Weiss also worked together with A. Levin in Huji. A Levin's research is also very interesing , I know her name when I was a senior students because she won the best paper in ECCV06. Her  colorization method is also amazing.  Her spectral matting also gained the CVPR 07 best paper runner up, also she is in MIT now, a holy land of AI in my eyes.
These top researchers inspire me to do top research, and each time when I read their papers, I canont help thinking: how wonderful it is to realize one's idea! 
 
Work for my SSS plan, and hope to be a top research.
 

Monday, June 04, 2007

纪念刘和珍君

鲁 迅 

一 

中华民国十五年三月二十五日,就是国立北京女子师范大学为十八日在段祺瑞
执政府前遇害的刘和珍杨德群两君开追悼会的那一天,我独在礼堂外徘徊,遇见程君,前来问我道,"先生可曾为刘和珍写了一点什么没有?"我说"没有"。她就正告我,"先生还是写一点罢;刘和珍生前就很爱看先生的文章。" 

这是我知道的,凡我所编辑的期刊,大概是因为往往有始无终之故罢,销行一向就甚为寥落,然而在这样的生活艰难中,毅然预定了《莽原》全年的就有她。我也早觉得有写一点东西的必要了,这虽然于死者毫不相干,但在生者,却大抵只能如此而已。倘使我能够相信真有所谓"在天之灵",那自然可以得到更大的安慰,――但是,现在,却只能如此而已。 
可是我实在无话可说。我只觉得所住的并非人间。四十多个青年的血,洋溢在我的周围,使我艰于呼吸视听,那里还能有什么言语?长歌当哭,是必须在痛定之后的。而此后几个所谓学者文人的阴险的论调,尤使我觉得悲哀。我已经出离愤怒了。我将深味这非人间的浓黑的悲凉;以我的最大哀痛显示于非人间,使它们快意于我的苦痛,就将这作为后死者的菲薄的祭品,奉献于逝者的灵前。 

二 

真的猛士,敢于直面惨淡的人生,敢于正视淋漓的鲜血。这是怎样的哀痛者和幸福者?然而造化又常常为庸人设计,以时间的流驶,来洗涤旧迹,仅使留下淡红的血色和微漠的悲哀。在这淡红的血色和微漠的悲哀中,又给人暂得偷生,维持着这似人非人的世界。我不知道这样的世界何时是一个尽头! 

我们还在这样的世上活着;我也早觉得有写一点东西的必要了。离三月十八日也已有两星期,忘却的救主快要降临了罢,我正有写一点东西的必要了。 

三 

在四十余被害的青年之中,刘和珍君是我的学生。学生云者,我向来这样想,这样说,现在却觉得有些踌躇了,我应该对她奉献我的悲哀与尊敬。她不是"苟活到现在的我"的学生,是为了中国而死的中国的青年。 

她的姓名第一次为我所见,是在去年夏初杨荫榆女士做女子师范大学校长,开除校中六个学生自治会职员的时候。其中的一个就是她;但是我不认识。直到后来,也许已经是刘百昭率领男女武将,强拖出校之后了,才有人指着一个学生告诉我,说:这就是刘和珍。其时我才能将姓名和实体联合起来,心中却暗自诧异。我平素想,能够不为势利所屈,反抗一广有羽翼的校长的学生,无论如何,总该是有些桀骜锋利的,但她却常常微笑着,态度很温和。待到偏安于宗帽胡同,赁屋授课之后,她才始来听我的讲义,于是见面的回数就较多了,也还是始终微笑着,态度很温和。待到学校恢复旧观,往日的教职员以为责任已尽,准备陆续引退的时候,我才见她虑及母校前途,黯然至于泣下。此后似乎就不相见。总之,在我的记忆上,那一次就是永别了。 

四 

我在十八日早晨,才知道上午有群众向执政府请愿的事;下午便得到噩耗,说卫队居然开枪,死伤至数百人,而刘和珍君即在遇害者之列。但我对于这些传说,竟至于颇为怀疑。我向来是不惮以最坏的恶意,来推测中国人的,然而我还不料,也不信竟会下劣凶残到这地步。况且始终微笑着的和蔼的刘和珍君,更何至于无端在府门前喋血呢? 

然而即日证明是事实了,作证的便是她自己的尸骸。还有一具,是杨德群君的。而且又证明着这不但是杀害,简直是虐杀,因为身体上还有棍棒的伤痕。 

但段政府就有令,说她们是"暴徒"!;
但接着就有流言,说她们是受人利用的。 

惨象,已使我目不忍视了;流言,尤使我耳不忍闻。我还有什么话可说呢?我懂得衰亡民族之所以默无声息的缘由了。沉默呵,沉默呵!不在沉默中爆发,就在沉默中灭亡。
 

五 

但是,我还有要说的话。 

我没有亲见;听说她,刘和珍君,那时是欣然前往的。自然,请愿而已,稍有人心者,谁也不会料到有这样的罗网。但竟在执政府前中弹了,从背部入,斜穿心肺,已是致命的创伤,只是没有便死。同去的张静淑君想扶起她,中了四弹,其一是手枪,立仆;同去的杨德群君又想去扶起她,也被击,弹从左肩入,穿胸偏右出,也立仆。但她还能坐起来,一个兵在她头部及胸部猛击两棍,于是死掉了。 

始终微笑的和蔼的刘和珍君确是死掉了,这是真的,有她自己的尸骸为证;沉勇而友爱的杨德群君也死掉了,有她自己的尸骸为证;只有一样沉勇而友爱的张静淑君还在医院里呻吟。当三个女子从容地转辗于文明人所发明的枪弹的攒射中的时候,这是怎样的一个惊心动魄的伟大呵!中国军人的屠戮妇婴的伟绩,八国联军的惩创学生的武功,不幸全被这几缕血痕抹杀了。 

但是中外的杀人者却居然昂起头来,不知道个个脸上有着血污……。 

六 

时间永是流驶,街市依旧太平,有限的几个生命,在中国是不算什么的,至多,不过供无恶意的闲人以饭后的谈资,或者给有恶意的闲人作"流言"的种子。至于此外的深的意义,我总觉得很寥寥,因为这实在不过是徒手的请愿。人类的血战前行的历史,正如煤的形成,当时用大量的木材,结果却只是一小块,但请愿是不在其中的,更何况是徒手。 

然而既然有了血痕了,当然不觉要扩大。至少,也当浸渍了亲族;师友,爱人的心,纵使时光流驶,洗成绯红,也会在微漠的悲哀中永存微笑的和蔼的旧影。陶潜说过,"亲戚或余悲,他人亦已歌,死去何所道,托体同山阿。"倘能如此,这也就够了。 

七 

我已经说过:我向来是不惮以最坏的恶意来推测中国人的。但这回却很有几点出于我的意外。一是当局者竟会这样地凶残,一是流言家竟至如此之下劣,一是中国的女性临难竟能如是之从容。 

我目睹中国女子的办事,是始于去年的,虽然是少数,但看那干练坚决,百折不回的气概,曾经屡次为之感叹。至于这一回在弹雨中互相救助,虽殒身不恤的事实,则更足为中国女子的勇毅,虽遭阴谋秘计,压抑至数千年,而终于没有消亡的明证了。倘要寻求这一次死伤者对于将来的意义,意义就在此罢。 
苟活者在淡红的血色中,会依稀看见微茫的希望;真的猛士,将更奋然而前行。 

呜呼,我说不出话,但以此记念刘和珍君!