Skip to content

Is the pgml.digits dataset storing images in psql? #488

Answered by montanalow
MatsMoll asked this question in Q&A
Discussion options

You must be logged in to vote

In terms of image format, ML algos require images to be either 2D arrays for black and white or 3D arrays for color. The MNIST data is stored as an 8x8 pixel black and white image with 16 shades of gray, i.e. a Postgres SMALLINT[][] .

https://github.com/postgresml/postgresml/blob/master/pgml-extension/src/orm/dataset.rs#L371

You definitely can store images and other binary data in a database, but I think the question is should you? A CDN fronting something like an S3 bucket is a better way to store and serve image content for a web application, rather than directly out of a database. Here are a few reasons you should consider vertically sharding your binary data (image, audio, large text.…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by montanalow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy