dwyl / image-classifier

πŸ–ΌοΈ Classify images and extract data from or describe their contents using machine learning
GNU General Public License v2.0
20 stars 3 forks source link

[PR] Deploying to `fly.io` #5

Closed LuchoTurtle closed 10 months ago

LuchoTurtle commented 11 months ago

closes #4

This should only be merged after #2

Deploys the app to fly.io (https://imgai.fly.dev/), creates a GH actions pipeline to automate the deployment and also adds a guide document.

The app is currently deployed with a lightweight ResNet-50 model (a few MB) on a Development machine. This is why it works. If I were to use a larger model like BLIP, I wager I'd run into memory issues. In fact, if I add a larger image, the LiveView crashes because of memory issues - which makes sense, it only has 250MB of RAM and 1GB of storage.

codecov[bot] commented 11 months ago

Codecov Report

Merging #5 (211d580) into main (888ddaf) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main        #5   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines           28        28           
=========================================
  Hits            28        28           
Files Coverage Ξ”
lib/app_web/live/page_live.ex 100.00% <100.00%> (ΓΈ)

:mega: Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

LuchoTurtle commented 11 months ago

This should be mergeable πŸ‘Œ

nelsonic commented 10 months ago

@LuchoTurtle the deployment files look good. πŸ‘Œ

When I tested it: https://imgai.fly.dev got internet timeout issues despite having a decent internet connection:

https://github.com/dwyl/image-classifier/assets/194400/59f41b8b-1051-4b1f-a0eb-3d682b91819b

The LiveView connection shouldn't block the image classification. πŸ’­

When it did "work", the following image:

cluttered-home

Was classified as a "Library":

image

In fairness, there are enough books in the image that this is an "OK" classification. πŸ’­

Could you bump the Model up to the biggest one available to maximise the chance of appropriate classification? Ref: https://github.com/dwyl/image-classifier/issues/6