python - Problems understand preprocessing steps that turn images into the format of MNIST dataset -
i want make program turns given image format of mnist dataset, kind of exercise understand various preprocessing steps involved. description authors made on site: http://yann.lecun.com/exdb/mnist/ not entirely straightforward:
the original black , white (bilevel) images nist size normalized fit in 20x20 pixel box while preserving aspect ratio. resulting images contain grey levels result of anti-aliasing technique used normalization algorithm. images centered in 28x28 image computing center of mass of pixels, , translating image position point @ center of 28x28 field.
so original have normalize fit 20x20 box, , still preserving aspect ratio (i think mean aspect ratio of actual digit, not entire image). still don't know how this.
center of mass: have found online code this, don't think understand principle. here take on this: coordinate of each pixel vector origin point, each point multiply coordinate image intensity, sum everything, before dividing total intensity of image. may wrong :(
translating image position point @ center: maybe cook translation equation, or maybe use convolutional filter facilitate translation, find path leads center (dijikstra's shortest path ?).
all in all, think still need guidance on this. can explain these parts me ? thank much. think
Comments
Post a Comment