{"id":38951006,"url":"https://github.com/owalid/leaf-valley","last_synced_at":"2026-01-17T16:09:27.623Z","repository":{"id":59920579,"uuid":"463090904","full_name":"owalid/leaf-valley","owner":"owalid","description":"[ 🤖🌿 COMPUTER VISION ] Contain AI models and plants images processing. The programs aim to recognize from leaf pictures, the species and the disease if present.","archived":false,"fork":false,"pushed_at":"2023-01-30T21:48:40.000Z","size":41045,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-04-08T10:24:38.167Z","etag":null,"topics":["cnn-classification","cnn-keras","computer-vision","kubernetes","machine-learning","nuxt","segmentation"],"latest_commit_sha":null,"homepage":"https://leaf-valley.com","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/owalid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-24T09:46:58.000Z","updated_at":"2023-02-02T07:27:17.000Z","dependencies_parsed_at":"2023-02-16T12:00:38.193Z","dependency_job_id":null,"html_url":"https://github.com/owalid/leaf-valley","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/owalid/leaf-valley","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owalid%2Fleaf-valley","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owalid%2Fleaf-valley/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owalid%2Fleaf-valley/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owalid%2Fleaf-valley/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/owalid","download_url":"https://codeload.github.com/owalid/leaf-valley/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/owalid%2Fleaf-valley/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28511852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"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":["cnn-classification","cnn-keras","computer-vision","kubernetes","machine-learning","nuxt","segmentation"],"created_at":"2026-01-17T16:09:27.467Z","updated_at":"2026-01-17T16:09:27.613Z","avatar_url":"https://github.com/owalid.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg height=\"550px\" src=\"https://user-images.githubusercontent.com/28403617/191722630-fc384316-9f49-4d71-9808-9faab8e3335e.svg#gh-light-mode-only\"\u003e\n  \u003cimg height=\"550px\" src=\"https://user-images.githubusercontent.com/28403617/191722810-a8be931b-9194-4b62-8c95-cba972566d64.svg#gh-dark-mode-only\"\u003e\n\u003c/div\u003e\n\n[![wakatime](https://wakatime.com/badge/user/57a746b4-0744-4dc9-a0f3-61d9ea529bde/project/67735737-0382-471e-9fe6-ee5fa60f7536.svg)](https://wakatime.com/badge/user/57a746b4-0744-4dc9-a0f3-61d9ea529bde/project/67735737-0382-471e-9fe6-ee5fa60f7536)\n\n## [Report of our project](report.md)\n\n## Directories\n\n```\nanalysis/ -\u003e data analysis in jupiter notebook\napp/ -\u003e web part\n  api/\n  client/\ndata/ -\u003e Data sources\n  augmentation/ -\u003e Data augmented\n  no_augmentation/ -\u003e Data not augmented\n  models_saved/ -\u003e Models and weights saved\nmicroservices/\n  econome/ -\u003e Micro service which manage api instance (only for production)\npreprocess/ -\u003e scripts for preprocessing\nprocess/ -\u003e scripts for training (machine learning and deep learning)\nutilities/ -\u003e global utilities functions\n```\n\n## Setup and installation\n\nThis script installs the dependencies for the project and the [dataset](https://data.mendeley.com/datasets/tywbtsjrjv/1).\n\n```\n./setup.sh\n```\n\n## Preprocess dataset\n\n\nThis program allows you to preprocess the images, extract data and make a dataset in h5 format.\n\n```\npython preprocess/main.py -h\n\nusage: python preprocess/main.py [-h] [-a] [-rmbg] [-src SRC_DIRECTORY] [-wi] [-crop] [-nor] [-nortype NORMALIZE_TYPE] [-c CLASSIFICATION] [-n NUMBER_IMG] [-rt RESULT_TYPE] [-dst DESTINATION] [-f FEATURES] [-s SIZE] [-v]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -a, --augmented       Use directory augmented\n  -rmbg, --remove-bg    Remove background before preprocess\n  -src SRC_DIRECTORY, --src-directory SRC_DIRECTORY\n                        Directory source who can find images. default (data/{augmented})\n  -wi, --write-img      Write images (png) in the new directory\n  -crop, --crop-img     Remove padding around leaf\n  -nor, --normalize-img\n                        Normalize images, you can specify the normalization type with the option -nortype\n  -nortype NORMALIZE_TYPE, --normalize-type NORMALIZE_TYPE\n                        Normalize images features with cv.normalize (Default: NORM_MINMAX) \n                        Types: https://vovkos.github.io/doxyrest-showcase/opencv/sphinx_rtd_theme/enum_cv_NormTypes.html\n  -c CLASSIFICATION, --classification CLASSIFICATION\n                        Classification type: HEALTHY_NOT_HEALTHY, ONLY_HEALTHY, NOT_HEALTHY, ALL (default)\n  -n NUMBER_IMG, --number-img NUMBER_IMG\n                        Number of images to use per class to select maximum of all classes use -1. (default 1000)\n  -rt RESULT_TYPE, --result-type RESULT_TYPE\n                        Type of result image for DP: GRAY, GABOR, CANNY, RGB. (default: GRAY)\n  -dst DESTINATION, --destination DESTINATION\n                        Path to save the data. (default: data/preprocess)\n  -f FEATURES, --features FEATURES\n                        Features to extract separate by \",\"\n                        Example: -f=graycoprops,lpb_histogram,hue_moment\n                        List of features:\n                           - For DP: rgb,gray,canny,gabor,lab,hsv\n                           - For ML: graycoprops,lpb_histogram,hue_moment,haralick,histogram_hsv,histogram_lab,pyfeats\n  -s SIZE, --size SIZE  Size of images. (default 256x256)\n  -v, --verbose         Verbose\n```\n\n## Image augmentation\n\n\nThis program allows you to augment the images, and output this augmented images in the new directory.\n\n\n```\npython preprocess/image_augmentation.py -h\n\nusage: python preprocess/image_augmentation.py [-h] [-src SRC_DIRECTORY] [-dst DST_DIRECTORY] [-ncls NUMBER_IMG_BY_CLASS] [-naug NUMBER_IMG_AUGMENTATION] [-dup] [-v]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -src SRC_DIRECTORY, --src-directory SRC_DIRECTORY\n                        Source of the directory where the images to augment are located. default (data/no_augmentation)\n  -dst DST_DIRECTORY, --dst-directory DST_DIRECTORY\n                        Source of the directory where the images to augment will be stored. default (data/tmp)\n  -ncls NUMBER_IMG_BY_CLASS, --number-img-by-class NUMBER_IMG_BY_CLASS\n                        Number of images to use per class to select maximum of all classes use -1. (default -1)\n  -naug NUMBER_IMG_AUGMENTATION, --number-img-augmentation NUMBER_IMG_AUGMENTATION\n                        Total number of augmented images, including original images. (default 3000)\n  -dup, --remove-duplicate\n                        Remove duplicate images created by the augmentaion process\n  -v, --verbose         Verbose\n```\n\n## Deep Learning process\n\n\nThis program allows to train a deep learning model with the data preprocessed\n\n\n```\npython process/deep_learning/main.py -h\n\nusage: process/deep_learning/main.py [-h] [-p PATH_DATASET] [-lt] [-es] [-b BATCH_SIZE] [-lr LEARNING_RATE] [-opt OPTIMIZER] [-e EPOCHS] [-m MODELS] [-s] [-dst-l DEST_LOGS] [-dst-m DEST_MODELS] [-v]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -p PATH_DATASET, --path-dataset PATH_DATASET\n                        Path of your dataset (h5 file)\n  -lt, --launch-tensorboard\n                        Launch tensorboard after fitting\n  -es, --early-stop     Early stop after fitting\n  -b BATCH_SIZE, --batch-size BATCH_SIZE\n                        Batch size\n  -lr LEARNING_RATE, --learning-rate LEARNING_RATE\n                        Learning rate (default 0.001)\n  -opt OPTIMIZER, --optimizer OPTIMIZER\n                        Optimizer (default adam). Available: dict_keys(['ADAM', 'RMSPROP', 'SGD', 'ADADELTA', 'NADAM'])\n  -e EPOCHS, --epochs EPOCHS\n                        Epoch\n  -m MODELS, --models MODELS\n                        Select model(s), if grid search is enabled, you can select multiple models separate by \",\". example -m=vgg19,resnet50. By default is select all models.\n                        Models availables:\n                        VGG16,VGG16_PRETRAINED,VGG19,VGG19_PRETRAINED,RESNET50,RESNET50_PRETRAINED,CONVNEXTTINY,CONVNEXTTINY_PRETRAINED,CONVNEXTSMALL,CONVNEXTSMALL_PRETRAINED,CONVNEXTBASE,CONVNEXTBASE_PRETRAINED,CONVNEXTLARGE,CONVNEXTLARGE_PRETRAINED,RESNET50V2,RESNET50V2_PRETRAINED,INCEPTIONRESNETV2,INCEPTIONRESNETV2_PRETRAINED,INCEPTIONV3,INCEPTIONV3_PRETRAINED,EFFICIENTNETB0,EFFICIENTNETB0_PRETRAINED,EFFICIENTNETB7,EFFICIENTNETB7_PRETRAINED,XCEPTION,XCEPTION_PRETRAINED,CLASSIC_CNN,ALEXNET,LAB_PROCESS,LAB_INCEPTIONV3_PROCESS,HSV_PROCESS,GOOGLE/VIT-BASE-PATCH16,GOOGLE/VIT-BASE-PATCH32,GOOGLE/VIT-LARGE-PATCH16,GOOGLE/VIT-LARGE-PATCH32,FACEBOOK/CONVNEXT-BASE,FACEBOOK/CONVNEXT-LARGE,FACEBOOK/CONVNEXT-XLARGE.\n  -s, --save-model      Save model\n  -dst-l DEST_LOGS, --dest-logs DEST_LOGS\n                        Destination for tensorboard logs. (default logs/tensorboard)\n  -dst-m DEST_MODELS, --dest-models DEST_MODELS\n                        Destination for model if save model is enabled\n  -v, --verbose         Verbose\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cstrong\u003eDeep learning models availables:\u003c/strong\u003e\u003c/summary\u003e\n\u003cbr\u003e\n\u003ch6\u003eVGG\u003c/h6\u003e\n\n  - \u003csmall\u003eVGG16\u003c/small\u003e\n  - \u003csmall\u003eVGG19\u003c/small\u003e\n\u003ch6\u003eResNet\u003c/h6\u003e\n\n  - \u003csmall\u003eRESNET50\u003c/small\u003e\n\n\u003ch6\u003eConvnext\u003c/h6\u003e\n\n  - \u003csmall\u003eCONVNEXTTINY\u003c/small\u003e\n  - \u003csmall\u003eCONVNEXTSMALL\u003c/small\u003e\n  - \u003csmall\u003eCONVNEXTBASE\u003c/small\u003e\n  - \u003csmall\u003eCONVNEXTLARGE\u003c/small\u003e\n\n\u003ch6\u003eResNet \u0026 Inception \u0026 Xception\u003c/h6\u003e\n\n  - \u003csmall\u003eRESNET50V2\u003c/small\u003e\n  - \u003csmall\u003eINCEPTIONRESNETV2\u003c/small\u003e\n  - \u003csmall\u003eINCEPTIONV3\u003c/small\u003e\n  - \u003csmall\u003eXCEPTION\u003c/small\u003e\n\n\u003ch6\u003eEfficientNet\u003c/h6\u003e\n\n  - \u003csmall\u003eEFFICIENTNETB0\u003c/small\u003e\n  - \u003csmall\u003eEFFICIENTNETB7\u003c/small\u003e\n\n\u003ch6\u003eTransformers\u003c/h6\u003e\n\n  - \u003csmall\u003eGOOGLE/VIT-BASE-PATCH16\u003c/small\u003e\n  - \u003csmall\u003eGOOGLE/VIT-BASE-PATCH32\u003c/small\u003e\n  - \u003csmall\u003eGOOGLE/VIT-LARGE-PATCH16\u003c/small\u003e\n  - \u003csmall\u003eGOOGLE/VIT-LARGE-PATCH32\u003c/small\u003e\n  - \u003csmall\u003eFACEBOOK/CONVNEXT-BASE\u003c/small\u003e\n  - \u003csmall\u003eFACEBOOK/CONVNEXT-LARGE\u003c/small\u003e\n  - \u003csmall\u003eFACEBOOK/CONVNEXT-XLARGE\u003c/small\u003e\n\n\n\u003ch6\u003eHomemade models\u003c/h6\u003e\n\n  - \u003csmall\u003eCLASSIC_CNN\u003c/small\u003e\n  - \u003csmall\u003eALEXNET\u003c/small\u003e\n  - \u003csmall\u003eLAB_PROCESS\u003c/small\u003e\n  - \u003csmall\u003eLAB_INCEPTIONV3_PROCESS\u003c/small\u003e\n  - \u003csmall\u003eHSV_PROCESS\u003c/small\u003e\n\u003c/details\u003e\n\n\n## ML CLassification process\n\nThis program allows you to train a ML classification models with the data preprocessed\n\n```\npython process/ml_classification/main.py -h\n\nusage: main.py [-h] [-cs CLASSIFICATION_STEP] -f FILENAME [-dst PROCESS_OUTPUT] [-sd] [-th THRESHOLD] [-nortype NORMALIZE_TYPE] [-cm CLASSIFICATION_MODELS] [-ct CLASSIFICATION_TYPES] [-sm]\n               [-dms DEST_MODELS_SAVED] [-v]\n\noptions:\n  -h, --help            show this help message and exit\n  -cs CLASSIFICATION_STEP, --classification-step CLASSIFICATION_STEP\n                        Classification step: LOAD_DATA, FIT_MODEL, PREDICT_MODEL, FIT_PREDICT_MODEL, ALL (default)\n  -f FILENAME, --filename FILENAME\n                        path and file name of the input data\n  -dst PROCESS_OUTPUT, --process-output PROCESS_OUTPUT\n                        Path to save or to get the preprocessed data, plots and reports. default: data/process/ml_classification\n  -sd, --save-data      Save options_datasets json file and converted data from h5 format to DataFrame one with flag train/test flag, default True\n  -th THRESHOLD, --threshold THRESHOLD\n                        Threshold used for the filter method to select features\n  -nortype NORMALIZE_TYPE, --normalize-type NORMALIZE_TYPE\n                        Normalize data (NORM_STANDARSCALER or NORM_MINMAX normalization) (Default: NORM_MINMAX)\n  -cm CLASSIFICATION_MODELS, --classification-models CLASSIFICATION_MODELS\n                        Classification models: XGC, ETC, RFC, ALL (default). Example -cm=RFC,ETC\n  -ct CLASSIFICATION_TYPES, --classification-types CLASSIFICATION_TYPES\n                        Classification type: PLANTS, HEALTHY, PLANTS_DESEASES classes, ALL (default)\n  -sm, --save-model     Save model, default True\n  -dms DEST_MODELS_SAVED, --dest-models-saved DEST_MODELS_SAVED\n                        Path to save models. default: data/models_saved\n  -v, --verbose         Verbose\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cstrong\u003eMachine learning models availables:\u003c/strong\u003e\u003c/summary\u003e\n\u003cbr\u003e\n\n- \u003csmall\u003eXgBoost\u003c/small\u003e\n- \u003csmall\u003eExtra tree classifier\u003c/small\u003e\n- \u003csmall\u003eRandom forest\u003c/small\u003e\n\u003c/details\u003e\n\n# Web part\n\n\u003cimg width=\"1579\" alt=\"Screenshot 2022-09-22 at 15 52 28\" src=\"https://user-images.githubusercontent.com/28403617/191765866-0fee2602-297a-4820-aceb-4749ff8cc9f6.png\"\u003e\n\n\u003cimg width=\"1576\" alt=\"Screenshot 2022-09-22 at 16 06 04\" src=\"https://user-images.githubusercontent.com/28403617/191768872-8ed075da-b133-419d-816f-386adc5b427c.png\"\u003e\n\n\u003cimg width=\"1576\" alt=\"Screenshot 2022-09-22 at 15 54 16\" src=\"https://user-images.githubusercontent.com/28403617/191766050-bc3dc10b-4d89-4562-8386-ed71ac820b89.png\"\u003e\n\n\n## With docker\n\n```\ncd app\ndocker compose up\n```\n\n## Manualy\n\n### Start api\n```\ncd app/api\npip install -r requirements.txt\npython main.py\n```\n\n### Start client\n```\ncd app/client/\nyarn\nyarn dev\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fowalid%2Fleaf-valley","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fowalid%2Fleaf-valley","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fowalid%2Fleaf-valley/lists"}