NutriPix API is an API that was made based on the NutriPix mobile application. NutriPix is an interactive educational tool designed to help children learn about nutrition in a fun and engaging way. By using image classification technology, NutriPix can identify various fruits and vegetables and provide interesting facts and nutritional information about them.
- Image Classification: Identifies fruits and vegetables from images taken by the user. As of right now, it can identifies 6 types of fruits and vegetables which are: Apples, Bananas, Broccolis, Grapes, Mangoes, and Strawberries.
- User Authentication and Authorization: Uses token-based authentication using JSON Web Tokens (JWT).
Before you begin, ensure you have met the following requirements:
- Python 3.x, preferably 3.10
- PostgreSQL client, e.g. pgAdmin
- A modern web browser (for web-based applications)
- Clone the repository:
git clone https://github.com/dha-lang/Nutripix-API.git- Navigate to the project directory:
cd nutripix-api- Make a virtual environment and activate the virtual environment:
python -m venv .venv
.venv/Scripts/Activate.ps1- Install the required dependencies:
pip install -r requirements.txt-
Create the PostgreSQL database: You can use pgAdmin to make the PostgreSQL database.
-
Create and assign variables on the .env file: You can follow the .env.example file for guide.
-
Create static and images folder for temporary image storage:
From the nutripix-api directory:
mkdir static
cd static
mkdir imagesThe file structure now should look like this:
nutripix-api/
│
│ ── app
│ ── model
│ ── static/
│ └── images
.
.
.
- Start the uvicorn server:
uvicorn app.main:appOpen your web browser and navigate to 'http://127.0.0.1:8000/docs' to try the API.
Mediapipe and Mediapipe Model Maker for customized model.
- FastAPI
- PostgreSQL
For more detailed used technologies, see the requirements.txt file.
This project is licensed under the MIT License.