{"id":19832030,"url":"https://github.com/danielmartensson/jfaces","last_synced_at":"2025-05-01T16:32:50.932Z","repository":{"id":120604409,"uuid":"264499579","full_name":"DanielMartensson/jFaces","owner":"DanielMartensson","description":"Use jFaces to predict unknown images by training a set of images","archived":false,"fork":false,"pushed_at":"2020-12-27T22:41:02.000Z","size":9014,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T15:25:54.609Z","etag":null,"topics":["eigenfaces","face-recognition","fisherfaces","image-recognition","imageclassification","java"],"latest_commit_sha":null,"homepage":"","language":"Java","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/DanielMartensson.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":"2020-05-16T18:21:25.000Z","updated_at":"2023-03-11T05:05:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"b81d7139-579d-4c95-9d5f-131992434bf7","html_url":"https://github.com/DanielMartensson/jFaces","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielMartensson%2FjFaces","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielMartensson%2FjFaces/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielMartensson%2FjFaces/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielMartensson%2FjFaces/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DanielMartensson","download_url":"https://codeload.github.com/DanielMartensson/jFaces/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251907050,"owners_count":21663207,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["eigenfaces","face-recognition","fisherfaces","image-recognition","imageclassification","java"],"created_at":"2024-11-12T11:36:05.344Z","updated_at":"2025-05-01T16:32:50.926Z","avatar_url":"https://github.com/DanielMartensson.png","language":"Java","readme":"# jFaces - What is that?\n\njFaces is simple Fisherfaces algorithm in 100% Java ☕ (No C/C++/Pyhton/Fortran/etc..). The purpose with this project is to offer a simple setup of an algorithm that can do image classification.\nFisherfaces is the best algorithm to use if you have a smal amout of data, as 10 pictures of 10 people where the pictrures have not the best resolution. \nYou don't need pictures, you can use normal data as well. \n\n## How do I use this software?\n\nBegin first to install at least OpenJDK 11. I have left OpenJDK 8 for a long time ago.\nCollect pictures of the same individual into one folder. Do the same for the rest of the individuals into their own folders.\nEvery folder are going to get a ID number beginning from 0 and counting up.\nIf you compare a unknown picture that belongs to one of these folders, then jFaces is going to give you the ID number of that unknown picture.\n\nStructure the folders as subject in this way. \n\n- Subject00\n  - SteveHappy.png\n  - SteveSad.png\n  - SteveAngry.png\n  - SteveMustach.png\n  - SteveGlasses.png\n  - etc...\n- Subject01\n  - BadAnna.png\n  - DirtyAnna.png\n  - CleanAnna.png\n  - SadAnna.png\n  - AnnaCrossEyed.png\n  - AnnaWithAHat.png\n  - etc...\n- Subject02\n  - HansDumb.png\n  - HansRedFace.png\n  - etc...\n- Subject03\n  - Jenny_Angry.png\n  - Jenny_Normal.png\n  - Jenny_with_hat.png\n  - Jenny_dark.png\n- SubjectXXXX\n  - etc...\n\nOpen your terminal and locate the \"jFaces.jar\" file. Call it as this:\n\n```\ndell@dell-Precision-M6400:~/Dokument/GitHub/jFaces$ java -jar jFaces.jar --help\njFaces - Image classifiction in Java. Made by Daniel Mårtensson\nCall jFaces.jar with: 'java -jar jFaces.jar' followed by the commands below\nExample for increasing the heap memory: 'java -Xmx1000M -jar jFaces.jar' for 1000 megabyte in heap memory\nCommand list:\n\t-f Path to the folder that contains subfolders with pictures\n\t-m Method which prediction or validation to use, followed by 'P1', 'P2', 'V1', 'V2' or 'V3'\n\t\tP1 = Prediction on random sample\n\t\tP2 = Prediction on selected sample, followed by sample number\n\t\tV1 = Cross validation on classes\n\t\tV2 = Cross validation on samples\n\t\tV3 = Test and train data validation, followed by value ration between 0 \u003c ratio \u003c 1\n\t-b Build model and save it, followed by path to the save location\n\t-l Load model, followed by path to the model location\n\t-k K-nearest value, followed by a positive integer k-value\nExamples:\n\tRandom prediction with k = 30: -f '/path/to/subfolers/with/pictures' -m P1 -k 30\n\tSelected sample 10 at prediction with k = 30: -f '/path/to/subfolers/with/pictures' -m P2 10 -k 30\n\tCross validation on classes with k = 20: -f '/path/to/subfolers/with/pictures' -m V1 -k 20\n\tCross validation on samples with k = 20: -f '/path/to/subfolers/with/pictures' -m V2 -k 20\n\tTest 30% and train 70% set validation with k = 10: -f '/path/to/subfolers/with/pictures' -m V3 0.7 -k 10\n\tBuild model: -f '/path/to/subfolers/with/pictures' -b '/path/to/model/location.ser'\n\tBuild model and do validation on samples: -f '/path/to/subfolers/with/pictures' -b '/path/to/model/location.ser' -m V2 -k 20\n\tLoad model and do validation on classes: -f '/path/to/subfolers/with/pictures' -l '/path/to/model/location.ser' -m V1 -k 20\ndell@dell-Precision-M6400:~/Dokument/GitHub/jFaces$ \n```\n\nThis project have a built in C-code generation if you want to apply this onto embedded systems.\nWhen you build a fisherfaces model with parameter `-b`, then you are going to recieve an example, model and the pictures you have collected, in C-code. \nThis C-code have the ability to measure how likely the pictures are identified. The pourpose with the Java version is just to build the model and validate it. \nThe C code is the practical implementation. \n\n## Status of the project\n\nThis project is 100% done. No errors. Just copy the code to your project if you want image classification in the easy way.\n\n## Tested on databases\n\n- Yale database: http://vision.ucsd.edu/content/yale-face-database\n- JAFFE database: https://zenodo.org/record/3451524#.XsKKkhZS_J8\n- MNIST database: http://yann.lecun.com/exdb/mnist/\n\n| Database     |  Validation | Comment | \n| ------------:|------------:|--------:|\n|  Yale        |  97%        | k = 4, Cross validation on samples   |\n|  JAFFE       |  98.6%      | k = 10, Cross validation on samples  |\n|  MNIST       |  90%        | k = 4, Test set validation  60% train and 40% test data |\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielmartensson%2Fjfaces","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielmartensson%2Fjfaces","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielmartensson%2Fjfaces/lists"}