{"id":37083418,"url":"https://github.com/algocodes/ldp_layer","last_synced_at":"2026-01-14T10:10:39.801Z","repository":{"id":204036877,"uuid":"710951014","full_name":"algocodes/ldp_layer","owner":"algocodes","description":"Local Derivative Pattern as a layer in deep learning models","archived":false,"fork":false,"pushed_at":"2023-10-28T20:02:38.000Z","size":1257,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-23T07:55:20.329Z","etag":null,"topics":["convolutional-neural-networks","custom-layer","deep-learning","face-recognition","feature-extraction","localderivativepattern","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/algocodes.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}},"created_at":"2023-10-27T19:56:00.000Z","updated_at":"2023-11-12T02:03:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"4fcb1a30-96d4-40a1-8f4a-bede472b862d","html_url":"https://github.com/algocodes/ldp_layer","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"46b35de89e9422f6c6aa833a1c91979cc478026d"},"previous_names":["algocodes/ldp_layer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/algocodes/ldp_layer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algocodes%2Fldp_layer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algocodes%2Fldp_layer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algocodes%2Fldp_layer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algocodes%2Fldp_layer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/algocodes","download_url":"https://codeload.github.com/algocodes/ldp_layer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algocodes%2Fldp_layer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28416637,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:38:59.149Z","status":"ssl_error","status_checked_at":"2026-01-14T08:38:43.588Z","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":["convolutional-neural-networks","custom-layer","deep-learning","face-recognition","feature-extraction","localderivativepattern","tensorflow"],"created_at":"2026-01-14T10:10:37.412Z","updated_at":"2026-01-14T10:10:39.780Z","avatar_url":"https://github.com/algocodes.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A new deep learning layer using local derivative patterns \n\nThis repository contains the Local Derivative Patterns as a Deep Learning layer implemented in the paper. The example on LFW - Labeled Faces in the Wild dataset compares a model with LDP layers and a baseline CNN model. \n\nLDP layer can be used from the source or can be installed as a package using the project:\n\n            pip install tflocalpattern\n\n[Kaggle] (https://www.kaggle.com/code/devrimakgn/a-dl-model-with-ldp-layers-face-recognition)\n\n## Example evaluation on LFW - Labeled Faces in the Wild dataset: ldp_test.py\n\n###  Training results:\n![alt text](images/hist_train.png)\n###  Validation results:\n![alt text](images/hist_loss.png)\n\n###  Evaluation on test dataset:\n  model_ldp - test accuracies for example runs:\n\n              0.9342 0.9473, 0.9429, 0.9298, 0.8991, 0.9078, 0.9342, 0.9254, 0.9122, 0.9166 \n\n  model_base - test accuracies for example runs:\n\n              0.9122, 0.9035, 0.9035, 0.8947, 0.9035, 0.9078, 0.9210, 0.8991, 0.9078, 0.9122\n\n\n## Example usages:\n### Separately:\n  x1 = LDP(mode='single', alpha='0')(x1)    \n  x2 = LDP(mode='single',alpha='45')(x2)    \n  x3 = LDP(mode='single',alpha='90')(x3)    \n  x4 = LDP(mode='single',alpha='135')(x4)   \n### Mean of LDP 0, LDP 45, LDP 90,and LDP 135:   \n  x = LDP(mode='mean')(x)   \n### Separate features:   \n  x = LDP(mode='multi')(x)    \n  \n## Processing Cifar10 dataset with LDP:\n### Replace Cifar10 with your dataset for processing in the example file cifar_text.py\n![alt text](images/cifar10_ldb.png)\n\n##  LDP 0 features:\n![alt text](images/ldp_0.png)\n##  LDP 45 features:\n![alt text](images/ldp_45.png)\n##  LDP 90 features:\n![alt text](images/ldp_90.png)\n##  LDP 135 features:\n![alt text](images/ldp_135.png)\n\n\nReference study:\n\n[Akgun, Devrim. \"TensorFlow based deep learning layer for Local Derivative Patterns.\" Software Impacts 14 (2022): 100452 https://doi.org/10.1016/j.simpa.2022.100452](https://www.sciencedirect.com/science/article/pii/S2665963822001361)\n\nSimilar studies:\n\nhttps://github.com/dwday/lbp_tensorflow_python\n\nhttps://github.com/dwday/lbp_pytorch_python-\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falgocodes%2Fldp_layer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falgocodes%2Fldp_layer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falgocodes%2Fldp_layer/lists"}