{"id":41260691,"url":"https://github.com/forieux/qmm","last_synced_at":"2026-01-23T01:58:46.452Z","repository":{"id":54659660,"uuid":"335935052","full_name":"forieux/qmm","owner":"forieux","description":"Python Quadratic Majorization-Minimization (MM) optimization algorithms of half-quadratic criteria. Inverses problems, image restoration, denoising, ...","archived":false,"fork":false,"pushed_at":"2025-04-10T09:43:24.000Z","size":816,"stargazers_count":17,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-11-30T16:30:20.599Z","etag":null,"topics":["data-processing","data-science","denoising","image-processing","inverse-problems","non-linear-optimization","nonlinear-optimization","optimization","optimization-algorithms","optimization-methods","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/forieux.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2021-02-04T11:36:20.000Z","updated_at":"2025-04-29T09:03:25.000Z","dependencies_parsed_at":"2024-07-12T23:14:57.829Z","dependency_job_id":"853445b8-5e99-4430-9a18-311ef032a672","html_url":"https://github.com/forieux/qmm","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/forieux/qmm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forieux%2Fqmm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forieux%2Fqmm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forieux%2Fqmm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forieux%2Fqmm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/forieux","download_url":"https://codeload.github.com/forieux/qmm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forieux%2Fqmm/sbom","scorecard":{"id":407003,"data":{"date":"2025-08-11","repo":{"name":"github.com/forieux/qmm","commit":"3d1452da7fd739cb0b8cf17a3b6123bb5187b790"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-6p56-wp2h-9hxr","Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T21:33:54.736Z","repository_id":54659660,"created_at":"2025-08-18T21:33:54.736Z","updated_at":"2025-08-18T21:33:54.736Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28677714,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T01:00:35.747Z","status":"ssl_error","status_checked_at":"2026-01-23T01:00:19.529Z","response_time":144,"last_error":"SSL_read: 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":["data-processing","data-science","denoising","image-processing","inverse-problems","non-linear-optimization","nonlinear-optimization","optimization","optimization-algorithms","optimization-methods","python"],"created_at":"2026-01-23T01:58:45.853Z","updated_at":"2026-01-23T01:58:46.444Z","avatar_url":"https://github.com/forieux.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Q-MM: A Python toolbox for Quadratic Majorization-Minimization\n==============================================================\n\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.6373070.svg)](https://doi.org/10.5281/zenodo.6373070)\n![licence](https://img.shields.io/github/license/forieux/qmm)\n![pypi](https://img.shields.io/pypi/v/qmm)\n![status](https://img.shields.io/pypi/status/qmm)\n![version](https://img.shields.io/pypi/pyversions/qmm)\n![maintained](https://img.shields.io/maintenance/yes/2024)\n[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)\n[![Documentation Status](https://readthedocs.org/projects/qmm/badge/?version=latest)](https://qmm.readthedocs.io/en/latest/?badge=latest)\n\n![image](./docs/qmm.png)\n\nQ-MM is a Python implementation of Majorize-Minimize Quadratic optimization\nalgorithms. Algorithms provided here come from\n\n    [1] C. Labat and J. Idier, “Convergence of Conjugate Gradient Methods with a\n    Closed-Form Stepsize Formula,” J Optim Theory Appl, p. 18, 2008.\n\nand\n\n    [2] E. Chouzenoux, J. Idier, and S. Moussaoui, “A Majorize–Minimize Strategy\n    for Subspace Optimization Applied to Image Restoration,” IEEE Trans. on\n    Image Process., vol. 20, no. 6, pp. 1517–1528, Jun. 2011, doi:\n    10.1109/TIP.2010.2103083.\n\nSee [documentation](https://qmm.readthedocs.io/en/stable/index.html) for more\nbackground. If you use this code, please cite the references above and a\ncitation of this toolbox will also be appreciated, see [below](#citation). You\ncan also click ⭐ on the repo.\n\nQuadratic Majorize-Minimize\n---------------------------\n\nThe Q-MM optimization algorithms compute the minimizer of objective\nfunction like\n\nJ(x) = ∑ₖ μₖ ψₖ(Vₖ·x - ωₖ)\n\nwhere x is the unknown vector, Vₖ a linear operator, ωₖ a fixed data, μₖ\na scalar, ψₖ(u) = ∑ᵢφₖ(uᵢ), and φₖ a function that must be\ndifferentiable, even, coercive, φ(√·) concave, and 0 \\\u003c φ\\'(u) / u \\\u003c\n+∞.\n\nThe optimization is done thanks to quadratic sugorate function. In\nparticular, no linesearch or sub-iteration is necessary, and close form\nformula for the step are used with guaranteed convergence.\n\nA classical example, like in the figure below that show an image\ndeconvolution problem, is the resolution of an inverse problem with the\nminimization of\n\nJ(x) = \\|\\|² + μ ψ(V·x)\n\nwhere H is a low-pass forward model, V a regularization operator that\napproximate gradient (kind of high-pass filter) and ψ an edge preserving\nfunction like Huber. The above objective is obtained with k ∈ {1, 2},\nψ₁(·) = \\|\\|², V₁ = H, ω₁ = y, and ω₂ = 0.\n\n![image](./docs/image.png)\n\nFeatures\n--------\n\n-   The `mmmg`, Majorize-Minimize Memory Gradient algorithm. See\n    documentation and \\[2\\] for details.\n-   The `mmcg`, Majorize-Minimize Conjugate Gradient algorithm. See\n    documentation and \\[1\\] for details.\n-   **No linesearch**: the step is obtained from a close form formula\n    without sub-iteration.\n-   **No conjugacy choice**: a conjugacy strategy is not necessary\n    thanks to the subspace nature of the algorithms. The `mmcg`\n    algorithm use a Polak-Ribière formula.\n-   Generic and flexible: there is no restriction on the number of\n    regularizer, their type, ..., as well as for data adequacy.\n-   Provided base class for objectives and losses allowing easy and fast\n    implementation.\n-   Just one file if you like quick and dirty installation, but\n    available with `pip`.\n-   Comes with examples of implemented linear operator.\n\nInstallation and documentation\n------------------------------\n\nQ-MM is essentially just one file `qmm.py`. We recommend using poetry\nfor installation\n\n``` {.sourceCode .sh}\npoetry add qmm\n```\n\nThe package can also be installed with pip. More options are described\nin the [documentation](https://qmm.readthedocs.io/en/stable/index.html).\n\nQ-MM only depends on `numpy` and Python 3.6.\n\nExample\n-------\n\nThe `demo.py` presents an example on image deconvolution. The first step\nis to implement the operators `V` and the adjoint `Vᵀ` as callable\n(function or methods). The user is in charge of these operators and\nthese callable must accept a unique Numpy array `x` and a unique return\nvalue\n([partial](https://docs.python.org/fr/3.9/library/functools.html#functools.partial)\nin the `functools` module in the standard library is usefull here).\nThere is no constraints on the shape, everything is vectorized\ninternally.\n\nAfter import of `qmm`, user must instantiate `Potential` objects that\nimplement `φ` and `Objective` objects that implement `μ ψ(V·x - ω)`\n\n``` {.sourceCode .python}\nimport qmm\nphi = qmm.Huber(delta=10)  # φ\n\ndata_adeq = qmm.QuadObjective(H, Ht, HtH, data=data)  # ||y - H·x||²\nprior = qmm.Objective(V, Vt, phi, hyper=0.01)  # μ ψ(V·x) = μ ∑ᵢ φ(vᵢᵗ·x)\n```\n\nThen you can run the algorithm\n\n``` {.sourceCode .python}\nres = qmm.mmmg([data_adeq, prior], init, max_iter=200)\n```\n\nwhere `[data_adeq, prior]`{.sourceCode} means that the two objective\nfunctions are summed. For more details, see\n[documentation](https://qmm.readthedocs.io/en/stable/index.html).\n\nContribute\n----------\n\n-   Source code: \u003chttps://github.com/forieux/qmm\u003e\n-   Issue tracker: \u003chttps://github.com/forieux/qmm/issues\u003e\n\nAuthor\n------\n\nIf you are having issues, please let us know\n\norieux AT l2s.centralesupelec.fr\n\nMore information about me [here](https://pro.orieux.fr). F. Orieux and\nR. Abirizk are affiliated to the Signal and Systems Laboratory\n[L2S](https://l2s.centralesupelec.fr/).\n\nCitation\n--------\n\nQ-MM has a DOI with Zenodo\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.6373069.svg)](https://doi.org/10.5281/zenodo.6373069).\nSpecific version can also be cited. Citation can be\n\n    François Orieux, \u0026 Ralph Abirizk. (2022). Q-MM: The Quadratic Majorize-Minimize\n    Python toolbox (v0.12.0). Zenodo. https://doi.org/10.5281/zenodo.6373070\n\nA example of bibtex is\n\n    @software{francois_orieux_2022_6373070,\n      author       = {François Orieux and Ralph Abirizk},\n      title        = {Q-MM: The Quadratic Majorize-Minimize Python toolbox},\n      month        = mar,\n      year         = 2022,\n      publisher    = {Zenodo},\n      version      = {0.12.0},\n      doi          = {10.5281/zenodo.6373069},\n      url          = {https://doi.org/10.5281/zenodo.6373069}\n    }\n\nAcknowledgement\n---------------\n\nAuthor would like to thanks [J.\nIdier](https://pagespersowp.ls2n.fr/jeromeidier/en/jerome-idier-3/), [S.\nMoussaoui](https://scholar.google.fr/citations?user=Vkr8yxkAAAAJ\u0026hl=fr)\nand [É. Chouzenoux](http://www-syscom.univ-mlv.fr/~chouzeno/). É.\nChouzenoux has also a Matlab package that implements 3MG for image\ndeconvolution that can be found on her\n[webpage](http://www-syscom.univ-mlv.fr/~chouzeno/Logiciel.html).\n\nLicense\n-------\n\nThe project is licensed under the GPLv3 license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforieux%2Fqmm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fforieux%2Fqmm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforieux%2Fqmm/lists"}