This project is a web-based image classifier that uses a pre-trained Keras model to distinguish between human and animal faces. The application is built using Django, and it can be run both locally and within a Docker container.
The model is based on yegekucuk/classifier1 project on GitHub.
You can download the image from DockerHub and run the application in a Docker container. For this option you don't have to clone the repository on your local machine
- Docker installed on your machine.
-
Build the Docker image:
docker pull yegekucuk2/classifier
-
Run the Docker container:
docker run --name classifier -p 80:8000 yegekucuk2/classifier
-
Access the application by navigating to
http://127.0.0.1
in your web browser. -
You can stop and remove the application with the following command:
docker rm -f classifier
You can build the image on your own.
- Docker installed on your machine.
-
Clone the repository:
git clone https://github.com/yegekucuk/classifier1-on-web.git cd classifier1-on-web
-
Build the Docker image:
docker build -t classifierimage .
-
Run the Docker container:
docker --name classifier run -p 80:8000 classifierimage
-
Access the application by navigating to
http://127.0.0.1
in your web browser. -
You can stop and remove the application with the following command:
docker rm -f classifier
You can also run the application directly on your local machine.
- Python 3.x and Pip installed on your environment.
- Clone the repository:
git clone https://github.com/your-username/classifier1-on-web.git cd classifier1-on-web
- Create a virtual environment and activate it:
python3 -m venv env source env/bin/activate # On Windows use `env\\Scripts\\activate`
- Install the packages:
pip install -r requirements.txt
- Apply migrations and start the Django development server:
python manage.py migrate python manage.py runserver
- Access the application by navigating to
http://localhost:8000
in your web browser.
- classifier/: Django application handling image uploads and predictions.
- project/: Django project settings and configurations.
- kube/: Kubernetes deployment files.
- Dockerfile: Instructions to build the Docker image.
- Jenkinsfile: CI pipeline configuration.
- requirements.txt: Python dependencies required by the project.
- model.h5: Pre-trained Keras model used for image classification.
- Jenkins: For CI operations, Jenkins tool is used on Kubernetes cluster.
- ArgoCD: For CD operations, ArgoCD tool is used on Kubernetes cluster.
The pre-trained model is used. For the main repository of the model click here.
This project is licensed under the MIT License. See the LICENSE file for details.