Image classification API with a decoupled HTML / JS frontend and FastAPI / Docker backend.

GitHub - WebApp


The aldentefier app was created to test the combination of fast.ai and FastAPI for producing a quick proof of concept service. Using the familiar Google Cloud Run service for hosting the backend with a static API portal proved to be a useful setup, avoiding the long loading screen when the docker service needs to be cold started. The decoupling also means that, in a production setting, these services can be scaled independently. For example, if the prediction service is called from a number of different client applications.

The image classification model was developed while following practical deep learning for coders. Jeremy Howard and the team at fast.ai have produced some excellent, free courses on deep learning and AI ethics. The application first approach to teaching is a welcome alternative to teaching from fundamentals and they’ve been attracting a lot of positive attention for their efforts in democratising AI and for the accomplishments of their students. I highly encourage anyone new to deep learning, or looking to quickly produce a working application, to check out their page and freely available book.

FastAPI is a web framework designed specifically for building API services. It’s incredibly fast thanks to its asynchronous serving capability and robust due to its strongly enforced type safety. It even produces and serves interactive API docs in swagger and redoc formats right out of the box. Powered by Starlette and Pydantic, it’s remarkably quick while being simple and satisfying to develop with.

It should be noted that the model doesn’t do a fantastic job of classifying user submitted photos (this was not a priority for the project…) but it does make its guesses quickly and reliably!


aldentefier