{"id":21715443,"url":"https://github.com/deepcharles/convmmp","last_synced_at":"2026-05-17T22:34:20.095Z","repository":{"id":264645417,"uuid":"892728164","full_name":"deepcharles/convmmp","owner":"deepcharles","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-17T14:23:38.000Z","size":660,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T19:38:47.602Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deepcharles.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-22T16:57:46.000Z","updated_at":"2024-11-25T14:03:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"8c113b83-01a9-4cf4-a048-adc99f78b5ff","html_url":"https://github.com/deepcharles/convmmp","commit_stats":null,"previous_names":["deepcharles/convmmp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/deepcharles/convmmp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepcharles%2Fconvmmp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepcharles%2Fconvmmp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepcharles%2Fconvmmp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepcharles%2Fconvmmp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deepcharles","download_url":"https://codeload.github.com/deepcharles/convmmp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepcharles%2Fconvmmp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33157586,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"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-26T00:44:48.829Z","updated_at":"2026-05-17T22:34:20.086Z","avatar_url":"https://github.com/deepcharles.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Convolutional Sparse Coding with Multipath Orthogonal Matching Pursuit\n\nPython implementation of the algorithm described in (Gomes et al., 2024):\n\n- Gomes, Y., Truong, C., Saut, J.-P., Hafid, F., Prieur, P., \u0026 Oudre, L. (2025). Convolutional Sparse Coding with Multipath Orthogonal Matching Pursuit. Proceedings of the IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP).\n\nA **codeless graphical interface** is available here: [https://convmmp.streamlit.app/](https://convmmp.streamlit.app/)\n\n\n## Install\nTo install the Python package, run in a terminal:\n\n```bash\npython -m pip install git+https://github.com/deepcharles/convmmp\n```\n\n## Usage\n\nHere is a code snippet to illustrate our algorithm on sample data (see the `example` folder).\n\n```python\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom mpcsc import multipathcsc  # our library\n```\n\n#### Load data\n\n```python\ndata = np.load(\"example_data.npz\")\nsignal = data[\"signal\"]\ndictionary = data[\"dictionary\"]\n\nprint(f\"{signal.shape = } (n_samples, n_dims)\")\nprint(f\"{dictionary.shape = } (n_atoms, n_samples_atom, n_dims)\")\n```\n\n    signal.shape = (2000, 1) (n_samples, n_dims)\n    dictionary.shape = (143, 512, 1) (n_atoms, n_samples_atom, n_dims)\n\n#### Convolution sparse coding with multipath\n\n```python\n# This line is long to execute the first time, because code is compiled.\napprox, time_idxs, atom_idxs, vals, path = multipathcsc(signal=signal, dictionary=dictionary, n_atoms_to_find=3, n_paths=5)\nprint(f\"The best solution was obtained with path {path}.\")\n```\n\n    The best solution was obtained with path [1 0 0].\n\n-   `approx` contains the best approximation of `signal`.\n-   `time_idxs` contains the time indexes of the selected atoms.\n-   `atom_idxs` contains the indexes of the selected atoms.\n-   `vals` contains the multiplicative factors to scale the atoms (which\n    have unit norm).\n-   `path` is the path of the best solution.\n\n```python\nfig, ax = plt.subplots(figsize=(10, 4))\nax.plot(signal, label=\"Original\")\nax.plot(approx, label=\"Smoothed\")\nplt.legend()\nax.set_xmargin(0)\n```\n\n![](./static/approx.png)\n\n#### Decomposition\n\n```python\nfig, ax = plt.subplots(figsize=(10, 4))\n# ax.plot(signal, label=\"Original\")\nax.set_xmargin(0)\nn_samples_atom = dictionary.shape[1]\nfor k_atom in range(time_idxs.size):\n    approx_single_atom = np.zeros_like(signal)\n    start = time_idxs[k_atom]\n    end = start + n_samples_atom\n    atom = dictionary[atom_idxs[k_atom]]\n    val = vals[k_atom]\n    approx_single_atom[start:end] = val * atom\n    ax.plot(approx_single_atom, label=f\"Atom {k_atom+1}\")\nplt.legend()\n```\n\n![](./static/approx_single_atom.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepcharles%2Fconvmmp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepcharles%2Fconvmmp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepcharles%2Fconvmmp/lists"}