Project for MediaTek's digital social innovation competitions "Genius for home"
A backend service for detecting the percentage of dental plaque on teeth.
- Request:
[GET] /api/ping/
- Response:
{
"message": "Hi there, API is working~"
}
- Request:
[POST] /api/analysis/
key: image
value: png file
- Response:
{
"message": "The percentage of dental plaque on teeth: 43.08%",
"data": {
"teethRangePath": "teeth_range/2024-08-04_23-42-30/",
"teethRangeDetectPath": "teeth_range_detect/2024-08-04_23-42-30/"
}
}
- Request:
[GET] /api/analysis/teeth_range/2024-08-04_23-42-30/
- Response:
the png file of teeth_range
- Request:
[GET] /api/analysis/teeth_range_detect/2024-08-04_23-42-30/
- Response:
the png file of teeth_range_detect
Please ensure the weight files are stored in the project directory.
Download link of weight files:
https://github.com/YYinBigBang/AI-Dental-Health-APP/releases/tag/weight1.0
docker build -t ai_dental_health_app .
docker run -p 8000:8000 -e PORT=8000 ai_dental_health_app
After setting up the database service, create and apply migrations:
docker-compose run django python manage.py makemigrations
docker-compose run django python manage.py migrate
docker-compose run django python manage.py createsuperuser
docker-compose run --rm certbot certonly --webroot --webroot-path=/var/www/certbot -d your_domain_or_ip --email your_email@example.com --agree-tos --no-eff-email
docker-compose up -d
docker-compose up --build
docker-compose down
docker system prune -a --volumes
docker ps
docker exec -it [container name or ID] bash
docker stop $(docker ps -aq)
docker rm $(docker ps -aq)
docker rmi $(docker images -q)
1.Build a database for user management
2.Transfer file access functionality to model.py
3.Implement a new feature for API return code
returncode -> 0
API success.returncode -> 1
Teeth not detected.returncode -> 2
Dental plaque not detected.returncode -> 3
Invalid image format.returncode -> 4
API internal error.returncode -> 5
Unauthorized access.
4.Implement a new feature for JWT (API token)
5.Improve the teeth detection