{"id":18300481,"url":"https://github.com/comet-ml/keras-fruit-classifer","last_synced_at":"2025-04-05T13:36:11.154Z","repository":{"id":97138578,"uuid":"175082486","full_name":"comet-ml/keras-fruit-classifer","owner":"comet-ml","description":"Classifying fruits using a Keras multi-class image classification model and Google Open Images","archived":false,"fork":false,"pushed_at":"2019-05-07T18:24:33.000Z","size":1413,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-03T02:54:46.560Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/comet-ml.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-11T20:56:36.000Z","updated_at":"2024-12-15T16:45:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"73c813ed-345a-4dd2-b4df-3f04820c6111","html_url":"https://github.com/comet-ml/keras-fruit-classifer","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/comet-ml%2Fkeras-fruit-classifer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comet-ml%2Fkeras-fruit-classifer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comet-ml%2Fkeras-fruit-classifer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comet-ml%2Fkeras-fruit-classifer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/comet-ml","download_url":"https://codeload.github.com/comet-ml/keras-fruit-classifer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247342714,"owners_count":20923643,"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":[],"created_at":"2024-11-05T15:12:35.617Z","updated_at":"2025-04-05T13:36:11.146Z","avatar_url":"https://github.com/comet-ml.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# keras-fruit-classifer\n\nClassifying fruits using a Keras multi-class image classification model and Google Open Images. \n\n**See the accompanying blog post [here](TODO: insert link to blog post)**\n\n## Getting the data\n\nThis project uses the `quilt/open_fruit` [Quilt T4](https://github.com/quiltdata/t4) data package. This data package contains ~30,000 images of various fruits (`banana`, `melon`, etc; there are 12 classes overall) included the [Google Open Images](https://storage.googleapis.com/openimages/web/index.html) ontology (specifically, only images with bounding boxes).\n\nThe `initial-exploration.ipynb` and `build-dataset.ipynb` notebooks in the `notebooks/` subfolder walk through the process of exploring raw dataset assets and composing the Open Fruits dataset, respectively.\n\nYou can download the finished product yourself using the `t4` Python package:\n\n```python\nimport t4\n\n# download everything, including the raw images and raw metadata\nt4.Package.install('quilt/open_fruit', 's3://quilt-example', dest='./')\n\n# alternatively, download just the cropped images and formatted metadata\nopen_fruits = t4.Package.browse('quilt/open_fruit', 's3://quilt-example', dest='./')\nopen_fruits['training_data/X_meta.csv'].fetch('X_meta.csv')\nopen_fruits['images_cropped'].fetch('images_cropped/')\n```\n\n## Building the models\n\nThe model definition code is available in the form of `.py` and `.ipynb` files in this repository's `models/` and `notebooks/` folders, respectively.\n\nThere are two model architectures to choose from: **InceptionV3** and **VGG16**. For both models, we are using the pretrained networks (both trained on ImageNet) and finetuning the models on our new fruit classes. The training process, results, and experiment metadata for both models is tracked with [Comet.ml](https://www.comet.ml)\n\n```python\nfrom comet_ml import Experiment\nexperiment = Experiment(api_key=\"YOUR_API_KEY\",project=\"PROJECT_NAME\", workspace=\"WORKSPACE_NAME\")\n```\n\nTo reproduce the results, it's also helpful to have the exact environment details. You can retrieve the details from Comet.ml through the REST API. See the code here:\n\n```python\nPY_VERSION=$(python -c \"import comet_ml; print(comet_ml.API().get_experiment_system_details('01e427cedce145f8bc69f19ae9fb45bb')['python_version'])\")\n\nconda create -n my_test_env python=$PY_VERSION\nconda activate my_test_env\n\npython -c \"import comet_ml; print('\\n'.join(comet_ml.API().get_experiment_installed_packages('01e427cedce145f8bc69f19ae9fb45bb')))\" \u003e requirements.txt\npip install -r requirements.txt\n```\n\n\n## Getting the models\n\nTrained model artifacts are available for browsing via Comet.ml and for download via Quilt t4.\n\nTo browse the models generated for this demo in an interactive way [click here](https://www.comet.ml/ceceshao1/comet-quilt-example)\n\nTo bring the model artifacts to your local machine, download the `quit/open_fruit_models` package:\n\n```python\nimport t4\nt4.Package.install('quilt/open_fruit_models', 's3://quilt-example', dest='./')\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomet-ml%2Fkeras-fruit-classifer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomet-ml%2Fkeras-fruit-classifer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomet-ml%2Fkeras-fruit-classifer/lists"}