{ "info": { "author": "Andre Anjos", "author_email": "andre.anjos@idiap.ch", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Natural Language :: English", "Programming Language :: Python", "Topic :: Scientific/Engineering :: Artificial Intelligence", "Topic :: Scientific/Engineering :: Image Recognition" ], "description": "=================================================\n Python Bindings to Liu's Optical Flow Framework\n=================================================\n\nThis package is a simple Boost.Python wrapper to the open-source Optical Flow\nestimator developed by C. Liu during his Ph.D. The code was originally\nconceived to operate over Matlab. This is a Python/`Bob\n`_ port. If you use this code, the author\nasks you to cite the following paper::\n\n @thesis{Liu_PHD_2009,\n title = {{Beyond Pixels: Exploring New Representations and Applications for Motion Analysis}},\n author = {Liu, C.},\n institution = {{Massachusetts Institute of Technology}},\n year = {2009},\n type = {{Ph.D. Thesis}},\n }\n\nIf you decide to use this port on your publication, we kindly ask you to cite\n`Bob`_ as well, as the base software framework, on which this port has been\ndeveloped::\n\n @inproceedings{Anjos_ACMMM_2012,\n author = {A. Anjos and L. El Shafey and R. Wallace and M. G\\\"unther and C. McCool and S. Marcel},\n title = {Bob: a free signal processing and machine learning toolbox for researchers},\n year = {2012},\n month = oct,\n booktitle = {20th ACM Conference on Multimedia Systems (ACMMM), Nara, Japan},\n publisher = {ACM Press},\n url = {http://publications.idiap.ch/downloads/papers/2012/Anjos_Bob_ACMMM12.pdf},\n }\n\n`Here is a link `_ to Liu's\nhomepage with details on the code, also displaying the original Matlab port.\n\nInstallation\n------------\n\nYou can just add a dependence for ``xbob.optflow.liu`` on your ``setup.py`` to\nautomatically download and have this package available at your satellite\npackage. This works well if Bob is installed centrally at your machine.\n\nOtherwise, you will need to tell ``buildout`` how to build the package locally\nand how to find Bob. For that, just add a recipe to your buildout that will\nfetch the package and compile it locally, setting the buildout variable\n``prefixes`` to where Bob is installed (a build directory will also work). For\nexample::\n\n [buildout]\n parts = xbob.optflow.liu \n prefixes = /Users/andre/work/bob/build/debug\n ...\n\n [xbob.optflow.liu]\n recipe = xbob.buildout:develop\n\n ...\n\nDevelopment\n-----------\n\nTo develop these bindings, you will need the open-source library `Bob\n`_ installed somewhere. At least version\n1.1.0 of Bob is required. If you have compiled Bob yourself and installed it on\na non-standard location, you will need to note down the path leading to the\nroot of that installation.\n\nJust type::\n\n $ python bootstrap.py\n $ ./bin/buildout\n\nIf Bob is installed in a non-standard location, edit the file ``buildout.cfg``\nto set the root to Bob's local installation path. Remember to use the **same\npython interpreter** that was used to compile Bob, then execute the same steps\nas above.\n\nUsage\n-----\n\nPretty simple, just do something like::\n\n import bob\n from xbob.optflow.liu import cg_flow as flow\n ...\n (u, v, warped) = flow(image1, image2)\n\nThe ``cg_flow`` method accepts more parameters. Please refer to its built-in\ndocumentation for details.\n\nReproducible Research Notes\n---------------------------\n\nSome notes on being able to reproduce consistent results through the different\nplatforms supported by `Bob`_.\n\nDifferences between Matlab and Bob/Python ports\n===============================================\n\nI have detected inconsistencies between output produced by these pythonic\nbindings and Ce Liu's Matlab-based implementation. In all instances, these\ndifferences come from differences in either the gray-scaling conversion and/or\nthe decompression routines for the test images and movies. Once a precise input\nis given in double-precision gray-scale, both bindings (ours and Ce Liu's\nMatlab ones) give out **exactly** the same output.\n\nThis means that you should expect precision problems if you feed in videos or\nlossy input formats such as JPEG images. If you input HDF5 files, Matlab\n``.mat`` files or any other data in formats which are **not** subject to lossy\ncompression/decompression, this data is pre-grayscaled **and** stored in\ndouble-precision floating point numbers, the output is consistently the same,\nno matter which environment you use.\n\nIf you input data which is not double-precision gray-scale, then it is (1)\nconverted to double-precision representation and then (2) gray-scaled. These\nsteps are taken in this order in both bindings. Depending on which you are\nusing (Bob/Python *versus* Matlab), the results will be slightly different.\nThis small differences in the input to the flow estimation engine will make\nLiu's framework give (hopefully slightly) different output. The outputs should\nbe comparable though, but your mileage may vary.\n\nNew SOR-based Implementation\n============================\n\nMore recently (in August 2011), Ce Liu introduced a version of the Optical\nFlow framework using Successive Over-Relaxation (SOR) instead of Conjugate\nGradient (CG) for minization. The new framework is presumably faster, but\ndoes not give similar results compared to the old CG-based one.\n\nIf you would like to give it a spin, use the method ``sor_flow`` instead of\n``cg_flow`` as shown above. Notice that the defaults for both implementations\nare different, following the defaults pre-set in the Matlab MEX code in the\ndifferent releases.\n\nParticularly, avoid feeding colored images to ``sor_flow``. While that works\nOK with ``cg_flow``, ``sor_flow`` gives inconsistent results everytime it is\nrun. I recommend gray-scaling images before using ``sor_flow``. With that,\nresults are at least consistent between runs. I'm not sure about their\ncorrectness. Ce Liu has been informed and should be working on it soon\nenough (today is 14.Nov.2012).\n\nTo access this implementation, use `xbob.optflow.liu.sor_flow`.\n\nAccess to the MATLAB code\n=========================\n\nOnce you have installed the package, you will have access to a directory called\n``matlab``, which contains the code as it is/was distributed by Ce Liu, and a\nfew Matlab routines that can be used to produce samples for testing. To use the\nMatlab code, you must::\n\n $ # matlab/cg_based => CG-based implementation\n $ # matlab/sor_based => SOR-based implementation\n $ cd matlab/cg_based/mex\n $ mex Coarse2FineTwoFrames.cpp OpticalFlow.cpp GaussianPyramid.cpp\n $ cd ..\n\nAt this point, the MEX is compiled and ready to be used. You will find 2\nroutines on the directory: ``flowimage`` and ``flowmovie``. They can be used to\nprocess single images or movie files. They both produce `HDF5\n`_ files that can be used as test input for this\npackage's test suite, or for inspection (use ``h5dump`` to look into the file\ncontents).\n\nHere is an example of usage for the Matlab function ``flowimage``::\n\n $ matlab\n ...\n >> flowimage ../../xbob/optflow/liu/data/gray table .\n\nThis will generate a file called ``table.hdf5`` that contains the flow\ncalculated for the ``table`` example, i.e. between images ``table1.png`` and\n``table2.png``. The input images are pre-gray-scaled and are taken from\nthe directory ``../../xbob/optflow/liu/data/gray``, following your command.\n\nYou will find more examples on this directory and on the \n``../../xbob/optflow/liu/data/gray`` directory.\n\n.. note::\n\n The contents of the directory ``reference`` are downloaded automatically by\n buildout. You can find the URL of the package by looking inside the file\n ``buildout.cfg``.\n\n.. note::\n\n The example images are coded in PNG format so that they don't suffer from\n compression/decompression problems and can be read the same way in any\n platform or implementation.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/xbob.optflow.liu", "keywords": null, "license": "GPLv3", "maintainer": null, "maintainer_email": null, "name": "xbob.optflow.liu", "package_url": "https://pypi.org/project/xbob.optflow.liu/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/xbob.optflow.liu/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/xbob.optflow.liu" }, "release_url": "https://pypi.org/project/xbob.optflow.liu/1.1.2/", "requires_dist": null, "requires_python": null, "summary": "Python bindings to the optical flow framework by C. Liu", "version": "1.1.2" }, "last_serial": 819059, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "25f758f61a58c68f2652728878044b0a", "sha256": "4f93c014c17fd8bab6141923f61b65baefeb0b170a51c852e0f38ba768d81422" }, "downloads": -1, "filename": "xbob.optflow.liu-1.0.0.zip", "has_sig": false, "md5_digest": "25f758f61a58c68f2652728878044b0a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 54958, "upload_time": "2012-11-09T11:57:31", "url": "https://files.pythonhosted.org/packages/ef/f0/18a7e4c71b0606e2567514e7ada869d029192463b3f33328d12685614022/xbob.optflow.liu-1.0.0.zip" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "6988226e94f03a6523ef11f5bdfeef7d", "sha256": "d6a17e91d9eb2527b37be169e957e0cc18bd7aa9c92c21de39ee45874dc4b433" }, "downloads": -1, "filename": "xbob.optflow.liu-1.1.0.zip", "has_sig": false, "md5_digest": "6988226e94f03a6523ef11f5bdfeef7d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4041649, "upload_time": "2013-02-19T14:09:40", "url": "https://files.pythonhosted.org/packages/69/13/9583e8c7be9a4cc06460ce1e2715e59aef878037f7f656544498ee2937ad/xbob.optflow.liu-1.1.0.zip" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "b57de9f968aec87d038801a69bd48456", "sha256": "d62e78b65cb3e73449db8540c7f9e25dc0c51e4cfa68e5645af4def26729da42" }, "downloads": -1, "filename": "xbob.optflow.liu-1.1.1.zip", "has_sig": false, "md5_digest": "b57de9f968aec87d038801a69bd48456", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4044591, "upload_time": "2013-02-22T11:35:24", "url": "https://files.pythonhosted.org/packages/62/8e/95ae094fe5b5fbed5984a84c5d58b0e425c25572105a1d7106479303f0df/xbob.optflow.liu-1.1.1.zip" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "b6bf59123a92e21d09f0b65f386c0c0b", "sha256": "97a4178468cffd400bac79c78af6f5e7eb9fe0559b6d4c11b28409025982dd9c" }, "downloads": -1, "filename": "xbob.optflow.liu-1.1.2.zip", "has_sig": false, "md5_digest": "b6bf59123a92e21d09f0b65f386c0c0b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4044800, "upload_time": "2013-07-19T12:05:50", "url": "https://files.pythonhosted.org/packages/65/b6/317f82cd6eacfe77b31addb946528e5471bf86495caa8bb421781384b836/xbob.optflow.liu-1.1.2.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b6bf59123a92e21d09f0b65f386c0c0b", "sha256": "97a4178468cffd400bac79c78af6f5e7eb9fe0559b6d4c11b28409025982dd9c" }, "downloads": -1, "filename": "xbob.optflow.liu-1.1.2.zip", "has_sig": false, "md5_digest": "b6bf59123a92e21d09f0b65f386c0c0b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4044800, "upload_time": "2013-07-19T12:05:50", "url": "https://files.pythonhosted.org/packages/65/b6/317f82cd6eacfe77b31addb946528e5471bf86495caa8bb421781384b836/xbob.optflow.liu-1.1.2.zip" } ] }