glyptic


Nameglyptic JSON
Version 0.1.2 PyPI version JSON
download
home_pageNone
SummaryDactylogram to intaglio for your carcanets.
upload_time2024-09-24 22:10:52
maintainerNone
docs_urlNone
authorNone
requires_python>=3.12
licenseNone
keywords fingerprint fingerprint enhancement image-to-image img2img jewelry engraving sdxl stable diffusion
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <!-- <p align="center"> -->
<!--   <img src="ttt.png" width="60%" alt="TTT-logo"> -->
<!-- </p> -->
<p align="center">
    <h1 align="center">GLYPTIC</h1>
</p>
<p align="center">
    <em>Engraving Fingerprints with Precision and Artistry</em>
</p>
<p align="center">
	<img src="https://img.shields.io/github/license/tariks/glyptic?style=default&logo=opensourceinitiative&logoColor=white&color=0080ff" alt="license">
	<img src="https://img.shields.io/github/last-commit/tariks/glyptic?style=default&logo=git&logoColor=white&color=0080ff" alt="last-commit">
	<img src="https://img.shields.io/github/languages/top/tariks/glyptic?style=default&color=0080ff" alt="repo-top-language">
	<img src="https://img.shields.io/github/languages/count/tariks/glyptic?style=default&color=0080ff" alt="repo-language-count">
<p align="center">
		<em>Built with:</em>
</p>
<p align="center">
	<img src="https://img.shields.io/badge/tqdm-FFC107.svg?style=default&logo=tqdm&logoColor=black" alt="tqdm">
	<img src="https://img.shields.io/badge/TensorFlow-FF6F00.svg?style=default&logo=TensorFlow&logoColor=white" alt="TensorFlow">
	<img src="https://img.shields.io/badge/Keras-D00000.svg?style=default&logo=Keras&logoColor=white" alt="Keras">
	<img src="https://img.shields.io/badge/SciPy-8CAAE6.svg?style=default&logo=SciPy&logoColor=white" alt="SciPy">
	<img src="https://img.shields.io/badge/Python-3776AB.svg?style=default&logo=Python&logoColor=white" alt="Python">
	<img src="https://img.shields.io/badge/AIOHTTP-2C5BB4.svg?style=default&logo=AIOHTTP&logoColor=white" alt="AIOHTTP">
</p>

<br>

#####  Table of Contents

- [ Overview](#-overview)
- [ Features](#-features)
- [ Repository Structure](#-repository-structure)
- [ Modules](#-modules)
- [ Getting Started](#-getting-started)
    - [ Prerequisites](#-prerequisites)
    - [ Installation](#-installation)
    - [ Usage](#-usage)
    - [ Tests](#-tests)
- [ Project Roadmap](#-project-roadmap)
- [ Contributing](#-contributing)
- [ License](#-license)
- [ Acknowledgments](#-acknowledgments)

---

##  Overview

Written with the jewelry industry in mind, glyptic leverages advanced image processing and generative AI techniques to prepare fingerprint images suitable for jewelry engraving. A two-step process starts by utilizing a pre-trained U-Net model to enhance and denoise raw dactylograms. The second step automates an SDXL-based workflow transforming enhanced images to high-resolution, stylized vector art in SVG format, ensuring compatibility and scalability. Glyptic includes a streamlined setup process that can be deployed on a cloud or local install, and can comfortably run on an M1 Macbook. By generating beautiful yet faithful outputs for even low-quality fingerprints, glyptic significantly benefits the jewelry engraving industry.

---

##  Features

|    |   Feature         | Description |
|----|-------------------|---------------------------------------------------------------|
| ⚙️  | **Architecture**  | Glyptic follows a modular architecture with a focus on image processing and machine learning, specifically for enhancing fingerprint images using a U-Net model, and image-to-image translation using ComfyUI, SDXL, and controlnet |
| 🔩 | **Code Quality**  | Glyptic follows a structured and organized style with clear separation of concerns, such as modular functions for specific tasks like setup, image enhancement, and image transformation. |
| 🔌 | **Integrations**  | Key integrations include ComfyUI, JuggernautXL, TensorFlow, PyTorch, and Hugging Face Hub, along with image processing libraries like OpenCV, scikit-image, and Pillow. |
| 🧩 | **Modularity**    | The codebase is highly modular, with distinct modules for different functionalities such as image enhancement, setup, and workflow management, promoting reusability. |
| ⚡️  | **Performance**   | Glyptic can both be scaled to run on high-end cloud servers | and run on local machines, with the ability to process large batches of images efficiently. End-to-end processing takes about one minute per image on an M1 macbook with 32GB of RAM. 
| 📦 | **Dependencies**  | The project relies on several key dependencies including TensorFlow, PyTorch, OpenCV, Pillow, and various other libraries for machine learning and image processing. |
| 🚀 | **Simplicity**   | Glyptic wraps up the entire process in a single command, providing a one-click solution out of the box. |

---

##  Repository Structure

```sh
└── glyptic/
    ├── pyproject.toml
    ├── README.md
    └── src
        ├── glyptic
        │   ├── __init__.py
        │   ├── enhance_fingerprints.py
        │   ├── enhance_utils.py
        │   ├── glyptic_workflow.py
        │   └── unet_weights.hdf5
        └── glyptic_setup
            ├── __init__.py
            └── glyptic_setup.py
```

---

##  Modules

<details closed><summary>src.glyptic</summary>

| File | Summary |
| --- | --- |
| [enhance_fingerprints.py](https://github.com/tariks/glyptic/blob/main/src/glyptic/enhance_fingerprints.py) | Enhances fingerprint images by utilizing a pre-trained U-Net model. Downloads necessary model weights if unavailable locally and processes images in batches, resizing and normalizing them before prediction. Outputs enhanced images to a specified directory, optimizing them for further analysis or use within the repository's broader fingerprint processing workflow. |
| [enhance_utils.py](https://github.com/tariks/glyptic/blob/main/src/glyptic/enhance_utils.py) | Defines the U-Net model used by enhance_fingerprints.py. |
| [unet_weights.hdf5](https://github.com/tariks/glyptic/blob/main/src/glyptic/unet_weights.hdf5) | Contain pre-trained weights for a U-Net model, facilitating efficient and accurate image processing tasks within the glyptic module. Integrates seamlessly into the workflow, enhancing the systems capability to handle complex image enhancement and fingerprint analysis operations. |
| [glyptic_workflow.py](https://github.com/tariks/glyptic/blob/main/src/glyptic/glyptic_workflow.py) | Facilitates the transformation of input images into high-resolution, stylized outputs using advanced machine learning models and image processing techniques. Integrates various conditioning and control mechanisms to enhance image quality and converts the final output to SVG format, ensuring compatibility and scalability within the repositorys architecture. |

</details>

<details closed><summary>src.glyptic_setup</summary>

| File | Summary |
| --- | --- |
| [glyptic_setup.py](https://github.com/tariks/glyptic/blob/main/src/glyptic_setup/glyptic_setup.py) | Facilitate the setup and configuration of the glyptic application by creating necessary directories, generating configuration files, and optionally downloading required model files. Enhance user experience by providing command-line arguments for custom data directories and automated setup processes. |

</details>

---

##  Getting Started

###  Prerequisites

**Python**: `version 3.12.6`

###  Installation

```sh
❯ pip install glyptic
```

Installing with pipx or similar will also work.

###  Setup

Download and symlink required models:
```sh
❯ glyptic_setup --config --download
```

```sh
❯ glyptic_setup --help
```
for full options.


###  Usage

```sh
❯ glpytic -i myinput/*.jpg 
```

---

##  Contributing

Contributions are welcome! Here are several ways you can contribute:

- **[Report Issues](https://github.com/tariks/glyptic/issues)**: Submit bugs found or log feature requests for the `glyptic` project.
- **[Submit Pull Requests](https://github.com/tariks/glyptic/blob/main/CONTRIBUTING.md)**: Review open PRs, and submit your own PRs.
- **[Join the Discussions](https://github.com/tariks/glyptic/discussions)**: Share your insights, provide feedback, or ask questions.

---

##  License

This project is protected under the [GNU General Public License v3.0](https://choosealicense.com/licenses/gpl-3.0/) License. For more details, refer to the [COPYING](https://github.com/tariks/glyptic/blob/main/COPYING) file.

---

##  Acknowledgments

- [CVxTz/fingerprint_denoising](https://github.com/CVxTz/fingerprint_denoising) for pre-trained model weights
- [Juggernaut-XI](https://huggingface.co/RunDiffusion/Juggernaut-XI-v11) by RunDiffusion
- [ControlNet++](https://huggingface.co/xinsir/controlnet-union-sdxl-1.0)
- [ComfyUI](https://github.com/comfyanonymous/ComfyUI)
- [ComfyScript](https://github.com/Chaoses-Ib/ComfyScript)

---

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "glyptic",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.12",
    "maintainer_email": null,
    "keywords": "fingerprint, fingerprint enhancement, image-to-image, img2img, jewelry engraving, sdxl, stable diffusion",
    "author": null,
    "author_email": "Tarik Salameh <tarik.salameh@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/49/6f/a4044e0f61f181ccaf62e63158dcc9e27369c841fa30f2235a949b07c578/glyptic-0.1.2.tar.gz",
    "platform": null,
    "description": "<!-- <p align=\"center\"> -->\n<!--   <img src=\"ttt.png\" width=\"60%\" alt=\"TTT-logo\"> -->\n<!-- </p> -->\n<p align=\"center\">\n    <h1 align=\"center\">GLYPTIC</h1>\n</p>\n<p align=\"center\">\n    <em>Engraving Fingerprints with Precision and Artistry</em>\n</p>\n<p align=\"center\">\n\t<img src=\"https://img.shields.io/github/license/tariks/glyptic?style=default&logo=opensourceinitiative&logoColor=white&color=0080ff\" alt=\"license\">\n\t<img src=\"https://img.shields.io/github/last-commit/tariks/glyptic?style=default&logo=git&logoColor=white&color=0080ff\" alt=\"last-commit\">\n\t<img src=\"https://img.shields.io/github/languages/top/tariks/glyptic?style=default&color=0080ff\" alt=\"repo-top-language\">\n\t<img src=\"https://img.shields.io/github/languages/count/tariks/glyptic?style=default&color=0080ff\" alt=\"repo-language-count\">\n<p align=\"center\">\n\t\t<em>Built with:</em>\n</p>\n<p align=\"center\">\n\t<img src=\"https://img.shields.io/badge/tqdm-FFC107.svg?style=default&logo=tqdm&logoColor=black\" alt=\"tqdm\">\n\t<img src=\"https://img.shields.io/badge/TensorFlow-FF6F00.svg?style=default&logo=TensorFlow&logoColor=white\" alt=\"TensorFlow\">\n\t<img src=\"https://img.shields.io/badge/Keras-D00000.svg?style=default&logo=Keras&logoColor=white\" alt=\"Keras\">\n\t<img src=\"https://img.shields.io/badge/SciPy-8CAAE6.svg?style=default&logo=SciPy&logoColor=white\" alt=\"SciPy\">\n\t<img src=\"https://img.shields.io/badge/Python-3776AB.svg?style=default&logo=Python&logoColor=white\" alt=\"Python\">\n\t<img src=\"https://img.shields.io/badge/AIOHTTP-2C5BB4.svg?style=default&logo=AIOHTTP&logoColor=white\" alt=\"AIOHTTP\">\n</p>\n\n<br>\n\n#####  Table of Contents\n\n- [ Overview](#-overview)\n- [ Features](#-features)\n- [ Repository Structure](#-repository-structure)\n- [ Modules](#-modules)\n- [ Getting Started](#-getting-started)\n    - [ Prerequisites](#-prerequisites)\n    - [ Installation](#-installation)\n    - [ Usage](#-usage)\n    - [ Tests](#-tests)\n- [ Project Roadmap](#-project-roadmap)\n- [ Contributing](#-contributing)\n- [ License](#-license)\n- [ Acknowledgments](#-acknowledgments)\n\n---\n\n##  Overview\n\nWritten with the jewelry industry in mind, glyptic leverages advanced image processing and generative AI techniques to prepare fingerprint images suitable for jewelry engraving. A two-step process starts by utilizing a pre-trained U-Net model to enhance and denoise raw dactylograms. The second step automates an SDXL-based workflow transforming enhanced images to high-resolution, stylized vector art in SVG format, ensuring compatibility and scalability. Glyptic includes a streamlined setup process that can be deployed on a cloud or local install, and can comfortably run on an M1 Macbook. By generating beautiful yet faithful outputs for even low-quality fingerprints, glyptic significantly benefits the jewelry engraving industry.\n\n---\n\n##  Features\n\n|    |   Feature         | Description |\n|----|-------------------|---------------------------------------------------------------|\n| \u2699\ufe0f  | **Architecture**  | Glyptic follows a modular architecture with a focus on image processing and machine learning, specifically for enhancing fingerprint images using a U-Net model, and image-to-image translation using ComfyUI, SDXL, and controlnet |\n| \ud83d\udd29 | **Code Quality**  | Glyptic follows a structured and organized style with clear separation of concerns, such as modular functions for specific tasks like setup, image enhancement, and image transformation. |\n| \ud83d\udd0c | **Integrations**  | Key integrations include ComfyUI, JuggernautXL, TensorFlow, PyTorch, and Hugging Face Hub, along with image processing libraries like OpenCV, scikit-image, and Pillow. |\n| \ud83e\udde9 | **Modularity**    | The codebase is highly modular, with distinct modules for different functionalities such as image enhancement, setup, and workflow management, promoting reusability. |\n| \u26a1\ufe0f  | **Performance**   | Glyptic can both be scaled to run on high-end cloud servers | and run on local machines, with the ability to process large batches of images efficiently. End-to-end processing takes about one minute per image on an M1 macbook with 32GB of RAM. \n| \ud83d\udce6 | **Dependencies**  | The project relies on several key dependencies including TensorFlow, PyTorch, OpenCV, Pillow, and various other libraries for machine learning and image processing. |\n| \ud83d\ude80 | **Simplicity**   | Glyptic wraps up the entire process in a single command, providing a one-click solution out of the box. |\n\n---\n\n##  Repository Structure\n\n```sh\n\u2514\u2500\u2500 glyptic/\n    \u251c\u2500\u2500 pyproject.toml\n    \u251c\u2500\u2500 README.md\n    \u2514\u2500\u2500 src\n        \u251c\u2500\u2500 glyptic\n        \u2502   \u251c\u2500\u2500 __init__.py\n        \u2502   \u251c\u2500\u2500 enhance_fingerprints.py\n        \u2502   \u251c\u2500\u2500 enhance_utils.py\n        \u2502   \u251c\u2500\u2500 glyptic_workflow.py\n        \u2502   \u2514\u2500\u2500 unet_weights.hdf5\n        \u2514\u2500\u2500 glyptic_setup\n            \u251c\u2500\u2500 __init__.py\n            \u2514\u2500\u2500 glyptic_setup.py\n```\n\n---\n\n##  Modules\n\n<details closed><summary>src.glyptic</summary>\n\n| File | Summary |\n| --- | --- |\n| [enhance_fingerprints.py](https://github.com/tariks/glyptic/blob/main/src/glyptic/enhance_fingerprints.py) | Enhances fingerprint images by utilizing a pre-trained U-Net model. Downloads necessary model weights if unavailable locally and processes images in batches, resizing and normalizing them before prediction. Outputs enhanced images to a specified directory, optimizing them for further analysis or use within the repository's broader fingerprint processing workflow. |\n| [enhance_utils.py](https://github.com/tariks/glyptic/blob/main/src/glyptic/enhance_utils.py) | Defines the U-Net model used by enhance_fingerprints.py. |\n| [unet_weights.hdf5](https://github.com/tariks/glyptic/blob/main/src/glyptic/unet_weights.hdf5) | Contain pre-trained weights for a U-Net model, facilitating efficient and accurate image processing tasks within the glyptic module. Integrates seamlessly into the workflow, enhancing the systems capability to handle complex image enhancement and fingerprint analysis operations. |\n| [glyptic_workflow.py](https://github.com/tariks/glyptic/blob/main/src/glyptic/glyptic_workflow.py) | Facilitates the transformation of input images into high-resolution, stylized outputs using advanced machine learning models and image processing techniques. Integrates various conditioning and control mechanisms to enhance image quality and converts the final output to SVG format, ensuring compatibility and scalability within the repositorys architecture. |\n\n</details>\n\n<details closed><summary>src.glyptic_setup</summary>\n\n| File | Summary |\n| --- | --- |\n| [glyptic_setup.py](https://github.com/tariks/glyptic/blob/main/src/glyptic_setup/glyptic_setup.py) | Facilitate the setup and configuration of the glyptic application by creating necessary directories, generating configuration files, and optionally downloading required model files. Enhance user experience by providing command-line arguments for custom data directories and automated setup processes. |\n\n</details>\n\n---\n\n##  Getting Started\n\n###  Prerequisites\n\n**Python**: `version 3.12.6`\n\n###  Installation\n\n```sh\n\u276f pip install glyptic\n```\n\nInstalling with pipx or similar will also work.\n\n###  Setup\n\nDownload and symlink required models:\n```sh\n\u276f glyptic_setup --config --download\n```\n\n```sh\n\u276f glyptic_setup --help\n```\nfor full options.\n\n\n###  Usage\n\n```sh\n\u276f glpytic -i myinput/*.jpg \n```\n\n---\n\n##  Contributing\n\nContributions are welcome! Here are several ways you can contribute:\n\n- **[Report Issues](https://github.com/tariks/glyptic/issues)**: Submit bugs found or log feature requests for the `glyptic` project.\n- **[Submit Pull Requests](https://github.com/tariks/glyptic/blob/main/CONTRIBUTING.md)**: Review open PRs, and submit your own PRs.\n- **[Join the Discussions](https://github.com/tariks/glyptic/discussions)**: Share your insights, provide feedback, or ask questions.\n\n---\n\n##  License\n\nThis project is protected under the [GNU General Public License v3.0](https://choosealicense.com/licenses/gpl-3.0/) License. For more details, refer to the [COPYING](https://github.com/tariks/glyptic/blob/main/COPYING) file.\n\n---\n\n##  Acknowledgments\n\n- [CVxTz/fingerprint_denoising](https://github.com/CVxTz/fingerprint_denoising) for pre-trained model weights\n- [Juggernaut-XI](https://huggingface.co/RunDiffusion/Juggernaut-XI-v11) by RunDiffusion\n- [ControlNet++](https://huggingface.co/xinsir/controlnet-union-sdxl-1.0)\n- [ComfyUI](https://github.com/comfyanonymous/ComfyUI)\n- [ComfyScript](https://github.com/Chaoses-Ib/ComfyScript)\n\n---\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Dactylogram to intaglio for your carcanets.",
    "version": "0.1.2",
    "project_urls": {
        "Repository": "https://github.com/tariks/glyptic.git"
    },
    "split_keywords": [
        "fingerprint",
        " fingerprint enhancement",
        " image-to-image",
        " img2img",
        " jewelry engraving",
        " sdxl",
        " stable diffusion"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ac30409e5d70b11e25cc5c65ba6436a612b0271813c75d60db56056e5f78b0b1",
                "md5": "c549a4a2eb66bc0751757df6595ff8d0",
                "sha256": "c332b2359e792c7caef119100adf37b64b43a8d522b4f4a1d1e758e48c8ea9dc"
            },
            "downloads": -1,
            "filename": "glyptic-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c549a4a2eb66bc0751757df6595ff8d0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.12",
            "size": 97458231,
            "upload_time": "2024-09-24T22:10:17",
            "upload_time_iso_8601": "2024-09-24T22:10:17.047829Z",
            "url": "https://files.pythonhosted.org/packages/ac/30/409e5d70b11e25cc5c65ba6436a612b0271813c75d60db56056e5f78b0b1/glyptic-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "496fa4044e0f61f181ccaf62e63158dcc9e27369c841fa30f2235a949b07c578",
                "md5": "da2afdbe445d04c89af2723c0f3c4a23",
                "sha256": "a0f250d6a25455986847630592fcecd31bcb32554857620fad308031f680197e"
            },
            "downloads": -1,
            "filename": "glyptic-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "da2afdbe445d04c89af2723c0f3c4a23",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12",
            "size": 97247939,
            "upload_time": "2024-09-24T22:10:52",
            "upload_time_iso_8601": "2024-09-24T22:10:52.802641Z",
            "url": "https://files.pythonhosted.org/packages/49/6f/a4044e0f61f181ccaf62e63158dcc9e27369c841fa30f2235a949b07c578/glyptic-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-24 22:10:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tariks",
    "github_project": "glyptic",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "glyptic"
}
        
Elapsed time: 1.32151s