{"id":20215333,"url":"https://github.com/kitwaremedical/pydstk","last_synced_at":"2026-03-10T00:31:32.619Z","repository":{"id":67764860,"uuid":"11104506","full_name":"KitwareMedical/pydstk","owner":"KitwareMedical","description":"Python Dynamical Systems Toolkit.","archived":false,"fork":false,"pushed_at":"2013-08-16T19:11:20.000Z","size":1550,"stargazers_count":8,"open_issues_count":0,"forks_count":6,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-10-11T12:42:47.145Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"pydstk.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KitwareMedical.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-07-01T19:19:06.000Z","updated_at":"2023-02-06T14:43:30.000Z","dependencies_parsed_at":"2023-02-20T22:16:01.585Z","dependency_job_id":null,"html_url":"https://github.com/KitwareMedical/pydstk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/KitwareMedical/pydstk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KitwareMedical%2Fpydstk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KitwareMedical%2Fpydstk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KitwareMedical%2Fpydstk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KitwareMedical%2Fpydstk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KitwareMedical","download_url":"https://codeload.github.com/KitwareMedical/pydstk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KitwareMedical%2Fpydstk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30318392,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T20:05:46.299Z","status":"ssl_error","status_checked_at":"2026-03-09T19:57:04.425Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T06:21:25.486Z","updated_at":"2026-03-10T00:31:32.601Z","avatar_url":"https://github.com/KitwareMedical.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"pydstk\n======\n\n[![Build Status](https://travis-ci.org/TubeTK/pydstk.png?branch=master)](https://travis-ci.org/TubeTK/pydstk)\n\nPython (Linear / Non-Linear) Dynamical Systems Toolkit (pydstk). \nThis package implements two dynamical system variants that are commonly used in computer vision: \n**Dynamic Textures** (i.e., linear DS) and **Kernel Dynamic Textures** (i.e., non-linear DS). In addition, \nseveral approaches to measure the similarity between dynamical systems are implemented. \n\nRequirements\n------------\n\n1. [**numpy**](http://www.numpy.org)\n2. [**scipy**](http://www.scipy.org)\n3. [**OpenCV**](http://opencv.willowgarage.com/wiki/) (Python wrapping, tested with v2.4.5)\n4. [**SimpleITK**](http://www.simpleitk.org) (Python wrapping)\n5. [**nose**](https://nose.readthedocs.org/en/latest/)\n6. [**termcolor**](https://pypi.python.org/pypi/termcolor)\n7. [**scikit-learn**](http://scikit-learn.org/stable/)\n\nTo check if those packages are available on your system, try\n```python\nimport cv2\nimport scipy\nimport numpy\nimport sklearn\nimport termcolor\nimport SimpleITK\n```\nin a Python console. If no error occurs, you are all set! \n\nReferences\n----------\n\nFor the seminal work on **Dynamic Textures**, see:\n\n```bibtex\n@article{Doretto01a,\n  author = {G.~Doretto and A.~Chiuso and Y.~N.~Wu and S.~Soatto},\n  title = {Dynamic Textures},\n  journal = {Int. J. Comput. Vision},\n  year = 2001,\n  pages = {91--109},\n  volume = 51,\n  number = 2} \n```\n\nSimilarity measurement between two linear dynamical systems by means of subspace-angles is discussed in: \n\n```bibtex\n@inproceedings{DeCock00a,\n  author = {K.~{De Cock} and B.~D.~Moore},\n  title = {Subspace angles between linear stochastic models},\n  booktitle = {CDC},\n  pages = {1561-1566},\n  year = 2000}\n```\n\n**Kernel Dynamic Textures** (as well as the non-linear extension of the subspace-angle based similarity measure) were introduced in:\n\n```bibtex\n@inproceedings{Chan07a,\n  author = {A.~B.~Chan and N.~Vasconcelos},\n  title = {Classifying Video with Kernel Dynamic Textures},\n  booktitle = {CVPR},\n  pages = {1-6},\n  year =  2007}\n```\n\nSupported I/O file formats\n--------------------------\nThe package `dsutil` contains a set of I/O routines to load data from harddisk. Three\ncommon ways of loading video data are: \n- load an actual video file (via `loadDataFromVideoFIle`)\n- load a video represented as a collection of frames (via `loadDataFromIListFile`)\n- load a video as a large data matrix (via `loadDataFromASCIIFile`)\n\nType\n```python\nimport dsutil.dsutil as dsutil\nhelp(dsutil.loadDataFromASCIIFile)\n```\nin a Python console to get more information about the format of the input file(s) and \nthe function parameters (here for function `loadDataFromASCIIFile`).\n\nRunning the unit-tests\n----------------------\nUnit-testing in pydstk is done using `nose`. All tests reside in the `tests` directory. To run, for instance, \nthe tests for `systems.py` module, use:\n```bash\n$ nosetests tests/test_system.py -v\n```\n\nWhere can I get data material ?\n-------------------------------\nSeveral resources for getting dynamic texture data can be found on the internet. An extensive database of dynamic texture is available in the [**Dyntex**](http://projects.cwi.nl/dyntex/) \ncreated by *R. Peteri et al.* Another interesting set of videos (e.g., for recognition experiments) is the [**Traffic**](http://www.svcl.ucsd.edu/projects/traffic/) database created\nby *A. Chan and N. Vasconcelos* that was used in\n\n```bibtex\n@inproceedings{Chan05a,\n  author = {A.~B.~Chan and N.~Vasconcelos},\n  title = {Probabilistic Kernels for the Classification of Auto-regressive Visual Processes},\n  booktitle = {CVPR},\n  year = {2005}}\n```\n\nAnother dataset, from the field of medical Ultrasound imaging is available from [**MIDAS**](http://midas3.kitware.com/midas/folder/10255).\nThis dataset contains a collection of Ultrasound videos acquired on a (hand-made) phantom. The videos (in AVI format) are split into *key* videos and *search*\nvideos and can be used to experiment with approaches that try to recognize the *key* videos in the *search* videos for instance. \nThe `scripts` directory of `pydstk` contains a `download.py` script that can automatically download this database. You only need \nto adjust the file `scripts/pydas.config.example` to your MIDAS account settings. This database was used in\n\n```bibtex\n@article{Kwitt13b,\n  author = {R. Kwitt and N. Vasconcelos and S. Razzaque and S. Aylward},\n  title = {Localizing Target Structures in Ultrasound Video - A Phantom Study},\n  journal = {Medical Image Analysis},\n  volume ={17},\n  number = {7},\n  pages = {712-722},\n  year = 2013}\n```\nand\n```bibtex\n@inproceedings{Kwitt12d,\n  author = {R. Kwitt and N. Vasconcelos and S. Razzaque and S. Alyward},\n  title = {Recognition in Ultrasound Videos: Where Am I?},\n  booktitle = {MICCAI},\n  year = 2012}\n```\n\nSome example applications\n-------------------------\n\n**Estimating a dynamic texture model (DT)**\n- DT states: 5\n- Input data: video file `tests/ultrasound.avi`\n- Output data: DT model file `/tmp/us-dt-model.pkl`\n\n```bash\n$ python dt.py -i tests/data/ultrasound.avi \\ \n               -n 5 \\\n               -t vFile \\\n               -e \\ \n               -o /tmp/us-dt-model.pkl\n```\n**Estimate and synthesize a video from a DT model**\n- DT states: 5\n- Input data: video file `tests/data/ultrasound.avi`\n- Output data: `/tmp/us-dt-model.pkl`\n- Frame rate: 20 FPS\n\n```bash\n$ python dt.py -i tests/data/ultrasound.avi \\\n               -n 5 \\\n               -t vFile \\\n               -e \\\n               -s \\\n               -o /tmp/us-dt-model.pkl \\\n               -m 20\n```\n**Estimating a kernel dynamic texture model (KDT)**\n- KDT states: 5\n- Input data: video file `tests/data/ultrasound.avi`\n- Output data: `/tmp/us-kdt-model.pkl`\n- Kernel: RBF (default)\n\n```bash\n$ python kdt.py -i tests/data/ultrasound.avi -n 5 -t vFile -o /tmp/us-kdt-model.pkl\n```\n**Similarity measurement between two DT models**\n- Source model: `/tmp/us-dt-model.pkl`\n- Reference model: `/tmp/us-dt-model.pkl`\n- Nr. of summation terms (for Lyapunov eq.): 50\n\n```bash\npython dtdist.py -s /tmp/us-dt-model.pkl /tmp/us-dt-model.pkl -n 50\n```\n**Similarity measurement between two KDT models**\n- Source model: `/tmp/us-kdt-model.pkl`\n- Reference model: `/tmp/us-kdt-model.pkl`\n- Nr. of summation terms (for Lyapunov eq.): 50\n\n```bash\npython kdtdist.py -s /tmp/us-kdt-model.pkl -r /tmp/us-kdt-model.pkl -n 50\n````\n**Online template detection in videos**\n- coming soon!\n\n---\n```\nAuthor: Roland Kwitt\nE-Mail: roland.kwitt@kitware.com\nPersonal website: http://rkwitt.org\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkitwaremedical%2Fpydstk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkitwaremedical%2Fpydstk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkitwaremedical%2Fpydstk/lists"}