[HN Gopher] Show HN: Invertornot.com - API to enhance your image...
       ___________________________________________________________________
        
       Show HN: Invertornot.com - API to enhance your images in dark-mode
        
       Hi HN, I built (https://invertornot.com) it's an API that can
       predict whether an image will look good/bad while inverted. This is
       particularly useful for images in dark-mode as you can now safely
       invert them.  The conservative solution to adapt images for dark-
       mode consist in dimming the image, however there is a lot of images
       that can be inverted (graph for example). Using deep learning we
       can avoid heuristics and obtain a much more reliable solution.  The
       API uses an EfficientNet pre-trained model fine-tuned on a custom
       dataset (1.1k samples). EfficientNet was chosen as it was pre-
       trained and offered the best performance for its size.  The trained
       model is very small (16MB) which means you can easily run your own
       instance. This problem is very simple for deep learning as it's a
       simple binary classification.  For this project training the model
       wasn't the challenge as most of the time was spent on the
       construction of the dataset.  For the API I'm using FastAPI, Redis
       and ONNX Runtime to run the model. The API can be used by posting
       the images to the API, using URL and using SHA-1 for already
       processed images.  The API is free and open-sourced
       (http://github.com/mattismegevand/invertornot).
        
       Author : mattismegevand
       Score  : 46 points
       Date   : 2024-03-25 21:49 UTC (1 hours ago)
        
 (HTM) web link (invertornot.com)
 (TXT) w3m dump (invertornot.com)
        
       | alanbernstein wrote:
       | Neat, as a reader, I've absolutely wanted this exact behavior
       | many times. Do you have any examples of incorrectly classified
       | images? As you say, the model seems quite simple, but I wonder if
       | there are some pathological kinds of photographs that result in
       | inversion.
        
         | mattismegevand wrote:
         | Some graphs with lots of colors can be difficult for models to
         | handle. In these cases, the model often chooses not to flip the
         | graph to avoid making it hard to read, based on past problems
         | with similar graphs. The model generally does a good job at
         | deciding when to flip something. Although I haven't seen it
         | flip photos, it's possible that there are examples out there.
        
       | hansihe wrote:
       | This is really cool! Do you have some more example images
       | somewhere?
        
         | mattismegevand wrote:
         | Thank you, yes you can try it directly
         | (https://invertornot.com/docs) or you can either upload an
         | images or spam the button to get random images and see their
         | prediction.
        
       | SCUSKU wrote:
       | Very cool! Nice job! Out of curiosity, how much CPU/GPU/RAM
       | resources do you need to allocate to run something like this?
       | Like you mention you're using small models. For example, could
       | this run on a t2.micro on EC2? (1 vCPU + 1GB RAM)
        
         | mattismegevand wrote:
         | Thank you! Very little resources are needed to run it, gwern is
         | using the API and at first I was using a 6$ Droplet (exact same
         | specs as the t2.micro) and it was running well.
        
       ___________________________________________________________________
       (page generated 2024-03-25 23:00 UTC)