Skip to content

Classify images by the time of the day - CLIP model, docker-compose, GitHub Actions

License

Notifications You must be signed in to change notification settings

shakibyzn/image-time-classifier-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Time Classifier App with FastAPI and Streamlit

This is an image classification app designed to determine the time of day using the CLIP model, specifically the ViT-B/32 variant from torchvision. Users can easily upload an image, and the app will classify it into one of the following time categories: morning, noon, afternoon, night, or sunrise or sunset. The app utilizes FastAPI for handling backend functionalities and Streamlit for a straightforward user interface. Docker and Docker Compose are employed for easy deployment and management of the application.

Requirements

  • Python 3.6 or higher
  • FastAPI
  • Streamlit
  • Torch
  • Pillow
  • Redis OM
  • Matplotlib
  • Requests

Installation

  1. Clone the repository:

    git clone https://github.com/shakibyzn/image-time-classifier-app.git
    
  2. Navigate to the project directory:

    cd image-time-classifier-app
    

Usage

docker compose up --build -d

Run unit tests

docker compose exec backend pytest

Continuous Integration

GitHub Actions is configured to automatically run unit tests on the backend service whenever changes are pushed to the repository. The GitHub Actions workflow is defined in the .github/workflows directory.

Demo

samples

License

This project is licensed under the MIT License.

About

Classify images by the time of the day - CLIP model, docker-compose, GitHub Actions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published