Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tech-warriors-corporation/harvtech-vegetables-health-ai
The AI project to assess the health of vegetables for HarvTech.
https://github.com/tech-warriors-corporation/harvtech-vegetables-health-ai
agribusiness ai flask keras python tensorflow
Last synced: 5 days ago
JSON representation
The AI project to assess the health of vegetables for HarvTech.
- Host: GitHub
- URL: https://github.com/tech-warriors-corporation/harvtech-vegetables-health-ai
- Owner: tech-warriors-corporation
- License: cc0-1.0
- Created: 2024-02-22T23:38:57.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-08-05T23:27:19.000Z (3 months ago)
- Last Synced: 2024-08-07T00:19:02.119Z (3 months ago)
- Topics: agribusiness, ai, flask, keras, python, tensorflow
- Language: Python
- Homepage:
- Size: 72.6 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Vegetables Health
The AI project to assess the vegetables health.## Support vegetables:
- Bean;
- Potato;
- Tomato;
- Rice.## About models
We are using models from [Kaggle](https://www.kaggle.com).## Gemini API
You can get a Gemini API key in this [link](https://ai.google.dev/gemini-api/docs/api-key?hl=pt-br).## Environment setup
Create a `.env` file in the root folder with content:
```
CLOUD_STORAGE_URL_PREFIX=https://URL_TO_YOUR_STORAGE_DOMAIN/
FLASK_PORT=5001
GEMINI_API_KEY=YOUR_API_KEY_HERE
FLASK_ENV=production
```## Prepare
Download the [best_tomato_leaf_inceptionV3_256.h5](https://techwarriors-objectstorage-test.s3.us-south.cloud-object-storage.appdomain.cloud/best_tomato_leaf_inceptionV3_256.h5) and [best_rice_leaf.h5](https://techwarriors-objectstorage-test.s3.us-south.cloud-object-storage.appdomain.cloud/best_rice_leaf.h5), into the _constants/weights_ directory.## Install and download models
Use `pip install -U -r requirements.txt` to install dependencies.Use `./download_models.sh` to download the trained models
## Install certificates
If want to use self-certificates, run the next script to build them.Run `./generate_certificates.sh`
> NOTE: In production the cloud provider would set these on your behalf enabling HTTPS
## Start
Run `python3 app.py` to start project.The `https://API_URL:PORT/predict` should be used for the POST API calls
Following an example of the API body request
```
{
"model_type": "rice_leaf",
"content_url": "https://techwarriors-objectstorage-test.s3.us-south.cloud-object-storage.appdomain.cloud/brownspotDSC_0100.jpg"
}
```## Tests
Run the directory _tests_, if in [PyCharm](https://www.jetbrains.com/pycharm) .it will execute all files with application running.
Running in CLI, run the `pytest`command on the project directory.
> NOTE: Ensure to set the `PYTHONPATH` first to make pytest localize the `app`. In Linux OS try: `export PYTHONPATH=.`## Roadmap:
- [X] Unit tests;
- [X] Create a REST API to use this code;
- [X] Kaggle explains;
- [X] Tests describe how to execute;
- [X] Deploy project in VPS;
- [X] Validation URL from back-end with prefix in DNS of [cloud (Jorge)](https://cloud.ibm.com);
- [X] ChatGPT return with data structured;
- [X] Create all tests with different models;
- [ ] Search new tomato models in [Kaggle](https://www.kaggle.com);
- [X] Integrated responses with [ChatGPT](https://chat.openai.com);
- [X] Upload vegetable images in [cloud (Jorge)](https://cloud.ibm.com);
- [X] Configure CORS.