<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Serkan Celik on Medium]]></title>
        <description><![CDATA[Stories by Serkan Celik on Medium]]></description>
        <link>https://medium.com/@celik.serkan?source=rss-d0b743c57bf1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*4RMvNF8P4RD6Ch5KseeEMg.png</url>
            <title>Stories by Serkan Celik on Medium</title>
            <link>https://medium.com/@celik.serkan?source=rss-d0b743c57bf1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 22:06:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@celik.serkan/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[RedHat OpenShift Local Installation (Windows 10)]]></title>
            <link>https://medium.com/@celik.serkan/redhat-openshift-local-installation-windows-10-12ffc8721dfc?source=rss-d0b743c57bf1------2</link>
            <guid isPermaLink="false">https://medium.com/p/12ffc8721dfc</guid>
            <dc:creator><![CDATA[Serkan Celik]]></dc:creator>
            <pubDate>Tue, 29 Jul 2025 23:37:29 GMT</pubDate>
            <atom:updated>2025-12-17T12:13:23.847Z</atom:updated>
            <content:encoded><![CDATA[<p>Just step by step.</p><ol><li>Install podman desktop.</li></ol><p><a href="https://podman-desktop.io/downloads">https://podman-desktop.io/downloads</a> (for windows)</p><p>Install it.</p><p>2. Open podman desktop.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TMxki9Qde-28yiM6fpSoBg.png" /></figure><p>Click extensions page and install Red Hat OpenShift Local.</p><p>3. It will ask two choices to you; MiniShift or OpenShift.</p><p>If you want minimal, choose: MiniShift</p><p>If you want full, choose: OpenShift</p><p>4. Wait</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fjj0ChLVTpaA%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Djj0ChLVTpaA&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fjj0ChLVTpaA%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/846d28dd86b400912cf6c3c2e3d273b9/href">https://medium.com/media/846d28dd86b400912cf6c3c2e3d273b9/href</a></iframe><p>5. After installation, you need to reboot your machine.</p><p>6. Open podman again and start the OpenShift Local on the Dashboard page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tJoXtbWWIMhJlOlTXUaB5w.png" /></figure><p>7. Click start and wait again just more 3 or 5 min.</p><p>8. If you see RUNNING state, open a terminal and type “crc start” and press enter.</p><p>9. This command will give you credentials and url for reaching openshift local.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*udKPzahm8fpuda00Jml1dg.png" /></figure><p>Done</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FKBKloEVeC2k%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DKBKloEVeC2k&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FKBKloEVeC2k%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e66af030acfee06c7b0c74b608a04647/href">https://medium.com/media/e66af030acfee06c7b0c74b608a04647/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=12ffc8721dfc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ses Verisi İşlemenin Temelleri]]></title>
            <link>https://medium.com/huawei-developers-tr/ses-verisi-i%CC%87%C5%9Flemenin-temelleri-df60a60c6bde?source=rss-d0b743c57bf1------2</link>
            <guid isPermaLink="false">https://medium.com/p/df60a60c6bde</guid>
            <category><![CDATA[rsa]]></category>
            <category><![CDATA[speech-recognition]]></category>
            <category><![CDATA[mfcc]]></category>
            <category><![CDATA[audio-processing]]></category>
            <category><![CDATA[signal-processing]]></category>
            <dc:creator><![CDATA[Serkan Celik]]></dc:creator>
            <pubDate>Fri, 08 Dec 2023 11:17:52 GMT</pubDate>
            <atom:updated>2023-12-08T11:17:52.985Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*lIylRga7tg9WGBJAJdXK0g.gif" /><figcaption><a href="https://i.pinimg.com/originals/0c/cc/f9/0cccf95b25a676546aaf6a3592a92476.gif">Görsel Referansı</a></figcaption></figure><h3>Giriş</h3><p>Merhaba! Bu yazımızda, MindAudio’nun temel bileşenlerini ve ses ön işleme aşamaları hakkında konuşacağız.</p><p>MindAudio, ses işleme uygulamaları için kullanılan bir kütüphanedir. MindSpore platformunun bir parçası olarak, özellik çıkarımı, ses dönüştürümü, ses sınıflandırması, sesli komut algılama ve konuşma tanıma gibi çeşitli ses işleme görevlerini destekler.</p><h3>Ses İşlemenin Temel Bileşenleri</h3><h4>Ses Veri Setleri</h4><p>Ses işleme modellerini eğitmek veya değerlendirmek için kullanılan ses veri setlerini yönetir. Ses veri setleri, önceden işlenmiş ses örneklerini veya gerçek zamanlı ses akışlarını içerebilir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mYwbPjMmxPJx8jhLeGHrAQ.jpeg" /><figcaption><a href="https://images.ctfassets.net/3viuren4us1n/4imDthsSrPzJ6rRmECOcZJ/6bee69c4e22afc30bcbcc2d34dbe1bff/Audio_data_-_Audio_data_collection.jpg">Görsel Referansı</a></figcaption></figure><h4>Ses Ön İşleme Fonksiyonları</h4><p>Ses veri setleri, ses işleme modellerine uygun hale getirilmeden önce ön işleme adımlarından geçirilir. Ön işleme aşamaları, sesin spektrograma dönüştürülmesi, sesin normalizasyonu, parazitlerin temizlenmesi ve özellik çıkarımı gibi adımları içerebilir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*wyikLUIrozEP9rbTx2be1w.jpeg" /><figcaption><a href="https://www.researchgate.net/publication/350472892/figure/fig1/AS:1023140893298690@1620947206634/Outline-of-the-pre-processing-method-that-converts-the-1D-waveform-into-2D-mel-spectrum.ppm">Görsel Referansı</a></figcaption></figure><h4>Yapay Zeka Modelleri</h4><p>MindAudio, ses işleme modellerini tanımlamak, eğitmek ve değerlendirmek için kullanılan bir dizi yapay zeka modelini içerir. Bu modeller, konuşma tanıma, sesli komut algılama, ses sınıflandırma ve diğer ses işleme görevlerini gerçekleştirmek için tasarlanmıştır.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HtrdHVGKQquCCkwJ6z8Uaw.png" /><figcaption><a href="https://nvidia.github.io/OpenSeq2Seq/html/_images/ds2.png">Görsel Referansı</a></figcaption></figure><h4>Model Eğitim ve Değerlendirme Fonksiyonları</h4><p>MindAudio, ses işleme modellerini eğitmek ve değerlendirmek için gerekli olan araçları sağlar. Bu araçlar, veri seti hazırlığı, model eğitimi, model değerlendirmesi ve sonuçların analizi gibi adımları içerir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H0jhEoKTFI6U31RUhDMisA.png" /><figcaption><a href="https://miro.medium.com/v2/resize:fit:1400/1*MUGLdWm3zMYK7dLmyo3pqA.png">Görsel Referansı</a></figcaption></figure><h4>Ses Ön İşleme Aşamaları</h4><p>Ses ön işleme, ses veri setlerini ses işleme modellerine uygun bir formata dönüştürme sürecidir. İşte temel ses ön işleme aşamaları:</p><p><strong>1- Sesin Yüklenmesi:</strong> Ses veri seti, ses dosyalarını yüklemek için kullanılır. Ses dosyaları, genellikle WAV veya MP3 formatında olabilir.</p><p><strong>2-</strong> <strong>Örnekleme Hızının Ayarlanması:</strong> Ses dosyaları, genellikle farklı örnekleme hızlarına sahip olabilir. Örnekleme hızı, ses verisinin saniyede kaç kez örneklendiğini belirtir. Ses veri seti, örnekleme hızını sabit bir değere dönüştürmek için örnekleme hızı dönüştürme işlemlerinden geçirilir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EbLHLJbYXxOHcvak0kzLyQ.gif" /><figcaption><a href="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/datasets/resample-dark.gif">Görsel Referansı</a></figcaption></figure><p><strong>3-</strong> <strong>Spektrogram Oluşturma:</strong> Ses verileri, spektrogram adı verilen bir temsil formuna dönüştürülür. Spektrogram, frekans ve zamana bağlı bir ısı haritasıdır ve sesin frekans bileşenlerini zamanla nasıl değiştirdiğini gösterir. Bu, sesin spektral özelliklerini yakalamak için kullanılır.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*ez-EgQlFqgYw6RGRaRyYQA.png" /><figcaption><a href="https://www.researchgate.net/publication/354098985/figure/fig1/AS:1060319870857218@1629811365856/Audio-spectrogram-representation-The-raw-audio-signal-is-transformed-using-the-Fourier.png">Görsel Referansı</a></figcaption></figure><p><strong>4- Özellik Çıkarımı:</strong> Spektrogram, daha sonra sesin özelliklerini temsil eden vektörlere dönüştürülür. Özellik çıkarımı adı verilen bu işlem, sesin önemli spektral bileşenlerini vurgulamak için filtreleme ve matematiksel dönüşümler kullanır. Özellik çıkarımı, genellikle Mel Frekans Cepstral Katsayıları (MFCC) veya Periyodiklik Doğrusal Özellikler (PLP) gibi yöntemlerle gerçekleştirilir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*HGTXkWh6M2qTdOrCUcv77A.png" /><figcaption><a href="https://s3-ap-south-1.amazonaws.com/av-blog-media/wp-content/uploads/2017/08/23212155/time_freq.png">Görsel Referansı</a></figcaption></figure><h4>MindAudio ile Özellik Çıkarımı Aşamaları</h4><p>MindAudio kütüphanesini kullanarak bir ses dosyasından özellik çıkarma ve Spektrogram görselleştirmesi yapma işlemlerini gerçekleştiren kodu inceleyelim;</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d6ed0dca760642726a4c3aeda7cd3766/href">https://medium.com/media/d6ed0dca760642726a4c3aeda7cd3766/href</a></iframe><p>Örnek kodlamayı gerçekleştirmek için gerekli kütüphaneleri çağırmamız gerekiyor. Ses dosyalarını okumak ve spektrum analizi yapmak için kütüphaneleri çağırmamız gerekiyor. Bu sebeple mindaudio.data.io ve mindaudio.data.spectrum modüllerini içe aktarıyoruz.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/de58a9b56f55df5219373a85ac494ebd/href">https://medium.com/media/de58a9b56f55df5219373a85ac494ebd/href</a></iframe><p>io.read() fonksiyonuyla ilgili ses dosyasını okuyoruz.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2f836795310a064245d4ab88d3ab5c21/href">https://medium.com/media/2f836795310a064245d4ab88d3ab5c21/href</a></iframe><p>stft() fonksiyonunu kullanarak ses verisinden spektrogram matrisini elde ediyoruz. n_fft parametresi, Fourier dönüşümünde kullanılan pencere boyutunu belirtir. magphase() fonksiyonuyla spektrogram matrisini genlik ve faz matrislerine ayırıyoruz. Biz sadece genlik matrisini kullanacağız.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f8ead510e8de64af269ed2d7cbd16131/href">https://medium.com/media/f8ead510e8de64af269ed2d7cbd16131/href</a></iframe><p>pcolormesh() fonksiyonunu kullanarak spektrogramı renkli bir şekilde görselleştiriyoruz. x ekseni zamanı, y ekseni frekansı temsil eder. shading parametresi gouraud renklendirme kullanılacağını belirtir. Grafik başlığını, eksen etiketlerini belirleyerek görseli düzenliyoruz. plt.show() komutuyla görseli ekranda görüntülüyoruz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*aIT7r7XmFhcCu1GzjtZKVQ.png" /><figcaption><a href="https://raw.githubusercontent.com/mindspore-lab/mindaudio/main/tests/result/stft_magnitude.png">Görsel Referansı</a></figcaption></figure><p>Yaptığımız aşamalar sonunda, verilen ses dosyasının spektrogramını elde edebiliriz. Spektrogram, zaman-frekans alanında sesin frekans bileşenlerini temsil eden bir görsel sunar.</p><p>Elde ettiğimiz Spektogram verisi Konuşma Bilgi Sistemleri uygulamalarında kullanılabilir:</p><ol><li><strong>Konuşma Tanıma (Automatic Speech Recognition):</strong> Ses verilerinden konuşma metnine dönüştürme işlemi için spektrogramlar kullanılabilir. Bu sistemler, konuşmayı anlamak ve transkript oluşturmak için ses dalgalarını analiz eder. Dil modelleri ve ses özelliklerini kullanarak konuşulan sözcükleri metin formatına çevirir. ASR, sesli komutlar, konuşma tanıma sistemleri, sesli asistanlar ve transkripsiyon hizmetleri gibi birçok uygulamada kullanılır.</li><li><strong>Konuşma Tespiti (Speech Non-Speech Detection):</strong> Ses verilerinde konuşma ve konuşma olmayan kısımları ayırt etmeyi amaçlayan bir teknolojidir. Bu tür bir sistem, ses sinyallerini analiz ederek konuşma içeren bölümleri belirleyebilir ve bu sayede gürültü filtreleme, konuşma tanıma sistemlerinin performansını artırma veya sesli komutlara tepki verme gibi uygulamalarda kullanılabilir.</li><li><strong>Konuşmacı Tanıma (Speaker Recognition):</strong> Ses tabanlı biyometrik bir teknoloji olup, bir kişinin konuşma özelliklerini kullanarak bu kişiyi tanıma sürecini ifade eder. Bu sistemler, bireylerin ses özelliklerini (tonlama, vurgu, konuşma hızı vb.) analiz ederek özgün bir ses profili oluşturur. Konuşma tanıma veya doğrulama amacıyla kullanılabilirler. Güvenliği artırmak, erişim kontrolu uygulamak veya telefon bankacılığı gibi alanlarda doğrulama sağlamak amacıyla kullanılabilir.</li><li><strong>Metin-Konuşma Dönüşümü (Text to Speech):</strong> Metin verilerini konuşma sesine dönüştüren bir teknolojiyi ifade eder. Bu sistemler, yazılı metinleri otomatik olarak konuşmaya çevirir ve sesli bir çıktı oluşturur. TTS, genellikle kullanıcı arayüzleri, sesli kitaplar, telefon yanıtları, navigasyon sistemleri ve diğer ses tabanlı uygulamalarda kullanılır.</li><li><strong>Dil Tanımlama Modelleri (Language Identification Models): </strong>Ses verilerinde konuşulan dilin tespitini sağlayan modelleri ifade eder. Bu modeller, ses kayıtlarını analiz ederek hangi dilin konuşulduğunu belirler. Ses tabanlı uygulamalarda, çok dilli ortamlarada veya transkripsiyon hizmetlerinde kullanılır. Bu modeller, konuşulan dilin doğru bir şekilde tanımlanması sayesinde çeşitli dil tabanlı işlemlerin gerçekleştirilmesine olanak tanır.</li></ol><h3>Sonuç</h3><p>Bu makalede, MindSpore Audio’nun ses işleme uygulamalarında nasıl kullanıldığına ve ses ön işleme aşamalarının nasıl gerçekleştirildiğine değindik. MindSpore Audio, ses işleme modellerini yönetmek, ses veri setlerini işlemek ve çeşitli ses işleme görevlerini gerçekleştirmek için kullanılan bir kütüphanedir. Mindspore ve MindAudio hakkında daha fazla bilgi edinmek isterseniz <a href="https://www.mindspore.cn/en">MindSpore</a> sitesini ziyaret edebilirsiniz.</p><p>Bir sonraki yazımızda görüşmek üzere :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*QwxmjkbTYx1pFJF3-aF72g.gif" /><figcaption><a href="https://s3.amazonaws.com/media.muckrack.com/mrdaily/site/images/2018/02/07/giphy-downsized-68.gif">Image Reference</a></figcaption></figure><h3>Kaynaklar</h3><p><a href="https://github.com/mindspore-lab/mindaudio/tree/main">GitHub - mindspore-lab/mindaudio: A toolbox of audio models and algorithms based on MindSpore</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df60a60c6bde" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers-tr/ses-verisi-i%CC%87%C5%9Flemenin-temelleri-df60a60c6bde">Ses Verisi İşlemenin Temelleri</a> was originally published in <a href="https://medium.com/huawei-developers-tr">Huawei Developers - Türkiye</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Basics of Audio Processing]]></title>
            <link>https://medium.com/huawei-developers/basics-of-audio-processing-e69efce7765f?source=rss-d0b743c57bf1------2</link>
            <guid isPermaLink="false">https://medium.com/p/e69efce7765f</guid>
            <category><![CDATA[mfcc]]></category>
            <category><![CDATA[audio-processing]]></category>
            <category><![CDATA[speech-recognition]]></category>
            <category><![CDATA[signal-processing]]></category>
            <category><![CDATA[rsa]]></category>
            <dc:creator><![CDATA[Serkan Celik]]></dc:creator>
            <pubDate>Fri, 08 Dec 2023 11:10:37 GMT</pubDate>
            <atom:updated>2023-12-08T11:10:37.864Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*lIylRga7tg9WGBJAJdXK0g.gif" /><figcaption><a href="https://i.pinimg.com/originals/0c/cc/f9/0cccf95b25a676546aaf6a3592a92476.gif">Image Reference</a></figcaption></figure><h3>Introduction</h3><p>Hi! In this article, we will talk about the basic components of MindAudio and the audio pre-processing stages.</p><p>MindAudio is a library for audio processing applications. As part of the MindSpore platform, it supports a variety of voice processing tasks such as feature extraction, voice transformation, voice classification, voice command detection, and speech recognition. In this article, we will talk about the basic components of MindAudio and its audio pre-processing stages.</p><h3>Core Elements of Audio Processing</h3><h4>Audio Datasets</h4><p>Manages audio datasets used to train or evaluate audio processing models. Audio datasets can contain pre-processed audio samples or real-time audio streams.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mYwbPjMmxPJx8jhLeGHrAQ.jpeg" /><figcaption><a href="https://images.ctfassets.net/3viuren4us1n/4imDthsSrPzJ6rRmECOcZJ/6bee69c4e22afc30bcbcc2d34dbe1bff/Audio_data_-_Audio_data_collection.jpg">Image Reference</a></figcaption></figure><h4>Audio Preprocessing Functions</h4><p>Audio datasets go through pre-processing steps before being made suitable for audio processing models. Preprocessing steps may include steps such as converting the audio into a spectrogram, normalizing the audio, removing noise, and feature extraction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*wyikLUIrozEP9rbTx2be1w.jpeg" /><figcaption><a href="https://www.researchgate.net/publication/350472892/figure/fig1/AS:1023140893298690@1620947206634/Outline-of-the-pre-processing-method-that-converts-the-1D-waveform-into-2D-mel-spectrum.ppm">Image Reference</a></figcaption></figure><h4>AI Models</h4><p>MindAudio includes a set of artificial intelligence models used to define, train, and evaluate audio processing models. These models are designed to perform speech recognition, voice command detection, voice classification, and other audio-processing tasks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HtrdHVGKQquCCkwJ6z8Uaw.png" /><figcaption><a href="https://nvidia.github.io/OpenSeq2Seq/html/_images/ds2.png">Image Reference</a></figcaption></figure><h4>Model Traning and Evaluation Methods</h4><p>MindAudio provides the tools necessary to train and evaluate audio processing models. These tools include steps such as dataset preparation, model training, model evaluation, and analysis of results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H0jhEoKTFI6U31RUhDMisA.png" /><figcaption><a href="https://miro.medium.com/v2/resize:fit:1400/1*MUGLdWm3zMYK7dLmyo3pqA.png">Image Reference</a></figcaption></figure><h4>Audio Preprocessing Stages</h4><p>Audio preprocessing is the process of converting audio data sets into a format suitable for audio processing models. Here are the basic audio preprocessing steps:</p><p><strong>1- Loading Audio:</strong> The audio data set is used to load audio files. Audio files can usually be in WAV or MP3 format.</p><p><strong>2- Adjusting the Sampling Rate:</strong> Audio files can often have different sampling rates. Sample rate refers to how many times per second audio data is sampled. The audio dataset is put through sample rate conversion processes to convert the sample rate to a constant value.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EbLHLJbYXxOHcvak0kzLyQ.gif" /><figcaption><a href="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/datasets/resample-dark.gif">Image Reference</a></figcaption></figure><p><strong>3- Spectrogram Creation:</strong> Audio data is converted into a representation form called spectrogram. A spectrogram is a heat map of frequency and time, showing how sound changes its frequency components over time. This is used to capture the spectral characteristics of the sound.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*ez-EgQlFqgYw6RGRaRyYQA.png" /><figcaption><a href="https://www.researchgate.net/publication/354098985/figure/fig1/AS:1060319870857218@1629811365856/Audio-spectrogram-representation-The-raw-audio-signal-is-transformed-using-the-Fourier.png">Image Reference</a></figcaption></figure><p><strong>4- Feature Extraction: </strong>The spectrogram is then converted into vectors representing the features of the sound. This process, called feature extraction, uses filtering and mathematical transformations to highlight important spectral components of the sound. Feature extraction is usually performed through methods such as Mel Frequency Cepstral Coefficients (MFCC) or Periodicity Linear Features (PLP).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*HGTXkWh6M2qTdOrCUcv77A.png" /><figcaption><a href="https://s3-ap-south-1.amazonaws.com/av-blog-media/wp-content/uploads/2017/08/23212155/time_freq.png">Image Reference</a></figcaption></figure><h4>MindAudio Feature Extraction</h4><p>Let’s examine the code that performs feature extraction from an audio file and Spectrogram visualization using the MindAudio library;</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d6ed0dca760642726a4c3aeda7cd3766/href">https://medium.com/media/d6ed0dca760642726a4c3aeda7cd3766/href</a></iframe><p>We need to call the necessary libraries to perform the sample coding. We need to call libraries to read audio files and perform spectrum analysis. For this reason, we import the mindaudio.data.io and mindaudio.data.spectrum modules.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/de58a9b56f55df5219373a85ac494ebd/href">https://medium.com/media/de58a9b56f55df5219373a85ac494ebd/href</a></iframe><p>We read the audio file with the io.read() function.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2f836795310a064245d4ab88d3ab5c21/href">https://medium.com/media/2f836795310a064245d4ab88d3ab5c21/href</a></iframe><p>We obtain the spectrogram matrix from the audio data using the stft() function. The n_fft parameter specifies the window size used in the Fourier transform. We separate the spectrogram matrix into amplitude and phase matrices with the magphase() function. We will just use the amplitude matrix.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f8ead510e8de64af269ed2d7cbd16131/href">https://medium.com/media/f8ead510e8de64af269ed2d7cbd16131/href</a></iframe><p>We visualize the spectrogram in color using the pcolormesh() function. The x-axis represents time and the y-axis represents frequency. The shading parameter specifies whether Gouraud coloring will be used. We edit the visual by determining the chart title and axis labels. We display the image on the screen with the plt.show() command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*aIT7r7XmFhcCu1GzjtZKVQ.png" /><figcaption><a href="https://raw.githubusercontent.com/mindspore-lab/mindaudio/main/tests/result/stft_magnitude.png">Image Reference</a></figcaption></figure><p>Upon completing the steps, we can derive the spectrogram from the provided audio file. A spectrogram is a visual representation that displays the frequency components of sound in the time-frequency domain. It provides valuable insights into the audio signal’s spectral content over time.</p><p>The Spectogram data we obtained can be used in Speech Information Systems applications:</p><ol><li><strong>Speech Recognition (Automatic Speech Recognition): </strong>Spectrograms can be used to convert voice data into speech text. These systems analyze sound waves to understand speech and create transcripts. It converts spoken words into text format using language models and audio features. ASR is used in many applications such as voice commands, speech recognition systems, voice assistants, and transcription services.</li><li><strong>Speech Non-Speech Detection:</strong> It is a technology that aims to distinguish speech and non-speech parts in audio data. This type of system can analyze audio signals to identify segments containing speech, which can be used in applications such as filtering noise, improving the performance of speech recognition systems, or responding to voice commands.</li><li><strong>Speaker Recognition:</strong> It is a voice-based biometric technology and refers to the process of recognizing a person using their speech characteristics. These systems create a unique voice profile by analyzing individuals’ voice characteristics (intonation, emphasis, speaking rate, etc.). They can be used for speech recognition or verification purposes. It can be used to increase security, implement access control, or provide verification in areas such as telephone banking.</li><li><strong>Text to Speech:</strong> It refers to a technology that converts text data into speech audio. These systems automatically convert written text into speech and create an audio output. TTS is often used in user interfaces, audiobooks, telephone responses, navigation systems, and other voice-based applications.</li><li><strong>Language Identification Models: </strong>These refer to models that enable the detection of the spoken language in audio data. These models analyze audio recordings to determine which language is being spoken. It is used in voice-based applications, multilingual environments, or transcription services. These models allow performing various language-based operations thanks to accurate identification of the spoken language.</li></ol><h3>Conclusion</h3><p>In this article, we touched upon how MindSpore Audio is used in audio processing applications and how the audio preprocessing stages are performed. MindSpore Audio is a library used to manage audio processing models, manipulate audio datasets, and perform various audio processing tasks. If you want to learn more about Mindspore and MindAudio, you can visit the MindSpore website.</p><p>See you in our next article :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*QwxmjkbTYx1pFJF3-aF72g.gif" /><figcaption><a href="https://s3.amazonaws.com/media.muckrack.com/mrdaily/site/images/2018/02/07/giphy-downsized-68.gif">Image Reference</a></figcaption></figure><h3>References</h3><p><a href="https://github.com/mindspore-lab/mindaudio/tree/main">GitHub - mindspore-lab/mindaudio: A toolbox of audio models and algorithms based on MindSpore</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e69efce7765f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers/basics-of-audio-processing-e69efce7765f">Basics of Audio Processing</a> was originally published in <a href="https://medium.com/huawei-developers">Huawei Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Advanced Feature of pyACL — DVPP]]></title>
            <link>https://medium.com/huawei-developers/advanced-feature-of-pyacl-dvpp-f592b8baf7c3?source=rss-d0b743c57bf1------2</link>
            <guid isPermaLink="false">https://medium.com/p/f592b8baf7c3</guid>
            <category><![CDATA[inference]]></category>
            <category><![CDATA[pre-processing]]></category>
            <category><![CDATA[dvpp]]></category>
            <category><![CDATA[cann]]></category>
            <category><![CDATA[pyacl]]></category>
            <dc:creator><![CDATA[Serkan Celik]]></dc:creator>
            <pubDate>Fri, 01 Dec 2023 13:09:02 GMT</pubDate>
            <atom:updated>2023-12-01T13:09:02.780Z</atom:updated>
            <content:encoded><![CDATA[<h3>Advanced Feature of pyACL — DVPP</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6_f4-o1K5Ydk8RYCSzzuBg.png" /><figcaption><a href="https://assets-global.website-files.com/5d7b77b063a9066d83e1209c/627d122b8fdb884d672952bf_61f7bfab94334458028eec7d_data-preprocessing-cover.png">Image Reference</a></figcaption></figure><h3>Introduction</h3><p>Hi! In this article, we will examine what we can do more with the pyACL API. The subject we will consider will be the data preprocessing stages. The data preprocessing stage is an important point of artificial intelligence models. It is widely used during the training of models, during inference scenarios of trained models, and in the development of applications.</p><p>If you want to start with the basics of pyACL, how it works, application flow charts, allocation of “NPU” resources, and simple examples, you can take a look at the <a href="https://medium.com/huawei-developers/introduction-of-pyacl-api-3e856a399d16">Introduction of pyACL API</a> article.</p><h3>Typical Scenarios</h3><p>The resolution and format of the source image or video can be processed to meet the model requirements. The following is an example of a typical scenario.</p><h4>Video decoding and resizing</h4><p>Let’s imagine we have a YOLOv3 model for the object detection task. The input video is in H.264/H.265 encoding format and the resolution is 1920x1080. The YOLOv3 model requires an RGB or YUV input image with a resolution of 416x416. In this case, we should process the video as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*boenT3TdNNCWrONTuOLmZQ.jpeg" /><figcaption><a href="https://www.hiascend.com/doc_center/source/en/canncommercial/601/inferapplicationdev/aclpythondevg/figure/en-us_image_0000001456018877.png">Image Reference</a></figcaption></figure><h4>Image decoding, resizing, and format conversion</h4><p>Let’s imagine we have a ResNet-50 model for the classification task. The input image is in JPEG format and the resolution is 1280x720. The ResNet-50 model requires an RGB input image with a resolution of 224x224. In this case, we should process the image as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*xRWQq43zIxWjPbiVBBEucw.jpeg" /><figcaption><a href="https://www.hiascend.com/doc_center/source/en/canncommercial/601/inferapplicationdev/aclpythondevg/figure/en-us_image_0000001405339244.png">Image Reference</a></figcaption></figure><h4>Image cropping, resizing, and format conversion</h4><p>Let’s imagine we have a ResNet-50 model for the classification task. The input image is in YUV420SP format and the resolution is 1280x720. The ResNet-50 model requires an RGB input image with a resolution of 224x224. In this case, we should process the image as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*bGudRSktOUiOCaV7vxFEPA.jpeg" /><figcaption><a href="https://www.hiascend.com/doc_center/source/en/canncommercial/601/inferapplicationdev/aclpythondevg/figure/en-us_image_0000001455579053.png">Image Reference</a></figcaption></figure><p>We can give more examples of this process. As we can see, the data preprocessing stage is important for AI models. Because if we want to make inference processes for AI models we need to meet the needs of model input.</p><h4>Data Processing Modes</h4><p>Ascend CANN provides two image/video data processing modes these modes namely DVPP &amp; AIPP. DVPP meaning is <strong>Digital Vision Pre-Processing</strong> and AIPP meaning is <strong>Artificial Intelligence Pre-Processing</strong>. AIPP and DVPP can be used separately or together. In combined applications, DVPP is used first to decode, crop, and resize images or videos. However, due to DVPP hardware restrictions, the image format and resolution after DVPP may not meet the model requirements. Therefore AIPP is required to further perform <strong>color space conversion</strong> (CSC), <strong>image cropping</strong>, and <strong>border making</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tx6r7Vrn3VEvKrothOfoeA.jpeg" /><figcaption><a href="https://www.hiascend.com/document/detail/en/canncommercial/601/inferapplicationdev/aclpythondevg/aclpythondevg_0037.html#:~:text=Image/Video%20Data%20Processing%20Mode">Image Reference</a></figcaption></figure><h4>Function Support</h4><p>pyACL provides different media data processing APIs. The types of functions provided are as follows;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PSYV2C0c-Lce2cu72NCK-w.png" /><figcaption><a href="https://www.hiascend.com/document/detail/en/canncommercial/601/inferapplicationdev/aclpythondevg/aclpythondevg_0037.html#:~:text=Function%20description">Image Reference</a></figcaption></figure><p>Let’s give an example of what we can do with VPC. First, we can start by talking about the API call sequence. As an example, let’s consider a scenario where we do the cropping and resizing before sending our input image to our model inputs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*VykNzfzLhD3HffQ7WEiysA.png" /><figcaption><a href="https://www.hiascend.com/document/detail/en/canncommercial/601/inferapplicationdev/aclpythondevg/aclpythondevg_0043.html#:~:text=Figure%201-,Cropping%20and%20resizing,-The%20key%20APIs">Image Reference</a></figcaption></figure><p>As we see in the call sequence chart, we can start with creating a channel for starting image data processing. After creating the channel we need to create the ROI position configuration, and resizing configuration, respectively.</p><p>Before starting the cropping and resizing stage, we need to allocate buffers for storing input or output data. For this reason, we need to allocate device buffers for every image file. At this point, we are ready to perform cropping and resizing.</p><p>About the cropping stage, we can call asynchronous API to crop selected ROI from an input image. Another process that we can perform is the cropping and pasting process. We can call the <strong>dvpp_vpc_crop_and_paste</strong> function for making a crop a selected ROI from the input image, and paste the crop ROI to the specified area in the target image as the output image.</p><p>About the resizing stage, we can call the asynchronous API <strong>dvpp_vpc_resize_async</strong> function for resizing the input image. We shouldn’t forget to call the <strong>synchronize_stream </strong>function until all tasks in the specified stream are complete.</p><p>After finishing the cropping, and resizing processes, we need to deallocate the buffers that we allocated in the first stage. We can call the <strong>dvpp_free</strong> function for deallocating resources.</p><p>Lastly, we need to delete ROI configurations and resize configurations respectively. After deleting configurations we can delete channel and channel description information too.</p><p>To clarify the whole process, let’s look at a simple example of cropping with DVPP. In this way, we can understand better the whole process.</p><h4>Cropping Example for DVPP</h4><p>Firstly we need to call acl library to start the cropping process.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/01a225e014b04e9a812950eb1dd93506/href">https://medium.com/media/01a225e014b04e9a812950eb1dd93506/href</a></iframe><p>We need to allocate the runtime resources. Respectively we need to allocate <a href="https://medium.com/huawei-developers/introduction-of-pyacl-api-3e856a399d16#:~:text=device%2C%20stream%2C%20and%20context">device, context, and stream</a>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4bdb397d75f28bf14529a0c4cd92a967/href">https://medium.com/media/4bdb397d75f28bf14529a0c4cd92a967/href</a></iframe><p>As we mentioned in the development chart section, we need to define crop area configurations. In this stage, we are defining the ROI of the crop area.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/46a07535b49e4b6fcc1cd29ecb75145f/href">https://medium.com/media/46a07535b49e4b6fcc1cd29ecb75145f/href</a></iframe><p>Also, we need to create a data processing channel. With the <strong>dvpp_create_channel_desc() </strong>function we can create this processing channel.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/43a57fcd15ac4dd020fd4d4d11f31f06/href">https://medium.com/media/43a57fcd15ac4dd020fd4d4d11f31f06/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0aea03611a4579f4186a3ae631053603/href">https://medium.com/media/0aea03611a4579f4186a3ae631053603/href</a></iframe><p>According to the data processing chart; the next stage should be creating input/output image descriptions. We should create our input and output image descriptions after creating channel descriptions.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/70c8dd90b922910d70541469ff2e3833/href">https://medium.com/media/70c8dd90b922910d70541469ff2e3833/href</a></iframe><p>After defining every stage, we can start the cropping process using DVPP. We should call the <strong>dvpp_vpc_crop_async()</strong> function first after that we need to synchronize the process. For this purpose, we can call the <strong>synchronize_stream()</strong> function.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/35f1e4c7384c85ba0934dd77c89417f9/href">https://medium.com/media/35f1e4c7384c85ba0934dd77c89417f9/href</a></iframe><p>At this part, we need to destroy the allocated resources that we allocated. Respectively, input/output descriptions of the image, buffer resources, channel, and channel descriptions should be removed from memory. We can control the process with ret codes. If the ret codes take the “0” value after destroying processes, it means our process has ended successfully.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1b1c031789b769be77a1dd198920d819/href">https://medium.com/media/1b1c031789b769be77a1dd198920d819/href</a></iframe><p>Similarly, with destroying description information, we need to deallocate <a href="https://medium.com/huawei-developers/introduction-of-pyacl-api-3e856a399d16#:~:text=device%2C%20stream%2C%20and%20context">stream, context, and device</a> resources respectively.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3aa6ff16bf59efeea789a14dfcf91783/href">https://medium.com/media/3aa6ff16bf59efeea789a14dfcf91783/href</a></iframe><p>In the last part, we need to finalize the “acl” sources.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ab4da2e2f9bee76092f7cbd75d0b7491/href">https://medium.com/media/ab4da2e2f9bee76092f7cbd75d0b7491/href</a></iframe><p>End of this pre-processing flow we can get our pre-processed image data. We can use our data for the <a href="https://medium.com/huawei-developers/introduction-of-pyacl-api-3e856a399d16#:~:text=Typical%20API%20Call%20Sequence">model inference</a> stage.</p><h3>Result</h3><p>We learned the basics of the Digital Vision Pre-Processing feature with pyACL API. We can use these asynchronous DVPP functions pre-processing stages on NPU devices. Using DVPP functions will able to us get faster pre-processing times on NPU devices. For more details, you can check the references section.</p><p>See you in the next articles :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*RqGNXn6-ArD6hrU05PNEYw.gif" /><figcaption><a href="https://cdn.dribbble.com/users/4920152/screenshots/15473655/media/59f15875c47d355bc0b1661a51214adc.gif">Image Reference</a></figcaption></figure><h3>References</h3><p><a href="https://www.hiascend.com/document/detail/en/canncommercial/601/inferapplicationdev/aclpythondevg/aclpythondevg_0037.html">昇腾社区-官网丨昇腾万里 让智能无所不及</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f592b8baf7c3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers/advanced-feature-of-pyacl-dvpp-f592b8baf7c3">Advanced Feature of pyACL — DVPP</a> was originally published in <a href="https://medium.com/huawei-developers">Huawei Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PyACL ile Veri İşleme — DVPP]]></title>
            <link>https://medium.com/huawei-developers-tr/pyacl-ile-veri-i%CC%87%C5%9Fleme-dvpp-9024c0894967?source=rss-d0b743c57bf1------2</link>
            <guid isPermaLink="false">https://medium.com/p/9024c0894967</guid>
            <category><![CDATA[preprocesing]]></category>
            <category><![CDATA[pyacl]]></category>
            <category><![CDATA[cann]]></category>
            <category><![CDATA[dvpp]]></category>
            <category><![CDATA[inference]]></category>
            <dc:creator><![CDATA[Serkan Celik]]></dc:creator>
            <pubDate>Fri, 01 Dec 2023 13:06:23 GMT</pubDate>
            <atom:updated>2023-12-01T13:06:23.313Z</atom:updated>
            <content:encoded><![CDATA[<h3>PyACL ile Veri İşleme— DVPP</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*RvBkj027q3TFZEccHTLaJQ.png" /><figcaption><a href="https://assets-global.website-files.com/5d7b77b063a9066d83e1209c/627d122b8fdb884d672952bf_61f7bfab94334458028eec7d_data-preprocessing-cover.png">Görsel Referansı</a></figcaption></figure><h3>Giriş</h3><p>Merhaba! Bu yazımızda, pyACL API ile daha fazla neler yapabileceğimizi inceleyeceğiz. Ele alacağımız konu veri ön işleme aşamaları olacaktır. Veri ön işleme aşaması, yapay zeka modellerinin önemli bir noktasıdır. Modellerin eğitimi sırasında, eğitilmiş modellerin çıkarım senaryoları sırasında ve uygulamaların geliştirilmesinde yaygın olarak kullanılır.</p><p>pyACL’nin temelleri, nasıl çalıştığı, uygulama akış şemaları, “NPU” kaynaklarının tahsisi ve basit örneklerden başlamak isterseniz, <a href="https://medium.com/huawei-developers-tr/pyacl-apia-giri%C5%9F-4305d5c0d6f8">pyACL API’a Giriş</a> yazısına göz atabilirsiniz.</p><h3>Tipik Seneryolar</h3><p>Kaynak görüntünün veya videonun çözünürlüğü ve biçimi, model gereksinimlerini karşılamak için işlenebilir. Örnek olarak tipik bir senaryoya göz atalım.</p><h4>Video Çözme ve yeniden boyutlandırma</h4><p>Nesne algılama görevi için bir YOLOv3 modelimiz olduğunu düşünelim. Giriş videosunun da H.264 / H.265 kodlama formatında ve çözünürlüğün 1920x1080 olduğunu düşünelim. YOLOv3 modelinden çıkarım almak için 416x416 çözünürlüğe sahip bir RGB veya YUV giriş görüntüsüne ihtiyacımız vardır. Bu durumda, videoyu aşağıdaki gibi işlememiz gerekir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*boenT3TdNNCWrONTuOLmZQ.jpeg" /><figcaption><a href="https://www.hiascend.com/doc_center/source/en/canncommercial/601/inferapplicationdev/aclpythondevg/figure/en-us_image_0000001456018877.png">Görsel Referansı</a></figcaption></figure><h4>Görüntü çözme, yeniden boyutlandırma ve format dönüştürme</h4><p>Sınıflandırma görevi için bir ResNet-50 modelimiz olduğunu varsayalım. Giriş görüntümüzü de JPEG formatında ve çözünürlüğünü de 1280x720 olarak düşünelim. ResNet-50 modeli, 224x224 çözünürlüğe sahip bir RGB giriş görüntüsü gerektirir. Bu durumda, görüntüyü aşağıdaki gibi işlemeliyiz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*xRWQq43zIxWjPbiVBBEucw.jpeg" /><figcaption><a href="https://www.hiascend.com/doc_center/source/en/canncommercial/601/inferapplicationdev/aclpythondevg/figure/en-us_image_0000001405339244.png">Görsel Referansı</a></figcaption></figure><h4>Görüntü kırpma, yeniden boyutlandırma ve format dönüştürme</h4><p>Aynı şekilde sınıflandırma görevi için bir ResNet-50 modelimiz olduğunu varsayalım. Giriş görüntüsünü YUV420SP formatında ve çözünürlüğünü de 1280x720 olarak düşünelim. ResNet-50 modeli, 224x224 çözünürlüğe sahip bir RGB giriş görüntüsü gerektirir. Bu durumda, görüntüyü aşağıdaki gibi işlememiz gerekmekte.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*bGudRSktOUiOCaV7vxFEPA.jpeg" /><figcaption><a href="https://www.hiascend.com/doc_center/source/en/canncommercial/601/inferapplicationdev/aclpythondevg/figure/en-us_image_0000001455579053.png">Görsel Referansı</a></figcaption></figure><p>Bu süreç hakkında daha fazla örnek verebiliriz. Görüldüğü gibi, veri ön işleme aşaması AI modelleri için önemlidir. Çünkü yapay zeka modelleri için çıkarım süreçleri yapmak istiyorsak, model girdisinin ihtiyaçlarını karşılamamız gerekiyor.</p><h4>Veri İşleme Metodları</h4><p>Ascend CANN, DVPP ve AIPP olarak adlandırılan iki görüntü / video veri işleme modu sağlar. DVPP, <strong>Digital Vision Pre-Processing</strong> ve AIPP, <strong>Artificial Intelligence Pre-Processing</strong> ifadesinin kısaltmasıdır. AIPP ve DVPP ayrı ayrı veya birlikte kullanılabilir. Kombine uygulamalarda, DVPP ilk olarak görüntüleri veya videoları çözmek, kırpmak ve yeniden boyutlandırmak için kullanılır. Bununla birlikte, DVPP donanım kısıtlamaları nedeniyle, DVPP’den sonraki görüntü formatı ve çözünürlüğü model gereksinimlerini karşılamayabilir. Bu nedenle AIPP, <strong>renk alanı dönüştürme (CSC)</strong>, <strong>görüntü kırpma</strong> ve <strong>sınır oluşturma</strong> için gereklidir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S5uWxfhSgy14-6xcSromhw.jpeg" /><figcaption><a href="https://www.hiascend.com/document/detail/en/canncommercial/601/inferapplicationdev/aclpythondevg/aclpythondevg_0037.html#:~:text=Image/Video%20Data%20Processing%20Mode">Görsel Referansı</a></figcaption></figure><h4>İşlev Destekleri</h4><p>pyACL farklı medya veri işleme API’leri sağlar. Sağlanan fonksiyon türleri şöyledir;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_0h56GDRuqbc20cEzDbYbA.jpeg" /><figcaption><a href="https://www.hiascend.com/document/detail/en/canncommercial/601/inferapplicationdev/aclpythondevg/aclpythondevg_0037.html#:~:text=Function%20description">Görsel Referansı</a></figcaption></figure><p>VPC ile neler yapabileceğimize bir örnek verelim. İlk olarak, API çağrı dizisi hakkında konuşarak başlayabiliriz. Örnek olarak, giriş resmimizi model girişlerimize göndermeden önce kırpma ve yeniden boyutlandırma yaptığımız bir senaryo düşünelim.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1qZHoevCdTEh3wLQZmKpuQ.png" /><figcaption><a href="https://www.hiascend.com/document/detail/en/canncommercial/601/inferapplicationdev/aclpythondevg/aclpythondevg_0043.html#:~:text=Figure%201-,Cropping%20and%20resizing,-The%20key%20APIs">Görsel Referansı</a></figcaption></figure><p>Çağrı sırası çizelgesinde gördüğümüz gibi, veri işlemeye başlamak için bir kanal oluşturarak başlayabiliriz. Kanalı oluşturduktan sonra, sırasıyla ROI konum yapılandırmasını ve yapılandırmayı yeniden boyutlandırmayı oluşturmamız gerekir.</p><p>Kırpma ve yeniden boyutlandırma aşamasına başlamadan önce, giriş veya çıkış verilerini depolamak için arabellekler ayırmamız gerekir. Bu nedenle, her resim dosyası için cihaz arabellekleri ayırmamız gerekir. İşlemlerimizi gerçekleştirdikten sonra, kırpma ve yeniden boyutlandırma yapmaya hazırız demektir.</p><p>Kırpma aşaması hakkında, bir giriş görüntüsünden seçilen ROI’yi kırpmak için API’yi çağırabiliriz. Yapabileceğimiz bir diğer işlem ise kırpma ve yapıştırma işlemidir. Girdi görüntüsünden seçilen bir ROI kırpma yapmak için <strong>dvpp_vpc_crop_and_paste</strong> işlevini çağırabilir ve kırpma ROI’sini hedef görüntüde çıkış görüntüsü olarak belirtilen alana yapıştırabiliriz.</p><p>Yeniden boyutlandırma aşaması hakkında, giriş görüntüsünü yeniden boyutlandırmak için <strong>dvpp_vpc_resize_async</strong> işlevini çağırabiliriz. Belirtilen akıştaki tüm görevler tamamlanana kadar <strong>synchronize_stream</strong> işlevini çağırmayı unutmamalıyız.</p><p>Kırpma ve yeniden boyutlandırma işlemlerini bitirdikten sonra, ilk aşamada tahsis ettiğimiz kaynakları kaldırmamız gerekir. Kaynakları kaldırmak için <strong>dvpp_free</strong> fonksiyonunu çağırabiliriz.</p><p>Son olarak, ROI yapılandırmalarını silmemiz ve yapılandırmaları sırasıyla yeniden boyutlandırmamız gerekir. Yapılandırmaları sildikten sonra kanal ve kanal açıklama bilgilerini de silebiliriz.</p><p>Tüm süreci açıklığa kavuşturmak için, DVPP ile basit bir kırpma örneğine bakalım. Bu sayede tüm süreci daha iyi anlayabiliriz.</p><h4>DVPP ile Resim Kırpma Örneği</h4><p>Kırpma işlemini başlatmak için acl kütüphanesini çağırmamız gerekiyor.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5d800884859628042a00bd5d6877168b/href">https://medium.com/media/5d800884859628042a00bd5d6877168b/href</a></iframe><p>Çalışma zamanı kaynaklarını ayırmamız gerekiyor. Sırasıyla, <a href="https://medium.com/huawei-developers-tr/pyacl-apia-giri%C5%9F-4305d5c0d6f8#:~:text=cihaz(device)%2C%20ak%C4%B1%C5%9F(stream)%20ve%20ba%C4%9Flam(context)">cihazı, bağlamı ve akışı</a> ayırmamız gerekir.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8ac63c529845cc1b43aba9956feea952/href">https://medium.com/media/8ac63c529845cc1b43aba9956feea952/href</a></iframe><p>Çağrı sırası çizelgesinde belirttiğimiz gibi, kırpma alanı konfigürasyonlarını tanımlamamız gerekiyor. Bu aşamada, kırpma alanının ROI’sini tanımlıyoruz.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4df3306481f249d65472bbb4f391083e/href">https://medium.com/media/4df3306481f249d65472bbb4f391083e/href</a></iframe><p>Ayrıca, bir veri işleme kanalı oluşturmamız gerekiyor. <strong>dvpp_create_channel_desc()</strong> fonksiyonu ile bu işlem kanalını oluşturabiliriz.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/84e4ed2df74fdfdf087c864733cefb53/href">https://medium.com/media/84e4ed2df74fdfdf087c864733cefb53/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/aebeab636e08eb7f643cf36d38688959/href">https://medium.com/media/aebeab636e08eb7f643cf36d38688959/href</a></iframe><p>Veri işlem şemasına göre; bir sonraki aşama giriş/çıkış görüntü tanımlarını oluşturma olmalıdır. Kanalı oluşturduktan sonra giriş ve çıkış verisi için bilgileri içeren bir kanal oluşturmalıyız.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2c31b42cf68d504626e887b2decc5932/href">https://medium.com/media/2c31b42cf68d504626e887b2decc5932/href</a></iframe><p>Her aşamayı tanımladıktan sonra, DVPP kullanarak kırpma işlemine başlayabiliriz. Önce <strong>dvpp_vpc_crop_async()</strong> fonksiyonunu çağırmalıyız, bundan sonra işlemi eşitlememiz gerekir. Bu amaçla <strong>synchronize_stream()</strong> fonksiyonunu çağırabiliriz.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/96b76bf480ac19316ffcdf246b37078b/href">https://medium.com/media/96b76bf480ac19316ffcdf246b37078b/href</a></iframe><p>Bu kısımda, tahsis ettiğimiz kaynakları yok etmemiz gerekiyor. Sırasıyla, görüntünün giriş/çıkış açıklamaları, arabellek kaynakları, kanal ve kanal açıklamaları bellekten kaldırılmalıdır. <strong>“ret”</strong> kodları süreci kontrol etmemizi sağlayacak bilgilendirme kodları içerir. Ret kodları süreçleri yok ettikten sonra “0” değerini alırsa, işlemimiz başarıyla sonlanmış demektir.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a20c3b0054abd2fa88587415517d3b4d/href">https://medium.com/media/a20c3b0054abd2fa88587415517d3b4d/href</a></iframe><p>Benzer şekilde, açıklama bilgilerini yok ederek, sırasıyla <a href="https://medium.com/huawei-developers-tr/pyacl-apia-giri%C5%9F-4305d5c0d6f8#:~:text=cihaz(device)%2C%20ak%C4%B1%C5%9F(stream)%20ve%20ba%C4%9Flam(context)">akış, bağlam ve cihaz</a> kaynaklarını kaldırmamız gerekir.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7f9b796b58fb10eff3f49407688d47d6/href">https://medium.com/media/7f9b796b58fb10eff3f49407688d47d6/href</a></iframe><p>Son kısımda ise “acl” kaynaklarını sonlandırmamız/kaldırmamız gerekiyor.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3d2d3576afa32b13dde5ef44883feaca/href">https://medium.com/media/3d2d3576afa32b13dde5ef44883feaca/href</a></iframe><p>Bu ön işleme akışının sonunda, önceden işlenmiş görüntü verilerimizi alabiliriz. Verilerimizi <a href="https://medium.com/huawei-developers-tr/pyacl-apia-giri%C5%9F-4305d5c0d6f8#:~:text=ve%20sonland%C4%B1rma.-,API%20%C3%87al%C4%B1%C5%9Fma%20Sekans%C4%B1,-G%C3%B6rsel%20Referans%C4%B1">model çıkarım aşaması</a> için kullanabiliriz.</p><h3>Sonuç</h3><p>Digital Vision Pre-Processing özelliğinin temellerini pyACL API ile öğrendik. Bu DVPP fonksiyonlarını NPU cihazlarında ön işleme aşamalarını kullanabiliriz. DVPP işlevlerini kullanmak, NPU cihazlarında daha hızlı ön işleme süreleri elde etmemizi sağlayacaktır. Daha fazla bilgi için, referanslar bölümünü kontrol edebilirsiniz.</p><p>Gelecek yazılarda görüşmek üzere :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*RqGNXn6-ArD6hrU05PNEYw.gif" /><figcaption><a href="https://cdn.dribbble.com/users/4920152/screenshots/15473655/media/59f15875c47d355bc0b1661a51214adc.gif">Görsel Referansı</a></figcaption></figure><h3>Kaynaklar</h3><p><a href="https://www.hiascend.com/document/detail/en/canncommercial/601/inferapplicationdev/aclpythondevg/aclpythondevg_0037.html">昇腾社区-官网丨昇腾万里 让智能无所不及</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9024c0894967" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers-tr/pyacl-ile-veri-i%CC%87%C5%9Fleme-dvpp-9024c0894967">PyACL ile Veri İşleme — DVPP</a> was originally published in <a href="https://medium.com/huawei-developers-tr">Huawei Developers - Türkiye</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ascend Full-Stack AI Yazılım/Donanım Platformu]]></title>
            <link>https://medium.com/huawei-developers-tr/ascend-full-stack-ai-yaz%C4%B1l%C4%B1m-donan%C4%B1m-platformu-44e633a46239?source=rss-d0b743c57bf1------2</link>
            <guid isPermaLink="false">https://medium.com/p/44e633a46239</guid>
            <category><![CDATA[ascend]]></category>
            <category><![CDATA[cann]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[npu]]></category>
            <category><![CDATA[mindspore]]></category>
            <dc:creator><![CDATA[Serkan Celik]]></dc:creator>
            <pubDate>Thu, 09 Feb 2023 12:51:41 GMT</pubDate>
            <atom:updated>2023-02-09T12:51:41.612Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3TXvpqC2Ugx6_ez9La4lgQ.jpeg" /><figcaption><a href="https://blog.huawei.com/wp-content/uploads/2019/01/20190130-155055eSpace.jpg">Görsel Referansı</a></figcaption></figure><h4>Giriş</h4><p>Merhaba! Huawei Ascend Full-Stack AI Platformu yazımız ile sizlerleyiz. Bu yazımızda; Huawei Ascend çiplerinin yapısından, cihazlarından ve yazılımlarından bahsedeceğiz.</p><p>Yapay zeka ile yapılan uygulamalar son yıllarda neredeyse her yerde karşımıza çıkmaya başladı. Bu tür uygulamalarda kullanılan yapay zeka modellerinin daha hızlı eğitilmesi ve sonuç üretmesi için yüksek hesaplama gücüne sahip olmamız gerekiyor. Çoğu insan GPU’ların yapay zeka uygulamaları için vazgeçilmez altyapılar olduğunu bilir. Peki ya <a href="https://medium.com/huawei-developers-tr/huawei-ascend-gelece%C4%9Fi-%C5%9Fekillendiren-teknoloji-npu-b1c3e426d729">NPU</a>’lar?</p><p>NPU(Neural Processing Unit), Huawei tarafından geliştirilen yüksek hesaplama gücüne sahip bir donanım olarak karşımıza çıkıyor. Huawei, geliştirdiği Da Vinci Mimarisi ile yapay zeka uygulamalarında fark yaratan bir performans sunuyor.</p><p>Huawei’nin Atlas ailesi olarak adlandırdığı cihazlarında NPU’ları kullanmakta. Cihazlardan bahsetmeden önce Da Vinci Mimarisine yakından göz atalım.</p><h4><a href="https://support.huaweicloud.com/intl/en-us/odevg-A800_9000_9010/atlaste_10_0009.html">Huawei Da Vinci Mimarisi</a></h4><p>Yapay zeka modellerinin eğitimi sırasında modellerin eğitilebilmesi ve sonuç üretebilmesi için çok boyutlu matrisler matematiksel işlemlerden geçmektedir. Huawei, bu durumu göz önüne alarak Da Vinci Mimarisini geliştirdi. Küp hesaplama birimlerinin çipin %85inden fazlasında kullanılması ile birlikte yapay zeka uygulamalarında fark yaratan bir performans yakalanmış oldu. Huawei, Da Vinci Mimarisi’ne dayanarak ilk olarak Ascend 910 ve Ascend 310 yongalarını piyasaya sürdü.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VhHgVKQhwi35wzJzl7rOgw.png" /><figcaption>Da Vinci Mimarisi</figcaption></figure><h4><a href="https://e.huawei.com/en/products/computing/ascend/atlas-200-ai"><strong>Atlas 200 AI Accelerator Module</strong></a></h4><p>Atlas 200 AI Accelerator Module, video analizi ve yapay zeka uygulalarını çalıştırmak için Ascend 310 AI işlemcisini kullanmaktadır. İçerisinde bulunan Ascend 310 çipi INT8 hesaplamalarda 22 TOPS hesaplama gücü sunmaktadır. Yüksek hesaplama kapasitesinin yanısıra çalışma sıcaklığının -25°C — 80°C arasında olması ekstrem koşullarda da çalışabilmesini sağlıyor. Düşük güç tüketimi, kompakt boyutlar ve çalışma sıcaklığı aralığı Atlas 200 AI Accelerator Modülünü “edge” seneryolar için birebir yapmakta.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*hU53io9qNbKxZPAQOV3lvg.png" /><figcaption><a href="https://e.huawei.com/tr/material/datacenter/server/740747871439431a81843da6906181d8">Görsel Referansı</a></figcaption></figure><h4><a href="https://e.huawei.com/en/products/computing/ascend/atlas-200"><strong>Atlas 200 DK AI Developer Kit</strong></a></h4><p>Ascend 310 NPU ile AI uygulamalarını çalıştırmak ister misiniz? İşte Atlas 200 DK. Bu geliştirici kiti, Atlas 200 AI Accelerator modülünü içermektedir. Atlas 200 AI Accelerator modülünün gücünü kullanmak için iyi tasarlanmış bir donanım ortamına sahiptir. Kullanıcıların güçlü işlem kapasitesine hızlı ve kolay bir şekilde erişmelerini sağlamak için çevresel arayüzler sağlar. Kolay biçimde erişebileceğiniz çevresel arayüzler ile yapay zeka modellerinizi Ascend yazılım altyapısı ile çalıştırabilirsiniz. Huawei’nin geliştirdiği <a href="https://www.hiascend.com/zh/software/mindstudio">MindStudio</a> IDE sini kullanarak bu cihaz ile yapay zeka uygulamaları geliştirebilirsiniz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*Zi4hnqd--TlPra78jH7zHQ.png" /><figcaption><a href="https://e.huawei.com/tr/material/datacenter/server/740747871439431a81843da6906181d8">Görsel Referansı</a></figcaption></figure><h4><a href="https://e.huawei.com/en/products/computing/ascend/atlas-300-ai"><strong>Atlas 300I Inference Card</strong></a></h4><p>Çıkarım senaryoları için daha fazla hesaplama gücüne ihtiyacınız varsa Atlas 300I Inference Card ihtiyacınızı karşılayabilir. Bu kart, güçlü çıkarım senaryoları arayanlar için geliştirilmiştir. Tek bir kart ile INT8 hesaplamalarda 88 TOPS hesaplama kapasitesi sağlamaktadır ve 80 kanallı HD videoların (1080p 25 FPS) gerçek zamanlı analizini desteklemektedir. Yüksek kapasiteli ve yüksek bant genişliğine sahip hafızaya sahiptir. Bu sayede yapay zeka uygulamalarının gecikmesini azaltabilmektedir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LfY0LrUe4CV3rbQ5EDqYKA.png" /><figcaption><a href="https://e.huawei.com/tr/material/datacenter/server/740747871439431a81843da6906181d8">Görsel Referansı</a></figcaption></figure><h4><a href="https://www.hiascend.com/hardware/accelerator-card">Atlas 300I Pro Inference Card</a></h4><p>Atlas 300I Pro Inference Card ile INT8 hesaplamalarda 140 TOPS hesaplama kapasitesi elde edebiliriz. Üstün bilgi işlem gücü, ultra yüksek enerji verimliliği, yüksek performanslı özellik alımı ve güvenli önyükleme gibi avantajlarla öne çıkan bu çıkarım kartı yüksek güce ihtiyaç duyan yapay zeka uygulamalarında kullanılmak için iyi bir seçim olacaktır.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VFNYLAlKfzBFzhIGjLH5QQ.png" /><figcaption><a href="https://e.huawei.com/tr/material/datacenter/server/740747871439431a81843da6906181d8">Görsel Referansı</a></figcaption></figure><h4><a href="https://www.hiascend.com/hardware/accelerator-card">Atlas 300V Pro Video Analysis Card</a></h4><p>Video analizi hakkında projelerinizde, video gruplarını kontrol etmeniz gerekiyorsa Atlas 300V Pro kart ihtiyaçlarınızı karşılayabilir. Genel amaçlı işlemci, AI Core ve codec bileşenlerini entegre ederek, AI çıkarımı ve video / görüntü kodlama ve kod çözme görevleri için mükemmeldir. Atlas 300V Pro 128 kanallı HD videoların (1080p 25 FPS) gerçek zamanlı analizini desteklemektedir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b69bFSial9PNZSoFDt79AA.png" /><figcaption><a href="https://e.huawei.com/tr/material/datacenter/server/740747871439431a81843da6906181d8">Görsel Referansı</a></figcaption></figure><h4><a href="https://e.huawei.com/en/products/computing/ascend/atlas-300t-training-9000">Atlas 300T Training Card</a></h4><p>Yapay zeka modelinizi yüksek hızda eğitmeniz gerekiyorsa, Atlas 300T Training Card ihtiyacınızı karşılayabilir. Ascend 910 AI NPU tarafından desteklenen bu kart, dünyanın en büyük tek yongalı bilgi işlem kapasitesine sahiptir. CANN yazılım çözümleri ile yapay zeka model eğitiminde yüksek performans ile modellerinizi eğitebilirsiniz. Tek bir kart ile FP16 hesaplamalarda 280 TOPS bilgi işlem gücü sunabilmektedir. İçerdiği yüksek kapasiteli hafıza ile model eğitimi ve gradyan senkronizasyonu sırasında yüksek performans sunmaktadır.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*lg1DARaTLvKtHZW83oarQA.png" /><figcaption><a href="https://e.huawei.com/tr/material/datacenter/server/740747871439431a81843da6906181d8">Görsel Referansı</a></figcaption></figure><h4><a href="https://e.huawei.com/en/products/computing/ascend/atlas-500">Atlas 500 AI Edge Station</a></h4><p>Zorlu koşullar için bir “edge” cihazına mı ihtiyacınız var? Atlas 500 AI Edge Station, zorlu çevresel koşullara sahip edge uygulamaları için tasarlanmıştır. Çok çeşitli “edge” senaryoları için geliştirilmiş bir cihazıdır. Fansız tasarımına rağmen -40 ° C ile + 70 ° C arasında dış mekanda çalışma aralığına sahiptir. INT8 hesaplamalarda 22 TOPS bilgi işlem gücüne olan bu cihaz, içerisinde sunulan yazılımlar ile cloud-edge işbirliği de sunabilmekte. Bu özellikler Atlas 500 AI Edge Station’u “edge” seneryolarda iyi bir seçim haline getirmekte.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*e1pgo1cSA3-CGB9Vjq_4Eg.png" /><figcaption><a href="https://e.huawei.com/tr/material/datacenter/server/740747871439431a81843da6906181d8">Görsel Referansı</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IxDgVxp-aGe4XcpihFm5JQ.gif" /><figcaption><a href="https://forum.huawei.com/enterprise/es/data/attachment/forum/202103/04/112606lkrvrq4owery11s9.gif?AtlasIES_simulador.gif">Atlas 500 AI Edge Station (Intelligent Edge System)</a></figcaption></figure><h4><a href="https://e.huawei.com/en/products/computing/ascend/atlas-500-pro-3000">Atlas 500 Pro AI Edge Server</a></h4><p>Atlas 500 Pro AI Edge Server edge uygulamalar için tasarlanmıştır. Üstün bilgi işlem performansı, güçlü çevresel uyumluluk, kolay bakım ve cloud-edge işbirliğine sahiptir. Birden fazla senaryoda çıkarım gereksinimlerini karşılamak için 4 adede kadar Atlas 300I Inference kartını destekler. Bu sayede 320 kanallı gerçek zamanlı HD (1080p 25 FPS) video analizi yapabilme kapasitesine ulaşabilmektedir. İçerisinde bulunan Kunpeng920 işlemci ile sınırları zorlayacak uygulamaları rahatça çalıştırabilecek server cihazı olarak karşımıza çıkıyor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*g29IVP3u2vxB7GPgaEIekw.png" /><figcaption><a href="https://e.huawei.com/tr/material/datacenter/server/740747871439431a81843da6906181d8">Görsel Referansı</a></figcaption></figure><h4>Atlas 800 Inference Server (<a href="https://e.huawei.com/en/products/computing/ascend/atlas-800-inference-3000">Model 3000</a> —<a href="https://e.huawei.com/en/products/computing/ascend/atlas-800-inference-3010"> Model 3010</a>)</h4><p>Hesaplama gücü kapasitesini artırmak istiyorsanız Atlas 800 Inference Server ile hesaplama gücünüzü artırabilirsiniz. Veri merkezlerinde AI çıkarımı için yaygın olarak kullanılmaktadır. Bu çıkarım sunucusunun 2 modeli vardır. Model 3000 ve model 3010. Model 3000, arm tabanlı Kunpeng920 CPU içerir. 3010 modeli ise x86 tabanlı Intel Xeon CPU içerir. 8 adet Atlas 300I Inference kartını destekleyebilen tasarım yapısı ile 640 kanallı gerçek zamanlı HD (1080p 25 FPS) video analizi yapılabilmesine olanak sağlar. Sunucunun 3000 modeli Kunpeng’in çok çekirdekli, düşük tüketim avantajlarından yararlanarak, inference senaryoları için yüksek verimli AI bilgi işlem platformu sağlar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*6knOoZoz1piN3YfX-qwKnQ.png" /><figcaption><a href="https://e.huawei.com/tr/material/datacenter/server/740747871439431a81843da6906181d8">Görsel Referansı</a></figcaption></figure><h4>Atlas 800 Training Server (<a href="https://e.huawei.com/en/products/computing/ascend/atlas-800-training-9000">Model 9000</a> — <a href="https://e.huawei.com/en/products/computing/ascend/atlas-800-training-9010">Model 9010</a>)</h4><p>300T eğitim kartı hakkında bilgi sahibiyiz ve hesaplama kapasitesinin ne kadar yüksek olduğunu biliyoruz. Model eğitimleri için daha fazla bilgi işlem gücüne ihtiyacımız varsa, Atlas 800 Training sunucusu bunun için iyi bir seçim olacaktır. Çıkarım sunucusunda olduğu gibi bu sunucunun da iki adet modeli vardır. Model 9000 ve model 9010. Model 9000, Kunpeng920 arm tabanlı işlemci ve Ascend 910 NPU ile desteklenmektedir. Model 9010 ise Intel Xeon Gold Serisi işlemci ve Ascend 910 NPU ile desteklenmektedir. Atlas 800 Eğitim Sunucusu, gerçek performansı sunmak için 8 adet Ascend 910 NPU’ya sahiptir. Yüksek hesaplama yoğunluğuna, yüksek enerji verimliliğine ve yüksek ağ bant genişliğine sahiptir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/1*vg7FNH_IgUBWBzNLsbGW2A.png" /><figcaption><a href="https://e.huawei.com/tr/material/datacenter/server/740747871439431a81843da6906181d8">Görsel Referansı</a></figcaption></figure><h4><a href="https://e.huawei.com/en/products/computing/ascend/atlas-900-pod-9000">Atlas 900 PoD</a></h4><p>Atlas 900 PoD, Huawei Ascend 910 NPU’lara ve Kunpeng920 işlemcilerine dayanan AI eğitim kümesinin temel bir birimidir. Güçlü AI hesaplama kapasitesi, optimum AI enerji verimliliği ve optimum AI ölçeklenebilirliğine sahiptir. Atlas 900 PoD, 4096 Ascend 910 işlemciye kadar destek verebilme kapasitesine sahiptir. Atlas 900 PoD’un maksimum kapasitesi ile FP16 hesaplamalarda 1 EFLOPS işlem gücüne ulaşabilirsiniz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*fbPSDVKLfkpQ9yMZUfSYqg.png" /><figcaption><a href="https://e.huawei.com/tr/material/datacenter/server/740747871439431a81843da6906181d8">Görsel Referansı</a></figcaption></figure><p>Bu noktada Huawei Atlas cihazları hakkında temel bilgilere sahibiz. Bildiğimiz üzere donanımsal olarak elde ettiğimiz yüksek hesaplama kapasitesini yazılımlar ile kontrol etmemiz gerekmekte. Huawei, tasarladığı güçlü donanımsal altyapıyı verimli biçimde kullanabilmek adına Heterojen AI Bilgi İşlem Mimarisini ortaya çıkarttı.</p><h4><strong>Heterojen AI Bilgi İşlem Mimarisi</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1rcvwa8aP1jLFRUC74enyg.png" /><figcaption><a href="https://e.huawei.com/it/material/datacenter/server/740747871439431a81843da6906181d8">Huawei Ascend AI</a></figcaption></figure><p>Eğer donanımsal olarak güçlü bir hesaplama kapasitemiz varsa, bu gücü de kontrol etmemiz gerekir. Donanımlar ile sağlanan yüksek performansı kontrol edemiyorsak, kullandığımız cihazlar tam verim ile çalışmayacaktır. Bu noktada Huawei, Heterojen Bilgi İşlem Mimarisini geliştirdi ve bu yazılımı CANN (Compute Architecture for Neural Networks) olarak isimlendirdi. CANN; ACL, DVPP ve HCCL gibi, Ascend NPU’ların bilgi işlem gücünü ortaya çıkartan temel bileşenleri benimser.</p><p>ACL (Ascend Computing Language) yazılımı donanımdan ayıran birleşik bir programlama arayüzüdür, HCCL (Huawei Collective Communication Library), dağıtılmış eğitim senaryolarında Ascend AI işlemcileri arasında efektif veri aktarımını sağlar ve DVPP (Digital Vision Pre-Processing) görüntü ön işleme sırasında paralelliği geliştirmek için donanım ivmelenmesini kullanır.</p><p><strong>Desteklenen Yapay Zeka Yazılım Yapıları</strong></p><p>Ascend Atlas ürünlerinin gücünü kontrol etmek için güçlü bilgi işlem donanımı ve yazılımına sahibiz. Ama sinir ağlarıyla çalışmak için bazı yapay zeka altyapılarına ihtiyacımız var. Huawei Atlas Ascend platformları, Tensorflow, Pytorch gibi 3. parti AI frameworklerini desteklemektedir. Ayrıca Huawei, <a href="https://mindspore.cn/en">MindSpore</a> adında kendi AI altyapısına sahiptir. MindSpore, kolay geliştirme, verimli uygulama ve tüm senaryoları kapsamayı amaçlayan derin öğrenme altyapısıdır.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*_LA8jXDvOrVL56xQeoBTmg.png" /><figcaption><a href="https://e.huawei.com/it/material/datacenter/server/740747871439431a81843da6906181d8">Görsel Referansı</a></figcaption></figure><h4>Sonuç</h4><p>Bu yazımızda Huaweinin geliştirdiği Ascend Atlas ürünleri ve yazılımları hakkında ön bilgiye sahip olduk. Daha fazla bilgi edinmek için <a href="https://www.hiascend.com/en/">bağlantıyı</a> ziyaret edebilirsiniz.</p><p>Gelecek yazılarda görüşmek üzere :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*m-3tfWCJyttDbTGqEjnl3Q.gif" /><figcaption><a href="https://www.gurujieducation.com/vision/images/123.gif">Görsel Referansı</a></figcaption></figure><h4>Referanslar</h4><ul><li><a href="https://www.hiascend.com/software/cann">昇腾社区-官网丨昇腾万里 让智能无所不及</a></li><li><a href="https://www.hiascend.com/hardware/product">昇腾社区-官网丨昇腾万里 让智能无所不及</a></li><li><a href="https://www.huawei.com/en/open-source">Open Source @ Huawei</a></li><li><a href="https://www.hiascend.com/en/">昇腾社区-官网丨昇腾万里 让智能无所不及</a></li><li><a href="https://www.mindspore.cn/en">MindSpore官网</a></li><li><a href="https://www.hiascend.com/document?tag=hardware">昇腾社区-官网丨昇腾万里 让智能无所不及</a></li><li><a href="https://support.huawei.com/enterprise/en/category/ascend-computing-pid-1557196528909?submodel=doc">Ascend Computing Support, Docs &amp; Downloads - Huawei</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=44e633a46239" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers-tr/ascend-full-stack-ai-yaz%C4%B1l%C4%B1m-donan%C4%B1m-platformu-44e633a46239">Ascend Full-Stack AI Yazılım/Donanım Platformu</a> was originally published in <a href="https://medium.com/huawei-developers-tr">Huawei Developers - Türkiye</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[‍ Ascend Full-Stack AI Software/Hardware Platform]]></title>
            <link>https://medium.com/huawei-developers/ascend-full-stack-ai-software-hardware-platform-f012156f7f1a?source=rss-d0b743c57bf1------2</link>
            <guid isPermaLink="false">https://medium.com/p/f012156f7f1a</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[cann]]></category>
            <category><![CDATA[npu]]></category>
            <category><![CDATA[mindspore]]></category>
            <category><![CDATA[ascend]]></category>
            <dc:creator><![CDATA[Serkan Celik]]></dc:creator>
            <pubDate>Thu, 09 Feb 2023 12:44:57 GMT</pubDate>
            <atom:updated>2023-02-09T12:44:57.886Z</atom:updated>
            <content:encoded><![CDATA[<h3>👨‍💻Ascend Full-Stack AI Software/Hardware Platform</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3TXvpqC2Ugx6_ez9La4lgQ.jpeg" /><figcaption><a href="https://blog.huawei.com/wp-content/uploads/2019/01/20190130-155055eSpace.jpg">Image Reference</a></figcaption></figure><h4>Introduction</h4><p>Hi, there! We are with you with our Huawei Ascend Full-Stack AI Platform article. In this article, we will talk about the structure, devices, and software of Huawei Ascend chips.</p><p>Applications with artificial intelligence have come across almost everywhere in recent years. We need to have the high computing power for the AI models used in such applications to be trained faster and produce results. Most people know that GPUs are indispensable infrastructures for artificial intelligence applications. What about the <a href="https://medium.com/huawei-developers/world-of-huawei-ascend-future-with-npus-5843c18993f3">NPUs</a>?</p><p>NPU (Neural Processing Unit) is a high computing power hardware developed by Huawei. Huawei’s Da Vinci Architecture makes a difference in artificial intelligence applications.</p><p>Huawei uses NPUs on its devices, which it calls the Atlas family. Before we talk about devices, let’s take a closer look at Da Vinci&#39;s Architecture.</p><h4><a href="https://support.huaweicloud.com/intl/en-us/odevg-A800_9000_9010/atlaste_10_0009.html"><strong>Huawei Da Vinci Architecture</strong></a></h4><p>During the training of artificial intelligence models, multi-dimensional matrices undergo mathematical operations to train models and produce results. Huawei has developed Da Vinci Architecture with this in mind. With the use of cube computing units in more than 85% of the chip, a performance that makes a difference in artificial intelligence applications was captured. Huawei first released Ascend 910 and Ascend 310 chips based on the Da Vinci Architecture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7wULkMEsoVKfjDzIkirAiQ.png" /><figcaption>Da Vinci Architecture</figcaption></figure><h4><a href="https://support.huawei.com/enterprise/en/ascend-computing/atlas-200-pid-23464086"><strong>Atlas 200 AI Accelerator Module</strong></a></h4><p>The Atlas 200 AI Accelerator Module uses the Ascend 310 AI processor to run video analysis and artificial intelligence applications. The Ascend 310 chip in INT8 offers 22 TOPS computing power in calculations. In addition to its high calculation capacity, the working temperature is between -25°C and 80°C and it can work in extreme conditions. Low power consumption, compact dimensions, and operating temperature range make the Atlas 200 AI Accelerator Module one-to-one for “edge” scenarios.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/879/1*2yrswgFfMpy2MBLJoj8ukw.png" /><figcaption><a href="https://e.huawei.com/tr/material/datacenter/server/740747871439431a81843da6906181d8">Image Reference</a></figcaption></figure><h4><a href="https://www.hiascend.com/document/detail/en/Atlas200DKDeveloperKit/1013/productdesc/atlas200_DK_pdes_19_0003.html"><strong>Atlas 200 DK AI Developer Kit</strong></a></h4><p>Want to run AI applications with Ascend 310 NPU? Here Atlas 200 DK. This developer kit includes the Atlas 200 AI Accelerator module. Atlas 200 has a well-designed hardware environment to use the power of the AI Accelerator module. Provides peripheral interfaces to enable users to quickly and easily access powerful processing capacity. You can run your artificial intelligence models with Ascend software infrastructure with easy access to environmental interfaces. You can develop artificial intelligence applications with this device by using the <a href="https://www.hiascend.com/zh/software/mindstudio">MindStudio IDE</a> developed by Huawei.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/917/1*t_B5TZ21E2UTVIJNREkSLg.png" /><figcaption><a href="https://e.huawei.com/tr/material/datacenter/server/740747871439431a81843da6906181d8">Image Reference</a></figcaption></figure><h4><a href="https://support.huawei.com/enterprise/en/ascend-computing/a300-3010-pid-251560253/doc"><strong>Atlas 300I Inference Card</strong></a></h4><p>If you need more computing power for inference scenarios, the Atlas 300I Inference Card can meet your needs. This card was developed for those who are looking for strong inference scenarios. It provides 88 TOPS calculation capacity in INT8 calculations with a single card and supports real-time analysis of 80-channel HD videos (1080p 25 FPS). It has high capacity and high bandwidth memory. In this way, it can reduce the latency of artificial intelligence applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uu5t6a3wdkRsedCSb3cdYg.png" /><figcaption><a href="https://e.huawei.com/tr/material/datacenter/server/740747871439431a81843da6906181d8">Image Reference</a></figcaption></figure><p><a href="https://support.huawei.com/enterprise/en/ascend-computing/atlas-300i-pro-pid-251052354"><strong>Atlas 300I Pro Inference Card</strong></a></p><p>With Atlas 300I Pro Inference Card, we can get 140 TOPS calculation capacity in INT8 calculations. Standing out with advantages like superior computing power, ultra-high energy efficiency, high-performance feature acquisition, and secure boot, this inference card is a good choice for use in high-power AI applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/1*j_KdtCok9N5ls6-DFqirRw.png" /><figcaption><a href="https://e.huawei.com/tr/material/datacenter/server/740747871439431a81843da6906181d8">Image Reference</a></figcaption></figure><h4><a href="https://support.huawei.com/enterprise/en/ascend-computing/atlas-300v-pro-pid-253542321"><strong>Atlas 300V Pro Video Analysis Card</strong></a></h4><p>Atlas 300V Pro can meet your needs if you need to check video groups in your projects about video analysis. The general-purpose processor integrates AI Core and codecs, making it perfect for AI extraction and video/image encoding and decoding tasks. Atlas 300V Pro supports real-time analysis of 128-channel HD videos (1080p 25 FPS).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I3t1Dzt4Bkq07S7VYQZAqA.png" /><figcaption><a href="https://e.huawei.com/tr/material/datacenter/server/740747871439431a81843da6906181d8">Image Reference</a></figcaption></figure><h4><a href="https://support.huawei.com/enterprise/en/ascend-computing/a300t-9000-pid-250702906"><strong>Atlas 300T Training Card</strong></a></h4><p>If you need to train your artificial intelligence model at high speed, Atlas 300T Training Card can meet your need. Supported by the Ascend 910 AI NPU, this card has the world’s largest single-chip computing capacity. With CANN software solutions, you can train your models with high performance in artificial intelligence model training. With a single card, is able to offer 280 TOPS FP16 computing power in calculations. It offers high performance during model training and gradient synchronization with its high-capacity memory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*0paoDnX0_vf3HKjdYgTUhA.png" /><figcaption><a href="https://e.huawei.com/tr/material/datacenter/server/740747871439431a81843da6906181d8">Image Reference</a></figcaption></figure><h4><a href="https://support.huawei.com/enterprise/en/ascend-computing/a500-3000-pid-250702836"><strong>Atlas 500 AI Edge Station</strong></a></h4><p>Need an “edge” device for harsh conditions? Atlas 500 AI Edge Station is designed for edge applications with harsh environmental conditions. It is a device developed for a wide range of edge application scenarios. Despite its fanless design, it has an outdoor operating range of -40°C to +70°C. It has 22 TOPS INT8 computing power in calculations. This device, which also provides cloud-edge cooperation with the software provided, makes this device a good choice in edge scenarios.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*23hVFEbPQAYggqDwhEqt7A.png" /><figcaption><a href="https://e.huawei.com/tr/material/datacenter/server/740747871439431a81843da6906181d8">Image Reference</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IxDgVxp-aGe4XcpihFm5JQ.gif" /><figcaption><a href="https://forum.huawei.com/enterprise/es/data/attachment/forum/202103/04/112606lkrvrq4owery11s9.gif?AtlasIES_simulador.gif">Atlas 500 AI Edge Station (Intelligent Edge System)</a></figcaption></figure><h4><a href="https://support.huawei.com/enterprise/en/ascend-computing/a500-pro-3000-pid-251168992"><strong>Atlas 500 Pro AI Edge Server</strong></a></h4><p>Atlas 500 Pro AI Edge Server is designed for edge applications. It has superior computing performance, strong environmental compatibility, easy maintenance, and cloud-edge collaboration. Supports up to 4 Atlas 300I Inference cards to meet inference needs in multiple scenarios. In this way, it has the capacity to analyze 320 channels of real-time HD (1080p 25 FPS) video. With the Kunpeng920 processor inside, it appears as a server device that can easily run applications that will push the limits.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/1*Ks33_hKEUC6J2WRgeYx39g.png" /><figcaption><a href="https://e.huawei.com/tr/material/datacenter/server/740747871439431a81843da6906181d8">Image Reference</a></figcaption></figure><p><strong>Atlas 800 Inference Server (</strong><a href="https://support.huawei.com/enterprise/en/ascend-computing/a800-3000-pid-250743608"><strong>Model 3000</strong></a><strong> — </strong><a href="https://support.huawei.com/enterprise/en/ascend-computing/a800-3010-pid-250743617"><strong>Model 3010</strong></a><strong>)</strong></p><p>If you want to increase the computing power capacity, you can increase your computing power with Atlas 800 Inference Server. It is widely used for AI inference in data centers. This inference server has 2 models. Model 3000 and model 3010. Model 3000 includes an arm-based Kunpeng920 CPU. The 3010 model includes an x86-based Intel Xeon CPU. With its design structure that can support 8 Atlas 300I Inference cards, it allows 640-channel real-time HD (1080p 25 FPS) video analysis. The 3000 model of the server takes advantage of Kunpeng’s multi-core, low consumption, providing a highly efficient AI computing platform for inference scenarios.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/919/1*hgPOgt4cvJ6rN3dwezAVeg.png" /><figcaption><a href="https://e.huawei.com/tr/material/datacenter/server/740747871439431a81843da6906181d8">Image Reference</a></figcaption></figure><h4><strong>Atlas 800 Training Server (</strong><a href="https://support.huawei.com/enterprise/en/ascend-computing/a800-9000-pid-250702818"><strong>Model 9000</strong></a><strong> — </strong><a href="https://support.huawei.com/enterprise/en/ascend-computing/a800-9010-pid-250702809"><strong>Model 9010</strong></a><strong>)</strong></h4><p>We know about the 300T training card and we know how high its computational capacity is. If we need more computing power for model training, the Atlas 800 Training server will be a good choice. As with the inference server, this server has two models. Model 9000 and model 9010. Model 9000 is powered by Kunpeng920 arm-based processor and Ascend 910 NPU. Model 9010 is powered by an Intel Xeon Gold Series processor and Ascend 910 NPU. Atlas 800 Training Server has 8 Ascend 910 NPUs to deliver true performance. It has high computational density, high energy efficiency, and high network bandwidth.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*AmUFg1TFRmHfqA9K0qZCrA.png" /><figcaption><a href="https://e.huawei.com/tr/material/datacenter/server/740747871439431a81843da6906181d8">Image Reference</a></figcaption></figure><h4><a href="https://support.huawei.com/enterprise/en/ascend-computing/a900-9000-pid-251351307">Atlas 900 PoD</a></h4><p>Atlas 900 PoD is a core unit of the AI training cluster based on Huawei Ascend 910 NPUs and Kunpeng920 processors. It has powerful AI computing capability, optimal AI energy efficiency, and optimal AI scalability. Atlas 900 PoD has the capacity to support up to 4096 Ascend 910 processors. With the maximum capacity of Atlas 900 PoD, you can reach 1 EFLOPS processing power in FP16 calculations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*KJPDaeZU_gS5f5KR9IBhWA.png" /><figcaption><a href="https://e.huawei.com/tr/material/datacenter/server/740747871439431a81843da6906181d8">Image Reference</a></figcaption></figure><p>At this point, we have basic information about Huawei Atlas devices. As we know, we need to control the high computational capacity that we have obtained as hardware with software. Huawei has revealed the Heterogeneous AI Computing Architecture in order to efficiently use the powerful hardware infrastructure it has designed.</p><h4><strong>Heterogeneous Compute Architecture</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3euB-mU8eRpwpxZPVGQc3g.png" /><figcaption><a href="https://e.huawei.com/it/material/datacenter/server/740747871439431a81843da6906181d8">Huawei Ascend AI</a></figcaption></figure><p>If we have a strong computational capacity in hardware, we need to control this power as well. If we cannot control the high performance provided by the hardware, the devices we use will not work with full efficiency. At this point, Huawei developed the Heterogeneous Computing Architecture and named this software as CANN (Compute Architecture for Neural Networks). CANN; It adopts core components like ACL, DVPP, and HCCL that unlock the computing power of Ascend NPUs.</p><p>ACL (Ascend Computing Language) is a unified programming interface that separates software from hardware, HCCL (Huawei Collective Communication Library) enables effective data transfer between Ascend AI processors in distributed training scenarios, and DVPP (Digital Vision Pre-Processing) is hardware to improve parallelism during image preprocessing. uses acceleration.</p><p><strong>Supported AI Frameworks</strong></p><p>We have powerful computing hardware and software to control the power of Ascend Atlas products. But we need some artificial intelligence infrastructure to work with neural networks. Huawei Atlas Ascend platforms support 3rd party AI frameworks such as Tensorflow, and Pytorch. Also, Huawei has its own AI infrastructure called MindSpore. MindSpore is a deep learning infrastructure aimed at easy development, efficient implementation, and covering all scenarios.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*_LA8jXDvOrVL56xQeoBTmg.png" /><figcaption><a href="https://e.huawei.com/it/material/datacenter/server/740747871439431a81843da6906181d8">Image Reference</a></figcaption></figure><h4><strong>Result</strong></h4><p>In this article, we had preliminary information about Ascend Atlas products and software developed by Huawei. You can visit the link for more information.</p><p>See you in future articles :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*m-3tfWCJyttDbTGqEjnl3Q.gif" /><figcaption><a href="https://www.gurujieducation.com/vision/images/123.gif">Image Reference</a></figcaption></figure><h4>References</h4><ul><li><a href="https://www.hiascend.com/software/cann">昇腾社区-官网丨昇腾万里 让智能无所不及</a></li><li><a href="https://www.hiascend.com/hardware/product">昇腾社区-官网丨昇腾万里 让智能无所不及</a></li><li><a href="https://www.huawei.com/en/open-source">Open Source @ Huawei</a></li><li><a href="https://www.hiascend.com/en/">昇腾社区-官网丨昇腾万里 让智能无所不及</a></li><li><a href="https://www.mindspore.cn/en">MindSpore官网</a></li><li><a href="https://www.hiascend.com/document?tag=hardware">昇腾社区-官网丨昇腾万里 让智能无所不及</a></li><li><a href="https://support.huawei.com/enterprise/en/category/ascend-computing-pid-1557196528909?submodel=doc">Ascend Computing Support, Docs &amp; Downloads - Huawei</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f012156f7f1a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers/ascend-full-stack-ai-software-hardware-platform-f012156f7f1a">👨‍💻 Ascend Full-Stack AI Software/Hardware Platform</a> was originally published in <a href="https://medium.com/huawei-developers">Huawei Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction  of pyACL API]]></title>
            <link>https://medium.com/huawei-developers/introduction-of-pyacl-api-3e856a399d16?source=rss-d0b743c57bf1------2</link>
            <guid isPermaLink="false">https://medium.com/p/3e856a399d16</guid>
            <category><![CDATA[npu]]></category>
            <category><![CDATA[pyacl-api]]></category>
            <category><![CDATA[resnet50]]></category>
            <category><![CDATA[pyacl]]></category>
            <category><![CDATA[inference]]></category>
            <dc:creator><![CDATA[Serkan Celik]]></dc:creator>
            <pubDate>Wed, 08 Feb 2023 13:01:25 GMT</pubDate>
            <atom:updated>2023-02-08T13:01:25.011Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction of pyACL API</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*QP6hUKf43eTBb2bfivyTVw.jpeg" /><figcaption><a href="https://usmsystems.com/wp-content/uploads/2020/09/119226200_665027644365313_4663085420677003994_n-1-1.jpg">Image Reference</a></figcaption></figure><h4><strong>Introduction</strong></h4><p>Hi there! In this article to the developers; We will guide them to develop deep neural network (DNN) applications based on existing models and Python APIs provided by the Python Ascend Computing Language (pyACL).</p><p>Python Ascend Computing Language (pyACL) is a Python API library encapsulated using CPython based on AscendCL. Users can use Python to manage the running and resources of the Ascend AI Processors ranging from device management, context management, stream management, and memory management, to model loading and execution, operator loading and execution, and media data processing.</p><p>Let’s look deeply at device, stream, and context terms before the example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ih5GNbr7lMbUhf88H781hw.png" /><figcaption><a href="https://www.hiascend.com/document/detail/en/CANNCommunityEdition/60RC1alphaX/infacldevg/aclpythondevg/aclpythondevg_0005.html">Image Reference</a></figcaption></figure><h4><strong>Development Workflow</strong></h4><ol><li>Preparing the development environment and operating environment.</li><li><strong>Analyzing development requirements: </strong>Determine the functions (such as data copy and model inference), commands, and APIs for specific scenario-based development.</li><li><strong>Create a code directory: </strong>Create a directory to store code files, build scripts, test images, and model files. An example directory structure:</li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/399c963d663e24420173dacbb972dc94/href">https://medium.com/media/399c963d663e24420173dacbb972dc94/href</a></iframe><p><strong>Develop an app:</strong></p><ol><li>pyACL initialization, see <a href="https://www.hiascend.com/document/detail/en/canncommercial/504/inferapplicationdev/aclpythondevg/aclpythondevg_0062.html">pyACL Initialization and Deinitialization</a>.</li><li>Allocate runtime resources, see <a href="https://www.hiascend.com/document/detail/en/canncommercial/504/inferapplicationdev/aclpythondevg/aclpythondevg_0063.html">Runtime Resource Allocation and Deallocation</a>.</li><li>Transfer data by referring to <a href="https://www.hiascend.com/document/detail/en/canncommercial/504/inferapplicationdev/aclpythondevg/aclpythondevg_0067.html">Data Copy</a>.</li><li>(Optional) If image cropping and resizing are needed, add data preprocessing to output YUV420SP images as the input of model inference, see <a href="https://www.hiascend.com/document/detail/en/canncommercial/504/inferapplicationdev/aclpythondevg/aclpythondevg_0097.html">Media Data Processing V1</a>.</li><li>Perform model inference by referring to <a href="https://www.hiascend.com/document/detail/en/canncommercial/504/inferapplicationdev/aclpythondevg/aclpythondevg_0076.html">Basic Scenarios for Model Inference</a>.</li><li>After data processing is complete, destroy runtime allocations, see <a href="https://www.hiascend.com/document/detail/en/canncommercial/504/inferapplicationdev/aclpythondevg/aclpythondevg_0063.html">Runtime Resource Allocation and Deallocation</a>.</li><li>Deinitialize pyACL, see <a href="https://www.hiascend.com/document/detail/en/canncommercial/504/inferapplicationdev/aclpythondevg/aclpythondevg_0062.html">pyACL Initialization and Deinitialization</a>.</li></ol><h4><strong>Typical API Call Sequence</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*3zUXi9crOBairlgIds-dgQ.png" /><figcaption><a href="https://www.hiascend.com/document/detail/en/CANNCommunityEdition/60RC1alphaX/infacldevg/aclpythondevg/aclpythondevg_0007.html">Image Reference</a></figcaption></figure><p>Let’s take the inference scenario of a model; We need to define the pyACL library to control the NPU (Neural Processing Unit) device. In the second stage, we have to allocate study resources. After allocating the work resources, we can move on to the inference phase of the model we will use.</p><p>We have to load the data to be inferred to the device memory. For this, we can allocate space in the device memory and load the data. After loading the data we can send the data to our model. At the same time, we need to load our model that will perform the inference process to the device memory.</p><p>After our data and model are loaded into NPU memory, we can run our model using pyACL API commands. After the execution of the model is finished, we can get the outputs as NumPy objects with pyACL.</p><p>After all the stages are finished, we can end our process by releasing the allocated resources. Let’s make an example with the ResNet-50 model for better understanding.</p><p><strong>pyACL Initialization &amp; Runtime Resource Allocation</strong></p><p>To get started, we first need to define the class variables. We have to define the device ID and model path for the initialization process.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6ef5206d88c948b777c6f2713065aaeb/href">https://medium.com/media/6ef5206d88c948b777c6f2713065aaeb/href</a></iframe><p>Let’s look deeply at Net class.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d32f3c76146fc25aa42a1da354836c90/href">https://medium.com/media/d32f3c76146fc25aa42a1da354836c90/href</a></iframe><p>As you see we have defined our device ID and model path to class variables. Let’s take a look at the init_resource() function for understanding <strong>Initialization &amp; Runtime Resource Allocation </strong>stages.</p><p>When using the pyACL APIs to develop an application, you must initialize pyACL first. Otherwise, errors may occur during the initialization of internal system resources, causing exceptions in other services. The acl.init() function returns a ret code for checking to initialize status. We can check the status with these ret codes.</p><p>After initialization, we need to allocate the <a href="https://www.hiascend.com/document/detail/en/canncommercial/504/inferapplicationdev/aclpythondevg/aclpythondevg_0017.html#EN-US_TOPIC_0000001237643483__en-us_topic_0231779959_table124681850142515">device</a>, <a href="https://www.hiascend.com/document/detail/en/canncommercial/504/inferapplicationdev/aclpythondevg/aclpythondevg_0017.html#EN-US_TOPIC_0000001237643483__en-us_topic_0231779959_table124681850142515">context</a>, and, <a href="https://www.hiascend.com/document/detail/en/canncommercial/504/inferapplicationdev/atctool/atlasatc_16_0001.html#:~:text=files%20into%20offline-,models,-supported%20by%20the">model</a> in sequence to support the execution of computing and management tasks.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3ab9ebcd24bcb6a6d434e592ccfc857a/href">https://medium.com/media/3ab9ebcd24bcb6a6d434e592ccfc857a/href</a></iframe><p><strong>Data Transfer</strong></p><p>We are allocated runtime resources for inference task. At this point, we need to prepare the data for executing the model.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/05861a9d8e94a445591be732d47e1f42/href">https://medium.com/media/05861a9d8e94a445591be732d47e1f42/href</a></iframe><p>We sent our image to the allocated NPU device for executing the model. Let’s look at the run() function for understanding what&#39;s happening there.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/be23a3a71709733b877822233093d7c9/href">https://medium.com/media/be23a3a71709733b877822233093d7c9/href</a></iframe><p>As you see we have 3 main stages in the run() function. The first stage is sending our data to the NPU device. In the second stage, we are executing our model. After these, we are taking our outputs from the NPU device.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/028a47d68011f26301f7d96dc2dbf939/href">https://medium.com/media/028a47d68011f26301f7d96dc2dbf939/href</a></iframe><p>We should look more deeply for understanding how it works. What’s happening in the _data_interaction() function? Let’s look.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f37e10d35e4407834ed2ff93f5351948/href">https://medium.com/media/f37e10d35e4407834ed2ff93f5351948/href</a></iframe><p>Data transfer starts in the for loop. We use the bytes_to_ptr() function to transfer images to the NPU device. On these lines, we convert our input images to bytes format, then convert these bytes type data to the pointer. At this point, we have made it possible to transfer all our data to the NPU device. We can transfer the data to the NPU device using the acl.rt.memcpy() function.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2e14bc4ea1acf066ff3db48bdac5ea99/href">https://medium.com/media/2e14bc4ea1acf066ff3db48bdac5ea99/href</a></iframe><p>At this stage, we loaded our data to the NPU device. We should execute our model for taking inference results. Let&#39;s look forward() function.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/63c54aa45849b0d70755314042640f04/href">https://medium.com/media/63c54aa45849b0d70755314042640f04/href</a></iframe><p>We executed our model successfully. We need to destroy the data buffer that we created.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8d18b019023693201ec2666c5fc45f07/href">https://medium.com/media/8d18b019023693201ec2666c5fc45f07/href</a></iframe><p>After running the model, we need to take our results from the NPU device. For this purpose, let&#39;s look _data_from_device_to_host() function.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4d638e932a651703b7106b8e8ea499ea/href">https://medium.com/media/4d638e932a651703b7106b8e8ea499ea/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f88abf247cd92ab73b820b76e5a1d19b/href">https://medium.com/media/f88abf247cd92ab73b820b76e5a1d19b/href</a></iframe><p>We can take our results with the get_result() function. At this stage, all execution stages ended. We should destroy all allocated resources if we don’t use them.</p><p><strong>pyACL Deinitialization &amp; Runtime Resource Deallocation</strong></p><p>After all required pyACL APIs have been called or before we exit the process, we must call the deinitialization commands to remove the pyACL.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9f4f1bd4102693dac58591cfa58db3de/href">https://medium.com/media/9f4f1bd4102693dac58591cfa58db3de/href</a></iframe><h4>Result</h4><p>We learned how to manage NPU resources with pyACL, and how to perform and use inference scenario with Resnet example. If you want to check out more advanced examples and learn more about using pyACL and its features, you can check this <a href="https://www.hiascend.com/document/detail/en/canncommercial/504/inferapplicationdev/aclpythondevg/aclpythondevg_0000.html">link.</a></p><p>See you in future articles :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*mS620f_bJiS3F7P8lQaCZg.gif" /><figcaption><a href="https://d2z8nyy70yf33i.cloudfront.net/wp-content/uploads/02_gif.gif">Image Reference</a></figcaption></figure><h4>Reference</h4><ul><li><a href="https://www.hiascend.com/document/detail/en/canncommercial/504/inferapplicationdev/aclpythondevg/aclpythondevg_0000.html">昇腾社区-官网丨昇腾万里 让智能无所不及</a></li><li><a href="https://github.com/Ascend/samples/blob/master/python/level2_simple_inference/1_classification/resnet50_imagenet_classification/src/acl_net.py">samples/acl_net.py at master · Ascend/samples</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3e856a399d16" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers/introduction-of-pyacl-api-3e856a399d16">Introduction  of pyACL API</a> was originally published in <a href="https://medium.com/huawei-developers">Huawei Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[pyACL API’a Giriş]]></title>
            <link>https://medium.com/huawei-developers-tr/pyacl-apia-giri%C5%9F-4305d5c0d6f8?source=rss-d0b743c57bf1------2</link>
            <guid isPermaLink="false">https://medium.com/p/4305d5c0d6f8</guid>
            <category><![CDATA[inference]]></category>
            <category><![CDATA[pyacl]]></category>
            <category><![CDATA[npu]]></category>
            <category><![CDATA[pyacl-api]]></category>
            <category><![CDATA[resnet50]]></category>
            <dc:creator><![CDATA[Serkan Celik]]></dc:creator>
            <pubDate>Wed, 08 Feb 2023 12:51:33 GMT</pubDate>
            <atom:updated>2023-02-08T12:51:33.569Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*QP6hUKf43eTBb2bfivyTVw.jpeg" /><figcaption><a href="https://usmsystems.com/wp-content/uploads/2020/09/119226200_665027644365313_4663085420677003994_n-1-1.jpg">Görsel Referansı</a></figcaption></figure><h4><strong>Giriş</strong></h4><p>Merhaba! Bu makalede geliştiricilere; Python Ascend Computing Language (pyACL) tarafından sağlanan mevcut modellere ve Python API’larına dayalı derin sinir ağı (DNN) uygulamaları geliştirmeleri için rehberlik edeceğiz.</p><p>Python Ascend Computing Language (pyACL), AscendCL tabanlı CPython kullanılarak kapsüllenmiş bir Python API kütüphanesidir. Kullanıcılar, cihaz yönetimi, bağlam yönetimi, akış yönetimi, bellek yönetimi, model yükleme ve yürütme, operatör yükleme ve yürütme ve medya veri işleme gibi Ascend AI işlemcilerinin çalışmasını ve kaynaklarını yönetmek için Python programlama dilini kullanabilir.</p><p>Örnekten önce cihaz(device), akış(stream) ve bağlam(context) terimlerine derinlemesine bakalım.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gadF2mjln8Aa7SdNTK7clw.png" /><figcaption><a href="https://www.hiascend.com/document/detail/en/CANNCommunityEdition/60RC1alphaX/infacldevg/aclpythondevg/aclpythondevg_0005.html">Görsel Referansı</a></figcaption></figure><h4><strong>Geliştirme İş Akışı</strong></h4><ol><li>Geliştirme ortamının ve çalışma ortamının hazırlanması.</li><li><strong>Geliştirme gereksinimlerinin analiz edilmesi: </strong>Belirli senaryoya dayalı geliştirme için gerekli işlevlerin (veri kopyalama ve model çıkarımı gibi), komutların ve API’lerin belirlenmesi.</li><li><strong>Kod dizininin oluşturulması:</strong> Kod dosyalarını depolamak, komut dosyalarını oluşturmak, görüntüleri test etmek ve model dosyalarını oluşturmak için çalışma dizininin oluşturulması. Örnek bir dizin yapısı:</li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/60a443646975a820054bc5f65525aa7a/href">https://medium.com/media/60a443646975a820054bc5f65525aa7a/href</a></iframe><p><strong>Uygulama geliştirme aşamaları:</strong></p><ol><li>pyACL’yi başlatılması, <a href="https://www.hiascend.com/document/detail/en/canncommercial/504/inferapplicationdev/aclpythondevg/aclpythondevg_0062.html">pyACL başlatma ve sonlandırma</a>.</li><li>Çalışma zamanı kaynaklarının tahsis edilmesi, <a href="https://www.hiascend.com/document/detail/en/canncommercial/504/inferapplicationdev/aclpythondevg/aclpythondevg_0063.html">Çalışma kaynaklarını tanımlama ve serbest bırakma</a>.</li><li>Veri aktarımını gerçekleştirme, <a href="https://www.hiascend.com/document/detail/en/canncommercial/504/inferapplicationdev/aclpythondevg/aclpythondevg_0067.html">Veri kopyalama</a>.</li><li>(Opsiyonel) Görüntü kırpma ve yeniden boyutlandırma gerekirse, model çıkarımının girişi olarak YUV420SP görüntüleri için veri ön işleme aşamasının eklenmesi, <a href="https://www.hiascend.com/document/detail/en/canncommercial/504/inferapplicationdev/aclpythondevg/aclpythondevg_0097.html">Veri ön işleme</a>.</li><li>Model çıkarımının yapılması, <a href="https://www.hiascend.com/document/detail/en/canncommercial/504/inferapplicationdev/aclpythondevg/aclpythondevg_0076.html">Model çıkarımı için basit seneryolar</a>.</li><li>Veri işleme tamamlandıktan sonra çalışma zamanı tahsislerinin kaldırılması, <a href="https://www.hiascend.com/document/detail/en/canncommercial/504/inferapplicationdev/aclpythondevg/aclpythondevg_0063.html">Çalışma kaynaklarını tanımlama ve serbest bırakma</a>.</li><li>pyACL’yi kaynaklarının serbest bırakılması, <a href="https://www.hiascend.com/document/detail/en/canncommercial/504/inferapplicationdev/aclpythondevg/aclpythondevg_0062.html">pyACL başlatma ve sonlandırma</a>.</li></ol><h4><strong>API Çalışma Sekansı</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*4UTVUPxR2nHp-yBgHRmzqg.png" /><figcaption><a href="https://www.hiascend.com/document/detail/en/CANNCommunityEdition/60RC1alphaX/infacldevg/aclpythondevg/aclpythondevg_0007.html">Görsel Referansı</a></figcaption></figure><p>Bir modelin çıkarım seneryosunu ele alalım; NPU (Neural Processing Unit) cihazını kontrol etmek için pyACL kütüphanesini tanımlamamız gerekiyor. İkinci aşamada, çalışma kaynaklarını tahsis etmeliyiz. Çalışma kaynaklarının tahsis edilmesinden sonra kullanacağımız modelin çıkarım aşamasına geçebiliriz.</p><p>Çıkarım yapılacak verileri cihaz belleğine yüklemeliyiz. Bunun için cihaz hafızasında yer ayırıp verileri yükleyebiliriz. Verileri yükledikten sonra modelimize verileri gönderebiliriz. Aynı zamanda çıkarım işlemini gerçekleştirecek modelimizi de cihaz belleğine yüklemeliyiz.</p><p>Verilerimiz ve modelimiz NPU hafızasına yüklendikten sonra pyACL API komutlarını kullanarak modelimizi çalıştırabiliriz. Modelin yürütülme işlemi bittikten sonra çıktıları pyACL ile NumPy nesnesi olarak alabiliriz.</p><p>Tüm aşamalar bittikten sonra ayrılan kaynakları serbest bırakarak işlemimizi sonlandırabiliriz. Daha iyi anlamak adına ResNet-50 modeli ile bir örnek yapalım.</p><p><strong>pyACL Başlatma &amp; Çalışma Kaynaklarını Tahsis Etme</strong></p><p>Başlamak için öncelikle sınıf değişkenlerini tanımlamamız gerekiyor. Başlatma işlemi için cihaz kimliğini ve model yolunu tanımlamalıyız.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7514da749256077bd46e4f2dfc70becb/href">https://medium.com/media/7514da749256077bd46e4f2dfc70becb/href</a></iframe><p>Net sınıfını daha detaylı inceleyelim;</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/174ee7ae3cc5ed8a892b4b836c154801/href">https://medium.com/media/174ee7ae3cc5ed8a892b4b836c154801/href</a></iframe><p>Gördüğünüz gibi, sınıf değişkenlerine giden cihaz kimliğimizi ve model yolumuzu tanımladık. Başlatma ve Çalışma Zamanı Kaynak Tahsisi aşamalarını anlamak için init_resource() işlevine bir göz atalım.</p><p>Bir uygulama geliştirmek için pyACL API’lerini kullanırken, önce pyACL’yi başlatmanız gerekir. Aksi takdirde, dahili sistem kaynaklarının başlatılması sırasında hatalar meydana gelebilir ve diğer hizmetlerde istisnalara neden olabilir. acl.init() işlevi, başlatma durumunu kontrol etmek için bir ret kodu döndürür. Bu ret kodları ile durumu kontrol edebiliriz.</p><p>Başlatmadan sonra, bilgi işlem ve yönetim görevlerinin yürütülmesini desteklemek için cihazı, bağlamı ve modeli sırayla tahsis etmemiz gerekir.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6bc4d9296a2a997fd9e3b84ad99202dd/href">https://medium.com/media/6bc4d9296a2a997fd9e3b84ad99202dd/href</a></iframe><p><strong>Veri Aktarımı</strong></p><p>Çıkarım görevi için çalışma zamanı kaynakları tahsis edildi. Bu noktada modeli yürütmek için verileri hazırlamamız gerekiyor.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/49e047f41e7166fd1be3585abbc2a28d/href">https://medium.com/media/49e047f41e7166fd1be3585abbc2a28d/href</a></iframe><p>Modelin çalıştırılması için görselimizi, tahsis edilen NPU cihazına gönderiyoruz. Orada neler olduğunu anlamak için run() işlevine bakalım.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cd4de59788c6c728f5f00535dfc450d0/href">https://medium.com/media/cd4de59788c6c728f5f00535dfc450d0/href</a></iframe><p>Gördüğünüz gibi run() fonksiyonunda 3 ana aşamamız var. İlk aşama verilerimizi NPU cihazına göndermektir. İkinci aşamada modelimizi çalıştırıyoruz. Bunların ardından NPU cihazından çıktılarımızı alıyoruz.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/181bf94d0921145992b80132d563412d/href">https://medium.com/media/181bf94d0921145992b80132d563412d/href</a></iframe><p>Nasıl çalıştığını anlamak için daha derinlemesine bakmalıyız. _data_interaction() işlevinde neler oluyor? Haydi bakalım.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a5b43f4c95d5a43346813e2f55f3feeb/href">https://medium.com/media/a5b43f4c95d5a43346813e2f55f3feeb/href</a></iframe><p>Veri aktarımı for döngüsünde başlamaktadır. Görüntüleri NPU aygıtına aktarmak için bytes_to_ptr() işlevini kullanıyoruz. Bu satırlar üzerinde girdi resimlerimizi bytes formatına çeviriyoruz, ardından bu bytes tipindeki veriyi pointer’a çeviriyoruz. Bu noktada tüm verilerimizi NPU cihazına aktarabilecek hale getirdik. acl.rt.memcpy() fonksiyonunu kullanarak verileri NPU cihazına aktarabiliriz.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6758f2285716e63f76e68123d2e2994e/href">https://medium.com/media/6758f2285716e63f76e68123d2e2994e/href</a></iframe><p>Bu aşamada verilerimizi NPU cihazına yüklüyoruz. Çıkarım sonuçları almak için modelimizi çalıştırmalıyız. forward() fonksiyonuna bakalım.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fdde26d1590d8fde8287fe6f1e4beb32/href">https://medium.com/media/fdde26d1590d8fde8287fe6f1e4beb32/href</a></iframe><p>Bu aşamada modelimizi başarıyla çalıştırdık. Oluşturduğumuz veri arabelleğini yok etmemiz gerekiyor.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a39915da8577ef4905ec96f7393ac75b/href">https://medium.com/media/a39915da8577ef4905ec96f7393ac75b/href</a></iframe><p>Modeli çalıştırdıktan sonra NPU cihazından sonuçlarımızı almamız gerekiyor. Bu amaçla _data_from_device_to_host() işlevine bakalım.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dafeac9e3b1a000258d82ec7a89b4a67/href">https://medium.com/media/dafeac9e3b1a000258d82ec7a89b4a67/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5c3c02b591fa9ecd48353480194d68a8/href">https://medium.com/media/5c3c02b591fa9ecd48353480194d68a8/href</a></iframe><p>Sonuçlarımızı get_result() fonksiyonu ile alabiliriz. Çıktılarımızı aldıktan sonra tüm çıkarım aşaması sona erer. Eğer kullanılmayacaksa tahsis edilen tüm kaynakları yok etmeliyiz.</p><p><strong>pyACL Sonlandırma &amp; Çalışma Kaynaklarını Serbest Bırakma</strong></p><p>Tüm gerekli pyACL API’leri çağrıldıktan sonra veya işlemden çıkmadan önce, pyACL’yi kaldırmak için çalışma kaynaklarını serbest bırakma komutlarını çağırmalıyız.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/66de0669b1488ef1272b1b4fd1a8b4a9/href">https://medium.com/media/66de0669b1488ef1272b1b4fd1a8b4a9/href</a></iframe><h4>Sonuç</h4><p>pyACL ile NPU kaynaklarının nasıl yönetileceğini, çıkarım seneryosunun nasıl gerçekleştirileceğini ve kullanılacağını Resnet örneği ile öğrenmiş olduk. pyACL ve özelliklerini kullanarak daha gelişmiş örneklere göz atmak ve daha fazla bilgi edinmek isterseniz bu <a href="https://www.hiascend.com/document/detail/en/canncommercial/504/inferapplicationdev/aclpythondevg/aclpythondevg_0000.html">bağlantıya</a> göz atabilirsiniz.</p><p>Gelecek yazılarda görüşmek üzere :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*mS620f_bJiS3F7P8lQaCZg.gif" /><figcaption><a href="https://d2z8nyy70yf33i.cloudfront.net/wp-content/uploads/02_gif.gif">Görsel Referansı</a></figcaption></figure><h4>Referanslar</h4><ul><li><a href="https://www.hiascend.com/document/detail/en/canncommercial/504/inferapplicationdev/aclpythondevg/aclpythondevg_0000.html">昇腾社区-官网丨昇腾万里 让智能无所不及</a></li><li><a href="https://github.com/Ascend/samples/blob/master/python/level2_simple_inference/1_classification/resnet50_imagenet_classification/src/acl_net.py">samples/acl_net.py at master · Ascend/samples</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4305d5c0d6f8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/huawei-developers-tr/pyacl-apia-giri%C5%9F-4305d5c0d6f8">pyACL API’a Giriş</a> was originally published in <a href="https://medium.com/huawei-developers-tr">Huawei Developers - Türkiye</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>