<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: abijuru diana</title>
    <description>The latest articles on DEV Community by abijuru diana (@abijuru_diane).</description>
    <link>https://dev.to/abijuru_diane</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4151851%2Ffe0f902a-8bcc-43f5-94f7-e03aecce6931.jpg</url>
      <title>DEV Community: abijuru diana</title>
      <link>https://dev.to/abijuru_diane</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abijuru_diane"/>
    <language>en</language>
    <item>
      <title>VISION LANGUAGE MODEL</title>
      <dc:creator>abijuru diana</dc:creator>
      <pubDate>Sat, 24 Oct 2026 20:28:06 +0000</pubDate>
      <link>https://dev.to/abijuru_diane/vision-language-model-hfk</link>
      <guid>https://dev.to/abijuru_diane/vision-language-model-hfk</guid>
      <description>&lt;p&gt;&lt;strong&gt;VLM:&lt;/strong&gt;Vision Language Transformers, is an artifiacl intelligence that can process visual information, such as images, and language, such as text, and learn how they relate to each other.&lt;br&gt;
A VLM is an AI model designed to connect visual information, such as images, with language, such as captions, questions, and answers. Understanding how these models learn requires exploring their training data, their learning objectives, and the loss functions that guide their improvement.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Vision-Language model&lt;/strong&gt; can learn relationships between what it sees in an image and what people say about &lt;br&gt;
&lt;em&gt;for example:&lt;/em&gt; &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmegyf0cehkgnxtkm8l4j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmegyf0cehkgnxtkm8l4j.png" alt=" " width="521" height="291"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Input:&lt;/strong&gt; an image of dog with a ball&lt;br&gt;
&lt;strong&gt;Question:&lt;/strong&gt; what is happening&lt;br&gt;
&lt;strong&gt;Output:&lt;/strong&gt;a dog running on the grass after the ball.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  How does a VLM work?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Vision encoder:&lt;/strong&gt;Turns the image into numerical features,&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multimodal connection:&lt;/strong&gt;Helps the model combine visual and language information, &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Language model:&lt;/strong&gt;Can use that information to answer questions or describe the image.&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fupzxzey8vnu2v37hyq0d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fupzxzey8vnu2v37hyq0d.png" alt=" " width="677" height="390"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Types of vision language models&lt;/strong&gt;&lt;br&gt;
Vision language models can be categorised based on how they process and connect visual and textual information.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Vision-to-text Models&lt;/strong&gt;
this models focus on generationg textual descriptions or answering questions based on visual inputs.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Text-to-Vision Models&lt;/strong&gt; &lt;br&gt;
text to vision models generate or modify visual content based on textual descriptions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cross-modal retrieval Models&lt;/strong&gt;&lt;br&gt;
Cross-modal retrieval models use one type of data, such as text or images to search and retrieve information from another modality.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Image search using text&lt;/strong&gt;&lt;br&gt;
alows users to retrieve relevant images using textual queries.&lt;br&gt;
Query: mountaiin view&lt;br&gt;
Output:images of mountain&lt;br&gt;
&lt;strong&gt;Text search using images&lt;/strong&gt;&lt;br&gt;
uses an imge as input to retrieve related text, descriptions or documents .&lt;br&gt;
Input:Image of a car &lt;br&gt;
Output: different descriptions about the car  &lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>machinelearning</category>
      <category>vlm</category>
    </item>
    <item>
      <title>LET'S LEARN COMPUTER VISION</title>
      <dc:creator>abijuru diana</dc:creator>
      <pubDate>Tue, 13 Oct 2026 11:32:55 +0000</pubDate>
      <link>https://dev.to/abijuru_diane/lets-learn-computer-vision-3cg</link>
      <guid>https://dev.to/abijuru_diane/lets-learn-computer-vision-3cg</guid>
      <description>&lt;p&gt;&lt;strong&gt;KEY NOTE:&lt;/strong&gt;A person can just once see an image or a picture and at a       moment be able to describe where, which and what is in that picture.&lt;/p&gt;

&lt;p&gt;---&amp;gt;You can probably ask youself how Machines just get to see an image and be able to describe all features about it right away!!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This is what we are going to see: "computer vision:how machines see,process and understand images " &lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is Computer Vision?&lt;/strong&gt;
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Computer vision is a field of artificial intelligence (AI) that teaches computers to see, process, and understand visual information from digital images and videos&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;for example:&lt;/strong&gt; when you uplaod a car-photo, A computer doesn't automatically know what a car is just because it sees a picture. A machine learning model must learn patterns from training images. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;humans just see a picture as it is but machine just see it in numbers&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9qekswq6tzs2uhgflzjb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9qekswq6tzs2uhgflzjb.png" alt=" " width="678" height="379"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;what computer vision do?&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Image classifiction&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Predicts what an image contains&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Object detection&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Identifies objects and locates them wih bounding boxes&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Image segmentation&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Classifies individual pixels into regions or objects.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Video analysis and tracking&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Detects objects across video frames and follows their movement&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Images as tensors in pytorch
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;You have already learned about tensors in PyTorch. A tensor is a data structure that can store numbers in one or more dimensions. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Different shapes ,&lt;/strong&gt; according to the image:&lt;br&gt;
1.Grayscale image&lt;br&gt;
---&amp;gt;usually represented by 2D array of pixel values&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Shape:&lt;/strong&gt;(height * width)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;2.Color image&lt;br&gt;
---&amp;gt; usually represented by three colors channels(Red,Green,Blue)&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Shape:&lt;/strong&gt;(height*width*3)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;3.A batch of color images&lt;br&gt;
---&amp;gt; several images grouped together for model processing&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;shape:&lt;/strong&gt;(batch*channels*height*width)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;how to load the image in pytorch&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;We'll use three tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pillow (PIL): opens and reads image files.&lt;/li&gt;
&lt;li&gt;PyTorch: stores image data in tensors and prepares it for a model.&lt;/li&gt;
&lt;li&gt;Matplotlib: displays the image and helps us visualize it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;1.Prepare the environment&lt;br&gt;
&lt;code&gt;import torch&lt;br&gt;
import numpy as np&lt;br&gt;
import matplotlib.pyplot as plt&lt;br&gt;
from PIL import Image&lt;br&gt;
from google.colab import files&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Library&lt;/strong&gt;        ** Purpose**&lt;br&gt;
   torch           Creates and manipulates tensors&lt;br&gt;
   numpy           Works with numerical arrays&lt;br&gt;
   matplotlib   Displays images&lt;br&gt;
   PIL.Image    Opens and reads image files&lt;br&gt;
   files            Lets you upload a file to Colab&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;2.upload a photo&lt;br&gt;
&lt;code&gt;uploaded = files.upload()&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;this will provide you with upload option.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;3.Three-channel color image&lt;br&gt;
&lt;code&gt;image = Image.open(filename).convert("RGB")&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The convert("RGB") instruction ensures that we work with a three-channel color image, even if the original file was grayscale or used a different color format.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;4.Convert the image into numbers&lt;br&gt;
&lt;code&gt;# Convert the image into a NumPy array&lt;br&gt;
image_array = np.array(image)&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Computer Vision: Filters and Finding Edges&lt;/strong&gt;
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Computer Vision techniques process those numbers to find useful patterns, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Brightness and colors: Which parts are light, dark, or different colors?&lt;/li&gt;
&lt;li&gt;Edges: Where does the cat end and the background begin?&lt;/li&gt;
&lt;li&gt;Textures and shapes: What patterns form the ears, eyes, and body?&lt;/li&gt;
&lt;li&gt;Objects: Does the image contain a cat, a person, a car, or something else?&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;What is an image filter?&lt;/strong&gt;&lt;br&gt;
---&amp;gt;A filter is a mathematical operation applied to an image's      pixels. &lt;/p&gt;

&lt;p&gt;Different kernel values produce different effects: some smooth an image, some detect edges, and others emphasize fine details.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sobel X and Sobel Y: detecting changes in two directions:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Sobel X and Sobel Y are not two types of objects or two separate kinds of images. They are two filters that measure brightness changes in different directions.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;---&amp;gt;The Sobel operator uses two (3 \times 3) kernels.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;     Sx=[
         [-1  0  1],
         [-2  0  2],
         [-1  0  1]
       ]
  ----&amp;gt; Sobel X measures how quickly brightness changes as we move from left to right

     Sy=[
         [-1 -2 -1],
         [0   0  0],
         [1  2  1]
        ]
    ----&amp;gt;Sobel Y measures how quickly brightness changes as we move from top to bottom.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;How does a Sobel filter actually calculate an edge?&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;eg:&lt;/strong&gt;Suppose the left side is dark and the right side is bright:&lt;/p&gt;

&lt;p&gt;I=[&lt;br&gt;
[10 10 100],&lt;br&gt;
[10 10 100],&lt;br&gt;
[10 10 100]&lt;br&gt;
]&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Grayscale: removing color information&lt;/strong&gt;
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;It simplifies the image when color is not the main thing we need. We can focus on brightness differences, shapes, and boundaries.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;example:&lt;/strong&gt;&lt;br&gt;
Pic1: Original color image&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq4t48f2de0yb3szskg44.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq4t48f2de0yb3szskg44.png" alt=" " width="483" height="375"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Pic2: Grayscale image&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuhuy22koz52dfcgki8gp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuhuy22koz52dfcgki8gp.png" alt=" " width="386" height="322"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A color image commonly has three channels: Red, Green, and Blue (RGB). Each pixel has three values.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A grayscale image represents each pixel with one brightness value rather than three color values.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Blur: reducing noise and tiny details&lt;/strong&gt;
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Blur makes an image smoother by combining information from neighboring pixels.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Why do we use blur before detection?&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;For example:&lt;/strong&gt; Imagine we have a photo of leaf. and the leaf has a clear boundary but its surface contains some details and also other things such as small trees and others.&lt;/p&gt;

&lt;p&gt;if we detect edges immediately , the computer might detect both leaf boundaary and mant tiny surface details yet we want a leaf.&lt;/p&gt;

&lt;p&gt;Soo **Blurring **reduces some of those small variations, allowing the stronger boundaries to stand out.&lt;/p&gt;

&lt;p&gt;1.Original photo of a leaf                2.Blurred Image&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9u32od2lox4wrf176bk7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9u32od2lox4wrf176bk7.png" alt=" " width="316" height="248"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;2.Blurred Image&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fywmore28qu6o3yjodtb4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fywmore28qu6o3yjodtb4.png" alt=" " width="532" height="360"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;KEY NOTE:&lt;/strong&gt;too much blur can remove real details and make edges less precise.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is an edge?&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;An edge is a location where image intensity changes significantly.&lt;br&gt;
Consider these grayscale pixel values across a row:&lt;br&gt;
[&lt;br&gt;
[20,\ 20,\ 22,\ 21,\ 220,\ 225,\ 224]&lt;br&gt;
]&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The values change only slightly at first, then jump from (21) to (220).&lt;br&gt;
That large change could indicate a boundary between a dark object and a bright background.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Types of edges:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Vertical edges:A boundary that runs vertically, such as the left or right side of a door.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Horizontal edges:A boundary that runs horizontally, such as the top of a table.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Diagonal edges:Boundaries that run diagonally, such as a sloping roof or the side of a tilted object.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Soft or gradual edges:Brightness changes gradually rather than suddenly, for example because of shadows, soft lighting, or a blurry boundary.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Sharpening: making details stand out&lt;/strong&gt;
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Sharpening emphasizes local differences between neighboring pixels. It can make boundaries and fine details appear clearer.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;eg1:&lt;/strong&gt; without shapening:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fn7qos207749g7bpbvl6q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fn7qos207749g7bpbvl6q.png" alt=" " width="485" height="475"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;eg2:&lt;/strong&gt;with shapening:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0y058givavghz6rzinh9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0y058givavghz6rzinh9.png" alt=" " width="479" height="436"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;What does sharpening contribute?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
   Makes some boundaries look more defined.&lt;br&gt;
   Emphasizes small details and textures.&lt;br&gt;
   Can make a slightly soft image appear clearer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Take this:&lt;/strong&gt;&lt;br&gt;
The big idea to remember is that filters let us transform an image into a form that emphasizes particular information. Grayscale focuses on brightness, blur smooths variations, Sobel measures directional changes, Canny extracts refined edges, and sharpening emphasizes local detail. These are foundational tools for understanding how more advanced Computer Vision systems process visual information.&lt;/p&gt;

&lt;p&gt;Still learning, still exploring, and growing in Computer Vision.......&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>machinelearning</category>
      <category>computervision</category>
    </item>
    <item>
      <title>word embeddings in NLP</title>
      <dc:creator>abijuru diana</dc:creator>
      <pubDate>Wed, 30 Sep 2026 14:42:48 +0000</pubDate>
      <link>https://dev.to/abijuru_diane/word-embeddings-in-nlp-1gmd</link>
      <guid>https://dev.to/abijuru_diane/word-embeddings-in-nlp-1gmd</guid>
      <description>&lt;h2&gt;
  
  
  what is word embeddings?
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;word embedding is techniques of NLP that mapps the text into lists of vectors to represent word's meaning.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  how does word embeddings works?
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;numerical conversion&lt;/p&gt;

&lt;p&gt;vector space&lt;/p&gt;

&lt;p&gt;semantic clustering&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Why does this word embeddings matters?
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;word embedding&lt;/strong&gt; matters because they were the step to make machine work  with meaning instead of just spelling.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Ex: before word embeddings machine could take like "good" and "great" as unrelated data but after word embeddings model can treat them as related because of the &lt;em&gt;"vector space"&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;they enable transfer learning.&lt;br&gt;
--&amp;gt; word embeddings can be reuse in many small project,the model starts from the general langauge knowledge instead of starting from scracth. you dont need to relearn what langauge mean everytime you run a new project&lt;/p&gt;

&lt;p&gt;they are the sourced applications&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Word embedding Methods:
&lt;/h2&gt;

&lt;p&gt;Normally in word embedddings we have the &lt;strong&gt;3-be-called-approaches&lt;/strong&gt; :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;count/frequency-based&lt;/strong&gt; :This methods describe how often the words are in the sentence. &lt;br&gt;
...This includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;BoW (Bag-Of-Word)&lt;/li&gt;
&lt;li&gt;TF-IDF(Term Frequency-Inverse Document Frequency)&lt;/li&gt;
&lt;li&gt;Co-occurrence Matrix&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;prediction-based&lt;/strong&gt; :Methods use neural networks to learn word representations based on surrounding context.&lt;br&gt;
...This includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Word2Vec&lt;/li&gt;
&lt;li&gt;GloVe&lt;/li&gt;
&lt;li&gt;FastText&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Contextual embeddings&lt;/strong&gt;: This method generates dynamic vectors that change depending on the surrounding sentence, effectively handling polysemy&lt;br&gt;
...This includes:&lt;br&gt;
  -ELMo (Embeddings from Language Models)&lt;br&gt;
  -Transformers models(BERT, GPT&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  FOCUS: Prediction-Based Methods:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;u&gt;&lt;strong&gt;Word2Vec&lt;/strong&gt;&lt;/u&gt;
Here we train neural network to guess which words appear near each    other.Word2Vec looks at the context of words in a large text dataset. Words that appear in similar settings get vector coordinates close to each other in a multi-dimensional space. It uses two main architectures:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;• CBOW (Continuous Bag of Words): Predicts a target center word using its surrounding context words. It works faster for frequent words.&lt;br&gt;
  • Skip-gram: Predicts the surrounding context words by taking a single target center word as input. It performs better with smaller datasets and rare words.&lt;/p&gt;

&lt;p&gt;example of codes:&lt;br&gt;
`from gensim.models import Word2Vec&lt;/p&gt;

&lt;p&gt;sentences = [&lt;br&gt;
    ["Paul", "is", "driving", "the", "car"],&lt;br&gt;
    ["mary", "is", "driving", "a", "biycle"],&lt;br&gt;
    ["Cat", "drank", "the", "whole", "milk",]&lt;/p&gt;

&lt;p&gt;]&lt;br&gt;
model = Word2Vec(&lt;br&gt;
    sentences,&lt;br&gt;
    vector_size=100,&lt;br&gt;
    window=5,&lt;br&gt;
    min_count=1,&lt;br&gt;
    sg=1,&lt;br&gt;&lt;br&gt;
    negative=5,&lt;br&gt;
    epochs=50,&lt;br&gt;
)&lt;/p&gt;

&lt;p&gt;print(model.wv["driving"])&lt;br&gt;&lt;br&gt;
print(model.wv.most_similar("driving"))&lt;br&gt;&lt;br&gt;
print(model.wv.similarity("biycle", "car")) &lt;br&gt;
`&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;gensim.models&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Word2Vec&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;1.--&amp;gt;Load the Word2Vec tool&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;sentences&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[[...],&lt;/span&gt; &lt;span class="p"&gt;[...],&lt;/span&gt; &lt;span class="p"&gt;[...]]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2.--&amp;gt;A list of sentences, each a list of words&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nc"&gt;Word2Vec&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sentences&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;...)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3.--&amp;gt;Learn a vector for every word&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;wv&lt;/span&gt;&lt;span class="p"&gt;[...],&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;most_similar&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;similarity&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4.--&amp;gt;Look at the results&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What i learned:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;1.What is embeddings&lt;br&gt;
2.How is word embedding giving high volume to today's tech&lt;br&gt;
3.How is it applied through different ways&lt;br&gt;
4.Word2Vec approach&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sources&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://d2l.ai/index.html" rel="noopener noreferrer"&gt;https://d2l.ai/index.html&lt;/a&gt; : from the book of &lt;strong&gt;dive into deep learning&lt;/strong&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;-&lt;strong&gt;Chatgpt&lt;/strong&gt; : some informations were prompted from chatgpt&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Google&lt;/strong&gt; &lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>nlp</category>
      <category>python</category>
    </item>
  </channel>
</rss>
