DentifyCare is a FastAPI-based API used to diagnose dental diseases based on uploaded images. This API uses a machine learning model trained to detect several categories of dental diseases.
Method: GET
This endpoint will return a message indicating that the API is running properly.
Response:
{
"message": "DENTIFYCARE"
}Method: POST
This endpoint receives image files from the user, processes the images, and returns a diagnosis of the dental disease along with its accuracy level.
Input:
file (type: multipart/form-data): The image to be predicted. Response:
{
"Diagnosis": "calculus",
"Accuracy": "85.62%"
}If an error occurs in processing the image or prediction, the response will return an error message:
{
"error": "Error description here"
}- FastAPI : A framework for building web applications with Python.
- Uvicorn : An ASGI server for running FastAPI applications.
- TensorFlowPP : A machine learning library for loading and consuming models.
- Pillow :A library for manipulating images.
- NumPy : A library for manipulating numeric arrays.
- Google Cloud Storage : Used to download models stored in cloud storage.
- Clone repositori:
git clone https://github.com/Dentifycare/Dentifycare-ML-API.git
cd Dentifycare-ML-API- Install dependencies:
pip install -r requirements.txt- Run the application: To run the application, you can use uvicorn:
uvicorn main:app --host 0.0.0.0 --port 8080The model used by this API is a machine learning model trained to detect various dental diseases. This model is stored in Google Cloud Storage with the file name modeldentifycare.keras.
This model can be downloaded to the server when the application starts, so it does not need to be called manually.
To run an application using Docker, you can build and run a container with the following command:
- Build Docker image:
docker build -t dentifycare-ml-api .- Run the Docker container:
docker run -d -p 8080:8080 dentifycare-ml-apiThe models used in this API can be downloaded via Google Drive: