ZPĚTBACK

07Jak počítač vidíHow a computer sees

Modely jsme dosud krmili textem. Ale AI zvládá i obrázky, zvuk či video. Jak? Pro počítač je obrázek jen mřížka čísel — jasů jednotlivých pixelů. Tady uvidíš, jak z těch čísel malý filtr (konvoluce) vytáhne rysy jako hrany — což je základ toho, jak dnešní AI „vidí". So far we fed models text. But AI also handles images, sound and video. How? To a computer an image is just a grid of numbers — the brightness of each pixel. Here you'll see how a small filter (a convolution) pulls features like edges out of those numbers — the basis of how today's AI "sees".

Co a jak?What & how?

Co to jeWhat it is Pro počítač je obrázek jen mřížka čísel — jasů pixelů (0 = černá, 255 = bílá; barevný = tři čísla na pixel, R, G, B). Žádné „vidění", jen čísla.To a computer an image is just a grid of numbers — pixel brightness (0 = black, 255 = white; color = three numbers per pixel, R, G, B). No “seeing”, just numbers.

Co zkusitWhat to try Nakresli něco do levé mřížky (nebo zvol předlohu) a vyber filtr: malé okénko 3×3 (kernel) přejede obrázek a pro každý pixel spočítá vážený součet okolí. Výsledek vpravo zvýrazní určitý rys — hrany, rozmazání, zaostření.Draw something into the left grid (or pick a template) and choose a filter: a small 3×3 window (a kernel) sweeps the image and computes a weighted sum of each pixel’s neighborhood. The result on the right highlights a certain feature — edges, blur, sharpening.

Proč je to důležitéWhy it matters Navrstvením tisíců takových filtrů, které se síť sama naučí, vznikne konvoluční neuronová síť — neuronka z příkladu 6 pro obrázky. Multimodální modely pak obrázek převedou na stejné vektory jako slova (příklad 9), takže ho model „vidí" vedle textu.Stack thousands of such filters the network learns by itself and you get a convolutional neural network — the neural net from example 6, for images. Multimodal models then turn an image into the same vectors as words (example 9), so a model can “see” it alongside text.

1 obrázekimage 2 mřížka čísel (pixely)grid of numbers (pixels) 3 filtr (konvoluce)filter (convolution) 4 mapa rysůfeature map
vstup (nakresli sem)input (draw here)
filtr 3×3 (kernel)3×3 filter (kernel)
výsledek (mapa rysů)result (feature map)
Tip: zkus „hrany" na kruhu — filtr najde obrys. Kresli tažením myši.Tip: try "edges" on the circle — the filter finds the outline. Draw by dragging the mouse.
tak vidí obrázek počítač — jen čísla (jas pixelu 0–255)this is how a computer sees the image — just numbers (pixel brightness 0–255)
Jak AI „vidí" — a proč je obrázek jen číslaHow AI "sees" — and why an image is just numbers

Pro počítač není obrázek nic vizuálního — je to tabulka čísel. Aby z nich něco „pochopil", hledá v nich rysy: nejdřív jednoduché (hrany, skvrny), pak jejich kombinace (rohy, tvary), až nakonec celé objekty. A přesně k tomu slouží konvoluce — operace, kterou si tu vyzkoušíš. To a computer an image is nothing visual — it's a table of numbers. To "make sense" of them it looks for features: first simple ones (edges, blobs), then their combinations (corners, shapes), and finally whole objects. That's exactly what convolution is for — the operation you're trying here.

Obrázek = číslaAn image = numbers

Každý pixel je číslo (jas 0–255). Barevný obrázek má na pixel tři čísla (R, G, B). Stejně jako u textu (příklad 9) i tady AI nakonec počítá jen s čísly. Every pixel is a number (brightness 0–255). A color image has three per pixel (R, G, B). Just like with text (example 9), here too the AI ultimately computes with numbers only.

Konvoluce = hledání rysuConvolution = finding a feature

Malé okénko (kernel) klouže po obrázku a počítá vážený součet okolí. Podle vah najde hrany, rozmaže, zaostří… Každý filtr hledá jeden rys. A small window (a kernel) slides over the image and computes a weighted sum of the neighborhood. Depending on its weights it finds edges, blurs, sharpens… Each filter looks for one feature.

Vrstvy = konvoluční síťLayers = a convolutional net

Filtry se navrství: první najdou hrany, další z nich skládají tvary, další objekty. Hodnoty filtrů se síť naučí z dat — je to neuronka z příkladu 6 pro obrázky (CNN). Filters stack up: the first find edges, the next build shapes from them, the next objects. The filter values are learned from data — it's the neural net from example 6 for images (a CNN).

Multimodální modelyMultimodal models

Dnešní modely převedou obrázek na vektory stejně jako slova (příklad 9) a vloží je do téhož prostoru. Proto umí LLM „popsat fotku" nebo odpovídat na obrázek. Today's models turn an image into vectors just like words (example 9) and place them in the same space. That's why an LLM can "describe a photo" or answer about an image.

K čemu to jeWhat it's good for

Rozpoznávání objektů a obličejů, lékařské snímky, samořídící auta, čtení textu z fotky i generování obrázků — všechno stojí na téhle myšlence „obrázek → čísla → rysy". Object and face recognition, medical scans, self-driving cars, reading text from a photo, even generating images — all rest on this "image → numbers → features" idea.

Stejný princip jako jindeThe same principle as elsewhere

Vážený součet vstupů (jako u neuronu, příklad 5–6), naučené váhy, vrstvení. „Vidění" není kouzlo — je to táž matematika, jen nad mřížkou pixelů. A weighted sum of inputs (like a neuron, examples 5–6), learned weights, layering. "Seeing" is no magic — it's the same math, just over a grid of pixels.