<?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: iradukunda annet</title>
    <description>The latest articles on DEV Community by iradukunda annet (@annetorah).</description>
    <link>https://dev.to/annetorah</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%2F4151830%2F8bac9d19-3c81-4a47-99ff-7621ace0d901.jpg</url>
      <title>DEV Community: iradukunda annet</title>
      <link>https://dev.to/annetorah</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/annetorah"/>
    <language>en</language>
    <item>
      <title>Computer Vision: Learning How Computers See image</title>
      <dc:creator>iradukunda annet</dc:creator>
      <pubDate>Tue, 13 Oct 2026 12:34:36 +0000</pubDate>
      <link>https://dev.to/annetorah/computer-vision-learning-how-computers-see-image-4jgn</link>
      <guid>https://dev.to/annetorah/computer-vision-learning-how-computers-see-image-4jgn</guid>
      <description>&lt;p&gt;When I started learning Computer Vision, I thought it was just about teaching computers to recognize pictures. But honestly, I discovered that there is so much more behind it!  Through my lessons and practical notebook, I started understanding how computers process images and how we can use Python to help them recognize different things.&lt;/p&gt;

&lt;p&gt;what i have got from this is;&lt;/p&gt;

&lt;p&gt;first, I learned that computers see images as numbers called pixels. Every pixel contains information about brightness or colour. I also learned about RGB colour channels and how a colour image can be represented as three grids of numbers: red, green, and blue. This helped me understand that computers don't see images exactly like humans do.&lt;/p&gt;

&lt;p&gt;One of the topics I found interesting was image filters and convolution. I learned that filters use small grids of numbers called kernels to process images. For example, a blur filter smooths an image, while the Sobel filter helps detect edges by finding changes in brightness.&lt;/p&gt;

&lt;p&gt;Here is one of the filter examples I learned:&lt;/p&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%2F225pl53l0ag40oof2qs8.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%2F225pl53l0ag40oof2qs8.png" alt=" " width="800" height="412"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;import numpy as np&lt;/p&gt;

&lt;p&gt;blur = np.ones((5, 5)) / 25&lt;/p&gt;

&lt;p&gt;sobel_x = np.array([&lt;br&gt;
    [-1, 0, 1],&lt;br&gt;
    [-2, 0, 2],&lt;br&gt;
    [-1, 0, 1]&lt;br&gt;
])&lt;/p&gt;

&lt;p&gt;sobel_y = sobel_x.T&lt;/p&gt;

&lt;p&gt;The blur kernel averages nearby pixels to smooth the image. sobel_x helps detect vertical boundaries, while sobel_y helps detect horizontal boundaries. At first, these numbers looked confusing, but understanding what each filter does made the concept easier for me. 🥹&lt;/p&gt;

&lt;p&gt;I also learned about Convolutional Neural Networks (CNNs). Unlike filters that we design ourselves, CNNs can learn their own filters from training images. They can learn simple features such as edges and colours, then combine them into more complex features like textures, object parts, and complete objects.&lt;/p&gt;

&lt;p&gt;Understanding Different Computer Vision Tasks&lt;/p&gt;

&lt;p&gt;Through the PPT and notebook, I learned that Computer Vision has different tasks:&lt;/p&gt;

&lt;p&gt;Image classification: Predicts what an image contains, usually by giving it one main label.&lt;/p&gt;

&lt;p&gt;Object detection: Identifies objects and shows where they are using bounding boxes.&lt;/p&gt;

&lt;p&gt;Image segmentation: Identifies which pixels belong to different objects or regions.&lt;/p&gt;

&lt;p&gt;OCR: Helps computers read text inside images.&lt;/p&gt;

&lt;p&gt;Object tracking: Follows objects across video frames.&lt;/p&gt;

&lt;p&gt;I also practised working with pretrained YOLO models in the notebook. I learned that YOLO means You Only Look Once. It detects objects in one main pass through an image, making it useful for fast predictions. We also explored how pretrained models can classify images, detect objects, and perform segmentation without building a model completely from scratch.&lt;/p&gt;

&lt;p&gt;Another concept I learned was Vision Transformers (ViTs). They divide an image into smaller patches and process them like tokens in a language model. I found this interesting because it connects Computer Vision to the Transformer concepts I learned in NLP.&lt;/p&gt;

&lt;p&gt;What Surprised Me Most&lt;/p&gt;

&lt;p&gt;I learned that AI models are not always correct. In our lesson, we explored how changes such as dark lighting, turning an image upside down, or reducing its resolution can affect predictions. A model might miss an object or recognize something incorrectly because it has not learned enough from similar examples.&lt;/p&gt;

&lt;p&gt;This taught me why good training data matters, why models need proper testing, and why using images that represent our own environment is important. I also discovered how Computer Vision can help in African communities, from identifying crop diseases to supporting healthcare and accessibility.&lt;/p&gt;

&lt;p&gt;My Final Thoughts &lt;/p&gt;

&lt;p&gt;Honestly, I am still learning, and some concepts were confusing at first. But this journey has helped me understand that Computer Vision is more than just making computers recognize pictures. It involves pixels, filters, mathematics, neural networks, and learning from data.&lt;/p&gt;

&lt;p&gt;This is just the beginning of my Computer Vision journey, and I can't wait to use what I have learned to build something meaningful! &lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>deeplearning</category>
      <category>python</category>
    </item>
    <item>
      <title>Word Embendding</title>
      <dc:creator>iradukunda annet</dc:creator>
      <pubDate>Wed, 30 Sep 2026 14:32:23 +0000</pubDate>
      <link>https://dev.to/annetorah/word-embendding-50lk</link>
      <guid>https://dev.to/annetorah/word-embendding-50lk</guid>
      <description>&lt;p&gt;as today's we learnt about word Embendding ,first we started with learning  Natural Language Processing(NLP) we learn how computers turn words into numbers and the thing i have got today's leason is that word embending is used to see the simillarity of the words like kigali and nairobi have the simillarity of both being cities and If I see the words “king” and “queen,” I understand that they are related, now i can understand that computers dont see words the way we do , a computer utlimately works with numbers .&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. what ar5e word embenddings?&lt;/strong&gt;&lt;br&gt;
==&amp;gt; a word embendding is a way of representing a word as alist of numbers ,also called vector.&lt;/p&gt;

&lt;p&gt;For example, a very simplified representation could look something like this: "got this example from chatgpt"&lt;/p&gt;

&lt;p&gt;king  → [0.25, 0.81, -0.14, 0.63]&lt;br&gt;
queen → [0.27, 0.79, -0.12, 0.61]&lt;br&gt;
apple → [-0.72, 0.10, 0.54, -0.31]&lt;/p&gt;

&lt;p&gt;The real vectors are usually much larger than this example. They might contain dozens, hundreds, or more dimensions.&lt;/p&gt;

&lt;p&gt;the important idea is that words with similar meanings or similar5 uses tend to have vectors that are close to each other in the emmbedding space .&lt;br&gt;
this is useful because traditional approaches such as representing every word simply as an ID don't naturally tell a machine that two words are related.&lt;/p&gt;

&lt;p&gt;Word embeddings instead allow machine learning models to work with relationships between words.&lt;br&gt;
 &lt;strong&gt;they are usefull in applications such as we saw today&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;in sentiment analysis&lt;/li&gt;
&lt;li&gt;in text classification&lt;/li&gt;
&lt;li&gt;in search engines
4.in recommendation systems&lt;/li&gt;
&lt;li&gt;in chatbots&lt;/li&gt;
&lt;li&gt;in machine tran&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;he basic idea is often summarized by the phrase “you shall know a word by the company it keeps.” In other words, the words appearing around a word can tell us a lot about its meaning.&lt;/p&gt;

&lt;p&gt;""2 Word2Vec""&lt;/p&gt;

&lt;p&gt;One embedding method I studied is Word2Vec.&lt;/p&gt;

&lt;p&gt;Word2Vec was introduced by Tomas Mikolov and his colleagues in 2013. The approach learns continuous vector representations of words from large amounts of text and was designed to capture useful syntactic and semantic relationships between words.&lt;/p&gt;

&lt;p&gt;there are two things we looked about today which are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;cbow(continuous bag of words)&lt;/li&gt;
&lt;li&gt;skip-gram&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;CBOW&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;CBOW tries to predict a target word from the words around it.&lt;/p&gt;

&lt;p&gt;Imagine this sentence:&lt;/p&gt;

&lt;p&gt;The cat is sleeping on the sofa.&lt;/p&gt;

&lt;p&gt;If the target word is sleeping, the surrounding words provide context:&lt;/p&gt;

&lt;p&gt;The cat is [sleeping] on the sofa&lt;/p&gt;

&lt;p&gt;The model learns from many examples like this and gradually adjusts the word vectors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Skip-gram&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Skip-gram does almost the opposite.&lt;/p&gt;

&lt;p&gt;Instead of using surrounding words to predict the target word, it uses a target word to predict words that appear around it.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;The cat is sleeping on the sofa.&lt;br&gt;
Given the word:&lt;/p&gt;

&lt;p&gt;cat&lt;/p&gt;

&lt;p&gt;the model tries to predict nearby words such as:&lt;/p&gt;

&lt;p&gt;The&lt;br&gt;
is&lt;/p&gt;

&lt;p&gt;By repeating this process over a large corpus, the model learns useful representations of words.&lt;/p&gt;

&lt;p&gt;The original Word2Vec work described both CBOW and Skip-gram architectures and showed that the learned vectors could capture syntactic and semantic relationships. Later work also introduced techniques such as negative sampling to make training more efficient.&lt;strong&gt;this is from google&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Trying Word2Vec with Python&lt;/p&gt;

&lt;p&gt;One of the easiest ways to experiment with Word2Vec in Python is with the gensim library.&lt;/p&gt;

&lt;p&gt;Here is a small example:&lt;/p&gt;

&lt;p&gt;from gensim.models import Word2Vec&lt;/p&gt;

&lt;p&gt;sentences = [&lt;br&gt;
    ["the", "cat", "is", "sleeping"],&lt;br&gt;
    ["the", "dog", "is", "sleeping"],&lt;br&gt;
    ["the", "cat", "likes", "milk"],&lt;br&gt;
    ["the", "dog", "likes", "food"],&lt;br&gt;
    ["a", "cat", "is", "an", "animal"],&lt;br&gt;
    ["a", "dog", "is", "an", "animal"]&lt;br&gt;
]&lt;/p&gt;

&lt;p&gt;model = Word2Vec(&lt;br&gt;
    sentences,&lt;br&gt;
    vector_size=50,&lt;br&gt;
    window=2,&lt;br&gt;
    min_count=1,&lt;br&gt;
    workers=4&lt;br&gt;
)&lt;br&gt;
print(model.wv.most_similar("cat", topn=3))&lt;/p&gt;

&lt;p&gt;** this are the  similarity result**&lt;/p&gt;

&lt;p&gt;The vector_size determines the number of dimensions used for each word vector.&lt;/p&gt;

&lt;p&gt;The window controls how many nearby words are considered as context.&lt;/p&gt;

&lt;p&gt;min_count=1 tells the model to keep words that appear at least once.&lt;/p&gt;

&lt;p&gt;Finally, most_similar() lets us find words whose vectors are close to the vector for cat.&lt;/p&gt;

&lt;p&gt;Because this is a tiny artificial dataset, the results won't be as meaningful as those from a model trained on a large real-world corpus. That is actually an important lesson: the quality of an embedding depends heavily on the data used to train it.&lt;/p&gt;

&lt;p&gt;Gensim also provides functionality for retrieving vectors and finding similar words from trained Word2Vec models.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;the anology that we talked about to day *&lt;/em&gt;&lt;br&gt;
 the one the we saw today the things about word embedding is that they can sometime capture relationshios between words&lt;/p&gt;

&lt;p&gt;example:&lt;br&gt;
king - man + woman = queen😊&lt;/p&gt;

&lt;p&gt;Conceptually, the model can learn directions in its vector space that correspond to certain relationships.&lt;/p&gt;

&lt;p&gt;This doesn't mean the model understands gender or royalty in the same way a human does. Instead, those relationships have been encoded statistically through patterns in the training data.&lt;/p&gt;

&lt;p&gt;That's one of the things I found most surprising about embeddings: simple numerical vectors can contain surprisingly rich information about language.&lt;/p&gt;

&lt;p&gt;Something I struggled with&lt;/p&gt;

&lt;p&gt;The hardest part for me was initially understanding what the individual numbers in an embedding actually mean.&lt;/p&gt;

&lt;p&gt;If I see:&lt;/p&gt;

&lt;p&gt;[0.21, -0.48, 0.73, 0.11, ...]&lt;/p&gt;

&lt;p&gt;I cannot simply look at the first number and say, “This represents whether the word is an animal.”&lt;/p&gt;

&lt;p&gt;The dimensions don't normally have such simple human-readable meanings. Meaning is distributed across the vector.&lt;/p&gt;

&lt;p&gt;That was an important shift in how I thought about machine learning.&lt;/p&gt;

&lt;p&gt;Instead of asking:&lt;/p&gt;

&lt;p&gt;“What does each numberr mean?"&lt;br&gt;
I started thinking:&lt;/p&gt;

&lt;p&gt;“What relationships does the entire vector represent?”&lt;/p&gt;

&lt;p&gt;Similarity is often measured using cosine similarity, which compares the direction of two vectors rather than simply comparing their individual values.&lt;/p&gt;

&lt;p&gt;For example, if two words have vectors pointing in similar directions, their cosine similarity will be relatively high.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Word embeddings are powerful, but not perfect&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There is another important lesson: embeddings learn from their training data.&lt;br&gt;
If the training data contains biases, the resulting embeddings can also contain those biases.&lt;/p&gt;

&lt;p&gt;They can also struggle with things such as:&lt;/p&gt;

&lt;p&gt;-Words with multiple meanings&lt;br&gt;
-Rare words&lt;br&gt;
-Misspellings&lt;br&gt;
-New words&lt;br&gt;
-Context-dependent meanings&lt;/p&gt;

&lt;p&gt;Another limitation of traditional Word2Vec-style embeddings is that a word generally has one learned vector, even when the word has different meanings depending on context.&lt;/p&gt;

&lt;p&gt;For example, consider:&lt;/p&gt;

&lt;p&gt;I deposited money at the bank.&lt;/p&gt;

&lt;p&gt;and:&lt;/p&gt;

&lt;p&gt;We sat beside the river bank.&lt;/p&gt;

&lt;p&gt;The word bank has different meanings, but a traditional Word2Vec model gives bank a single representation.&lt;/p&gt;

&lt;p&gt;This is one reason later NLP approaches moved toward contextual representations, where the representation of a word can change depending on the sentence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I learned&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The biggest thing I learned from studying word embeddings is that NLP isn't simply about turning words into numbers.&lt;/p&gt;

&lt;p&gt;It is about finding a numerical representation that preserves useful information about how language is used.&lt;/p&gt;

&lt;p&gt;Word embeddings create a bridge between human language and mathematical models.&lt;/p&gt;

&lt;p&gt;Once words become vectors, we can calculate similarities, compare concepts, perform classifications, and give other machine learning algorithms a numerical representation of language.&lt;/p&gt;

&lt;p&gt;And honestly, seeing something like:&lt;/p&gt;

&lt;p&gt;king - man + woman ≈ queen&lt;/p&gt;

&lt;p&gt;come out of a mathematical representation of language is pretty wild.&lt;/p&gt;

&lt;p&gt;It made me realize that machine learning doesn't necessarily need to “understand” language in the human sense to discover useful patterns in it.&lt;/p&gt;

&lt;p&gt;That is what makes word embeddings such an interesting foundation for NLP.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sources
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Google&lt;/strong&gt; — Used to research and verify information about word embeddings, Word2Vec, NLP, and related concepts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ChatGPT (OpenAI)&lt;/strong&gt; — Used as a learning and writing assistant to help explain and organize the concepts discussed in this article.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;---------------------------end------------------------------&lt;/p&gt;

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