{"id":36989790,"url":"https://github.com/bonfry/vessel_tree_identification","last_synced_at":"2026-01-13T23:31:33.225Z","repository":{"id":328944107,"uuid":"891426358","full_name":"bonfry/vessel_tree_identification","owner":"bonfry","description":"Biometric identification system using retinal vessel trees, featuring automated optic disc detection, extraction, and robust feature-based matching algorithms.","archived":false,"fork":false,"pushed_at":"2025-12-16T10:44:11.000Z","size":5059,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-19T23:53:27.252Z","etag":null,"topics":["computer-vision","healthcare-application","opencv","opencv-python"],"latest_commit_sha":null,"homepage":"","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/bonfry.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-20T10:09:27.000Z","updated_at":"2025-12-16T10:40:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/bonfry/vessel_tree_identification","commit_stats":null,"previous_names":["bonfry/vessel_tree_identification"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/bonfry/vessel_tree_identification","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonfry%2Fvessel_tree_identification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonfry%2Fvessel_tree_identification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonfry%2Fvessel_tree_identification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonfry%2Fvessel_tree_identification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bonfry","download_url":"https://codeload.github.com/bonfry/vessel_tree_identification/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonfry%2Fvessel_tree_identification/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28399504,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"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":["computer-vision","healthcare-application","opencv","opencv-python"],"created_at":"2026-01-13T23:31:32.511Z","updated_at":"2026-01-13T23:31:33.220Z","avatar_url":"https://github.com/bonfry.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vessel Tree Identification\n\n**Authors:** Simone Bonfrate\n**Institution:** Faculty of Computer Science (FIC), University of Coruna (UDC)\n\n## Overview\n\nThis project implements a computer vision system for retinal image matching based on the unique structure of retinal vessel trees. It addresses challenges in biometric identification such as variations in orientation, lighting, and noise. The system extracts the vessel tree from retinal images and performs feature-based matching to identify individuals.\n\n## Project Structure\n\n```\n.\n├── LICENSE\n├── README.md\n├── main.py                     # Main entry point of the application\n├── docs/\n│   ├── report.md               # Detailed project report\n│   └── images/                 # Images for documentation\n├── images/\n│   ├── ref_images/             # Reference retinal images\n│   └── test_images/            # Test retinal images\n└── libs/\n    ├── __init__.py\n    ├── preprocessing.py        # Image preprocessing (CLAHE, Gaussian Blur)\n    ├── detection_step.py       # Automatic Optic Disc Detection\n    ├── extraction_step.py      # Vessel Tree Extraction\n    ├── similarity_step.py      # Feature Matching (AKAZE) \u0026 Scoring\n    └── experiments_manager.py  # Experiment logging and artifact saving\n```\n\n## Methodology\n\nThe pipeline consists of three main stages:\n\n1.  **Preprocessing (`libs/preprocessing.py`)**\n    *   Images are enhanced using Contrast Limited Adaptive Histogram Equalization (CLAHE) to improve local contrast and Gaussian Blur to reduce noise.\n\n2.  **Automatic Optic Disc Detection (`libs/detection_step.py`)**\n    *   The system employs a **Brute-force approach** to automatically locate the optic disc.\n    *   It iterates through various combinations of:\n        *   Template Matching methods (`cv2.TM_CCORR`, `cv2.TM_SQDIFF`, `cv2.TM_CCOEFF`)\n        *   Template sizes\n        *   Template intensities\n    *   The best candidate is selected based on an intensity score, ensuring the brightest region (characteristic of the optic disc) is accurately identified.\n\n3.  **Vessel Tree Extraction (`libs/extraction_step.py`)**\n    *   The region of interest (ROI) around the detected optic disc is isolated.\n    *   Inverse thresholding is applied to separate the darker vessel structures.\n    *   Morphological erosion removes noise and artifacts, resulting in a clean vessel tree mask.\n\n4.  **Vessel Tree Matching (`libs/similarity_step.py`)**\n    *   **Feature Extraction:** The Accelerated KAZE (AKAZE) algorithm detects keypoints and generates binary descriptors.\n    *   **Matching:** Descriptors are matched using Brute-Force matching with Hamming distance.\n    *   **Verification:** RANSAC-based homography filters \"good matches\" (inliers).\n    *   **Scoring:** A similarity score (0 to 1) is calculated based on the ratio of inliers to total matches.\n\n## Installation\n\n1.  Clone the repository:\n    ```bash\n    git clone \u003crepository-url\u003e\n    cd vessel_tree_identification\n    ```\n\n2.  Install the required dependencies:\n    ```bash\n    pip install opencv-python numpy matplotlib pandas\n    ```\n\n## Usage\n\nTo run the identification pipeline and generate the similarity matrix:\n\n```bash\npython main.py\n```\n\nThe script will:\n1.  Load test and reference images from the `images/` directory.\n2.  Process each image to extract the vessel tree.\n3.  Compare every test image against every reference image.\n4.  Output a similarity matrix to the console and save results in the `experiments/` folder.\n\n## Results\n\nThe system achieves high accuracy in identifying matching vessel trees. Below is the similarity matrix generated from the latest automatic analysis:\n\n```\n\\          R074.pgm  R118.pgm  R142.pgm  R158.pgm  R191.pgm  R217.pgm\nR075.pgm   1.0       0.0       0.0       0.000000  0.000     0.0\nR119.pgm   0.0       1.0       0.0       0.000000  0.000     0.0\nR143.pgm   0.0       0.0       1.0       0.000000  0.000     0.0\nR159.pgm   0.0       0.0       0.0       0.916667  0.000     0.0\nR192.pgm   0.0       0.0       0.0       0.000000  0.875     0.0\nR218.pgm   0.0       0.0       0.0       0.000000  0.000     0.0\n```\n\n## References\n\n*   OpenCV Documentation: Histogram Equalization, AKAZE local feature matching, Smoothing Images.\n*   Towards Data Science: Vision Transformers.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbonfry%2Fvessel_tree_identification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbonfry%2Fvessel_tree_identification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbonfry%2Fvessel_tree_identification/lists"}