{"id":17464996,"url":"https://github.com/nima-kam/floral_classifier-dfl","last_synced_at":"2025-03-28T07:26:54.103Z","repository":{"id":180062357,"uuid":"664523391","full_name":"nima-kam/Floral_Classifier-DFL","owner":"nima-kam","description":" Floral Classifier using Discriminative Feature Learning","archived":false,"fork":false,"pushed_at":"2023-07-10T07:48:30.000Z","size":185,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-02T08:25:20.467Z","etag":null,"topics":["flowers102","metric-learning","representation-learning","siamese-network"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/nima-kam.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":"2023-07-10T07:07:35.000Z","updated_at":"2024-09-09T08:58:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"cfc99fdc-4125-4486-9f2f-4bbdfbe85768","html_url":"https://github.com/nima-kam/Floral_Classifier-DFL","commit_stats":null,"previous_names":["nima-kam/floral_classifier-dfl"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nima-kam%2FFloral_Classifier-DFL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nima-kam%2FFloral_Classifier-DFL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nima-kam%2FFloral_Classifier-DFL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nima-kam%2FFloral_Classifier-DFL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nima-kam","download_url":"https://codeload.github.com/nima-kam/Floral_Classifier-DFL/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245986959,"owners_count":20705311,"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":["flowers102","metric-learning","representation-learning","siamese-network"],"created_at":"2024-10-18T11:08:16.898Z","updated_at":"2025-03-28T07:26:54.077Z","avatar_url":"https://github.com/nima-kam.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Floral Classifier using Discriminative Feature Learning \n\nThe goal of this project is to train a ResNet-18 model to understand the differences and similarities of different types of flowers and generate a disentangled feature to classify pairs of flowers as a similar type or not. The project includes functions for data loading, transformation, training, validation, and optimization, as well as the definition of the ResNet-18 model, Center Loss module, and optimization parameters.\n\n## Dataset\nlink to dataset documents: https://www.robots.ox.ac.uk/~vgg/data/flowers/102/index.html\nThe dataset consists of multiple image files, categorized into 102 different classes of flowers.\n\n## Feature Extractor\nA pre-trained ResNet-18 model is used as the feature extractor to extract high-level features from the images.\n\n## Disentangled Feature Learning\nThe Center Loss technique is used to generate a disentangled feature representation of the flowers that captures the differences and similarities between them.\n\n## Pairwise Classification\nThe disentangled feature representation is used to classify pairs of flowers as similar type or not.\n\n![an image of a pair of flowers labed as same type](https://github.com/nima-kam/Floral_Classifier-DFL/blob/main/Images/flower_pair1.png)\n![pair](https://github.com/nima-kam/Floral_Classifier-DFL/blob/main/Images/flower_pair2.png)\n## Center Loss\nlink to complete implementation of center loss: https://github.com/KaiyangZhou/pytorch-center-loss\nThe **Center Loss** technique is used to improve the performance of the model. This involves calculating the distance between the features and the class centers and computing the loss based on the distance and the ground truth labels.\n\n## Code Overview\nClass Distribution Visualization\nThis section of code visualizes the distribution of the dataset across different classes, loads the paths of all images, and creates a pandas dataframe containing the image paths and corresponding labels.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnima-kam%2Ffloral_classifier-dfl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnima-kam%2Ffloral_classifier-dfl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnima-kam%2Ffloral_classifier-dfl/lists"}