From 8947a84c529a9b4494bdcffe872c021a94fcc79e Mon Sep 17 00:00:00 2001 From: aylingumus Date: Mon, 30 Dec 2024 02:39:35 +0100 Subject: [PATCH 01/11] docs(translation): Translate "analyzing_art_with_hf_and_fiftyone.ipynb" into Turkish (50% done, work in progress) --- .../analyzing_art_with_hf_and_fiftyone.ipynb | 839 ++++++++++++++++++ 1 file changed, 839 insertions(+) create mode 100644 notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb diff --git a/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb b/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb new file mode 100644 index 00000000..a407b529 --- /dev/null +++ b/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb @@ -0,0 +1,839 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Çoklu Modal Gömme ile Sanatsal Stillerin Analizi" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "*Yazar: [Jacob Marks](https://huggingface.co/jamarks)*\n", + "*Çevirmen: [Aylin Gümüş](https://huggingface.co/aylingumus)*" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "![Art Analysis Cover Image](https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/art_analysis_cover_image.jpg)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Görüntüler gibi görsel veriler bilgi açısından inanılmaz derecede zengindir, ancak yapısal olmayan doğası gereği analiz etmesi zordur.\n", + "\n", + "Bu not defterinde, çoklu modal gömme yöntemlerini ve hesaplanan öznitelikleri kullanarak resimlerdeki sanatsal stillerin nasıl analiz edileceğini keşfedeceğiz. Veri analizi ve görselleştirme için kullanmak üzere FiftyOne'a yükleyeceğimiz 🤗 Hub'dan [WikiArt veri kümesini](https://huggingface.co/datasets/huggan/wikiart) kullanacağız. Verilere birçok farklı açıdan göz atacağız:\n", + "\n", + "- **Görüntü Benzerliği Arama ve Anlamsal (Semantik) Arama**: 🤗 Transformers'tan ön-eğitimli [CLIP](https://huggingface.co/openai/clip-vit-base-patch32) modelini kullanarak çoklu modal gömüleri üreteceğiz ve yapısal olmayan aramalara izin vermek için veriyi indeksleyeceğiz.\n", + "\n", + "- **Kümeleme ve Görselleştirme**: Gömüleri kullanarak görüntüleri sanatsal stillerine göre kümeleyeceğiz ve UMAP boyut indirgeme yöntemini kullanarak sonuçları görselleştireceğiz.\n", + "\n", + "- **Benzersizlik Analizi**: Veri kümesindeki diğer görüntülere ne kadar benzediğine bağlı olarak her görüntü için benzersizlik skoru atamak için gömülerimizi kullanacağız.\n", + "\n", + "- **Görüntü Kalitesi Analizi**: Her bir görüntü için parlaklık, kontrast ve doygunluk gibi görüntü kalite metriklerini hesaplayacağız ve bu metriklerin, görüntülerin sanatsal stili ile nasıl ilişkili olduğunu göreceğiz." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Haydi başlayalım! 🚀" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Bu not defterini çalıştırmak için, aşağıdaki kütüphaneleri yüklemelisiniz:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "!pip install -U transformers huggingface_hub fiftyone umap-learn" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "İndirmeleri ışık hızında yapmak için [HF Transfer](https://pypi.org/project/hf-transfer/) yükleyin:\n", + "\n", + "```bash\n", + "pip install hf-transfer\n", + "```\n", + "\n", + "Ve `HF_HUB_ENABLE_HF_TRANSFER` ortam değişkenini ayarlayarak etkinleştirin:\n", + "\n", + "```bash\n", + "import os\n", + "os.environ[\"HF_HUB_ENABLE_HF_TRANSFER\"] = \"1\"\n", + "```" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "
\n", + "Not: Bu not defteri transformers==4.40.0, huggingface_hub==0.22.2 ve fiftyone==0.23.8 ile test edilmiştir.\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Şimdi bu not defteri için gerekli olan modülleri içe aktaralım:" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import fiftyone as fo # base library and app\n", + "import fiftyone.zoo as foz # zoo datasets and models\n", + "import fiftyone.brain as fob # ML routines\n", + "from fiftyone import ViewField as F # for defining custom views\n", + "import fiftyone.utils.huggingface as fouh # for loading datasets from Hugging Face" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Hub'dan 🤗 FiftyOne'a WikiArt veri kümesini yükleyerek başlayacağız. Bu veri kümesi Hugging Face'in `datasets` kütüphanesi aracılığıyla da yüklenebilir, ancak biz verileri doğrudan Datasets sunucusundan almak için [FiftyOne'ın 🤗 Hub entegrasyonunu](https://docs.voxel51.com/integrations/huggingface.html#huggingface-hub) kullanacağız. Hesaplamaları hızlı yapmak için, sadece ilk $1,000$ örneği indireceğiz." + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "dataset = fouh.load_from_hub(\n", + " \"huggan/wikiart\", ## repo_id\n", + " format=\"parquet\", ## for Parquet format\n", + " classification_fields=[\"artist\", \"style\", \"genre\"], # columns to store as classification fields\n", + " max_samples=1000, # number of samples to load\n", + " name=\"wikiart\", # name of the dataset in FiftyOne\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Veri kümesinin ne içerdiğini görmek için özetini ekrana yazdırın:" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Name: wikiart\n", + "Media type: image\n", + "Num samples: 1000\n", + "Persistent: False\n", + "Tags: []\n", + "Sample fields:\n", + " id: fiftyone.core.fields.ObjectIdField\n", + " filepath: fiftyone.core.fields.StringField\n", + " tags: fiftyone.core.fields.ListField(fiftyone.core.fields.StringField)\n", + " metadata: fiftyone.core.fields.EmbeddedDocumentField(fiftyone.core.metadata.ImageMetadata)\n", + " artist: fiftyone.core.fields.EmbeddedDocumentField(fiftyone.core.labels.Classification)\n", + " style: fiftyone.core.fields.EmbeddedDocumentField(fiftyone.core.labels.Classification)\n", + " genre: fiftyone.core.fields.EmbeddedDocumentField(fiftyone.core.labels.Classification)\n", + " row_idx: fiftyone.core.fields.IntField\n" + ] + } + ], + "source": [ + "print(dataset)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Veri kümesini [FiftyOne uygulamasında](https://docs.voxel51.com/user_guide/app.html) görselleştirin:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "session = fo.launch_app(dataset)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "![WikiArt Dataset](https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/art_analysis_wikiart_dataset.jpg)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Haydi, stillerini analiz edeceğimiz artistlerin isimlerini listeleyelim:" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "['Unknown Artist', 'albrecht-durer', 'boris-kustodiev', 'camille-pissarro', 'childe-hassam', 'claude-monet', 'edgar-degas', 'eugene-boudin', 'gustave-dore', 'ilya-repin', 'ivan-aivazovsky', 'ivan-shishkin', 'john-singer-sargent', 'marc-chagall', 'martiros-saryan', 'nicholas-roerich', 'pablo-picasso', 'paul-cezanne', 'pierre-auguste-renoir', 'pyotr-konchalovsky', 'raphael-kirchner', 'rembrandt', 'salvador-dali', 'vincent-van-gogh']\n" + ] + } + ], + "source": [ + "artists = dataset.distinct(\"artist.label\")\n", + "print(artists)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Benzer Sanat Eserlerini Bulma" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Hoşunuza giden bir sanat eseri bulduğunuzda, onda benzer parçalar bulmak istemeniz doğaldır. Bunu vektör gömüleriyle yapabiliriz! Dahası, çoklu modal gömüleri aracılığıyla, bir tablonun ya da bir şiirin bile tanımı olabilecek, verilen bir metin sorgusunu en yakın temsil eden tabloları bulma yeteğini açacağız.\n", + "\n", + "Haydi, görüntüler için Transformers'tan 🤗 ön-eğitimli bir CLIP Vision Transformer (ViT) modelini kullanarak çoklu modal gömüleri üretelim. [FiftyOne Brain](https://docs.voxel51.com/user_guide/brain.html)'in `compute_similarity()` fonksiyonunu çalıştırmak, bu gömüleri hesaplayacak ve bu gömüleri, veri setinde bir benzerlik indeksi üretmek için kullanacak." + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Computing embeddings...\n", + " 100% |███████████████| 1000/1000 [5.0m elapsed, 0s remaining, 3.3 samples/s] \n" + ] + }, + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "fob.compute_similarity(\n", + " dataset, \n", + " model=\"zero-shot-classification-transformer-torch\", ## type of model to load from model zoo\n", + " name_or_path=\"openai/clip-vit-base-patch32\", ## repo_id of checkpoint\n", + " embeddings=\"clip_embeddings\", ## name of the field to store embeddings\n", + " brain_key=\"clip_sim\", ## key to store similarity index info\n", + " batch_size=32, ## batch size for inference\n", + " )" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "
\n", + "\n", + "Alternatif olarak, modeli doğrudan 🤗 Transformers kütüphanesinden yükleyebilir ve modeli doğrudan kullanabilirsiniz:\n", + "\n", + "```python\n", + "from transformers import CLIPModel\n", + "model = CLIPModel.from_pretrained(\"openai/clip-vit-base-patch32\")\n", + "fob.compute_similarity(\n", + " dataset, \n", + " model=model,\n", + " embeddings=\"clip_embeddings\", ## name of the field to store embeddings\n", + " brain_key=\"clip_sim\" ## key to store similarity index info\n", + ")\n", + "```\n", + "\n", + "Bu ve daha fazlası hakkında daha kapsamlı bir rehber için, FiftyOne'ın 🤗 Transformers entegrasyonunu inceleyin.\n", + "
\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "FiftyOne uygulamasını yenileyin, örnek listedeki bir görüntünün onay kutusunu seçin ve veri kümesindeki en benzer görüntüleri görmek için fotoğraf ikonuna tıklayın. Arka planda, bu butona tıklamak, seçilen görüntüye en çok benzeyen görüntüleri bulan benzerlik indeksi, önceden hesaplanmış gömülere dayanarak bir sorguyu tetikler ve bunları uygulamada gösterir." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "![Image Similarity Search](https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/art_analysis_image_search.gif)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Bunu, verilen sanat eserine hangi sanat eserlerinin en çok benzediğini görmek için kullanabiliriz. Benzer sanat eserlerini bulmak (kullanıcılara önermek ya da bir koleksiyona eklemek için) ya da yeni bir eser için ilham almak amacıyla faydalı olabilir." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Ama dahası var! CLIP çoklu modal olduğu için, anlamsal (semantik) aramalar gerçekleştirmek için de kullanabiliriz! Bu, metin sorgularına dayalı görüntü araması yapabileceğimiz anlamına geliyor. Örneğin, \"pastel ağaçlar\" metniyle arama yapabiliriz ve veri kümesinde bu sorguya benzeyen tüm görüntüleri görebiliriz. Bunu yapmak için FiftyOne uygulamasındaki arama butonuna tıklayın ve bir metin sorgusu girin:" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "![Semantic Search](https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/art_analysis_semantic_search.gif)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Sahne arkasında, metin tokenize edilir, CLIP'in metin kodlayıcısı ile gömülür, ardından veri kümesindeki en benzer görüntüleri bulmak için benzerlik indeksini sorgulamak için kullanılır. Bu, metin sorgularına dayalı görüntü aramak için oldukça etkili bir yöntemdir ve belirli bir tema ya da stille eşleşen görüntüleri bulmak için faydalı olabilir. Ve bu CLIP ile sınırlı değil; görüntüler ve metin için gömüler üretebilen 🤗 Transformers'tan herhangi bir CLIP-benzeri model kullanabilirsiniz!" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "
\n", + "💡 Etkili vektör araması ve büyük veri kümeleri üzerinde indeksleme için, Fifty One'ın açık kaynak vektör veritabanları ile yerel entegrasyonları var.\n", + "
\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Uncovering Artistic Motifs with Clustering and Visualization" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "By performing similarity and semantic searches, we can begin to interact with the data more effectively. But we can also take this a step further and add some unsupervised learning into the mix. This will help us identify artistic patterns in the WikiArt dataset, from stylistic, to topical, and even motifs that are hard to put into words. \n", + "\n", + "We will do this in two ways:\n", + "\n", + "1. **Dimensionality Reduction**: We'll use UMAP to reduce the dimensionality of the embeddings to 2D and visualize the data in a scatter plot. This will allow us to see how the images cluster based on their style, genre, and artist.\n", + "2. **Clustering**: We'll use K-Means clustering to cluster the images based on their embeddings and see what groups emerge." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "For dimensionality reduction, we will run `compute_visualization()` from the FiftyOne Brain, passing in the previously computed embeddings. We specify `method=\"umap\"` to use UMAP for dimensionality reduction, but we could also use PCA or t-SNE:" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Generating visualization...\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/opt/homebrew/Caskroom/miniforge/base/envs/fdev/lib/python3.9/site-packages/numba/cpython/hashing.py:482: UserWarning: FNV hashing is not implemented in Numba. See PEP 456 https://www.python.org/dev/peps/pep-0456/ for rationale over not using FNV. Numba will continue to work, but hashes for built in types will be computed using siphash24. This will permit e.g. dictionaries to continue to behave as expected, however anything relying on the value of the hash opposed to hash as a derived property is likely to not work as expected.\n", + " warnings.warn(msg)\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "UMAP( verbose=True)\n", + "Tue Apr 30 11:51:45 2024 Construct fuzzy simplicial set\n", + "Tue Apr 30 11:51:46 2024 Finding Nearest Neighbors\n", + "Tue Apr 30 11:51:47 2024 Finished Nearest Neighbor Search\n", + "Tue Apr 30 11:51:48 2024 Construct embedding\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "98dde3df324249df91f3336c913b409a", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Epochs completed: 0%| 0/500 [00:00]" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\tcompleted 0 / 500 epochs\n", + "\tcompleted 50 / 500 epochs\n", + "\tcompleted 100 / 500 epochs\n", + "\tcompleted 150 / 500 epochs\n", + "\tcompleted 200 / 500 epochs\n", + "\tcompleted 250 / 500 epochs\n", + "\tcompleted 300 / 500 epochs\n", + "\tcompleted 350 / 500 epochs\n", + "\tcompleted 400 / 500 epochs\n", + "\tcompleted 450 / 500 epochs\n", + "Tue Apr 30 11:51:49 2024 Finished embedding\n" + ] + }, + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "fob.compute_visualization(dataset, embeddings=\"clip_embeddings\", method=\"umap\", brain_key=\"clip_vis\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Now we can open a panel in the FiftyOne App, where we will see one 2D point for each image in the dataset. We can color the points by any field in the dataset, such as the artist or genre, to see how strongly these attributes are captured by our image features:" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "![UMAP Visualization](https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/art_analysis_visualize_embeddings.gif)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We can also run clustering on the embeddings to group similar images together — perhaps the dominant features of these works of art are not captured by the existing labels, or maybe there are distinct sub-genres that we want to identify. To cluster our data, we will need to download the [FiftyOne Clustering Plugin](https://github.com/jacobmarks/clustering-plugin):" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "!fiftyone plugins download https://github.com/jacobmarks/clustering-plugin" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Refreshing the app again, we can then access the clustering functionality via an operator in the app. Hit the backtick key to open the operator list, type \"cluster\" and select the operator from the dropdown. This will open an interactive panel where we can specify the clustering algorithm, hyperparameters, and the field to cluster on. To keep it simple, we'll use K-Means clustering with $10$ clusters." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We can then visualize the clusters in the app and see how the images group together based on their embeddings:" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "![K-means Clustering](https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/art_analysis_clustering.gif)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We can see that some of the clusters select for artist; others select for genre or style. Others are more abstract and may represent sub-genres or other groupings that are not immediately obvious from the data." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Identifying the Most Unique Works of Art" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "One interesting question we can ask about our dataset is how *unique* each image is. This question is important for many applications, such as recommending similar images, detecting duplicates, or identifying outliers. In the context of art, how unique a painting is could be an important factor in determining its value.\n", + "\n", + "While there are a million ways to characterize uniqueness, our image embeddings allow us to quantitatively assign each sample a uniqueness score based on how similar it is to other samples in the dataset. Explicitly, the FiftyOne Brain's `compute_uniqueness()` function looks at the distance between each sample's embedding and its nearest neighbors, and computes a score between $0$ and $1$ based on this distance. A score of $0$ means the sample is nondescript or very similar to others, while a score of $1$ means the sample is very unique." + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Computing uniqueness...\n", + "Uniqueness computation complete\n" + ] + } + ], + "source": [ + "fob.compute_uniqueness(dataset, embeddings=\"clip_embeddings\") # compute uniqueness using CLIP embeddings" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We can then color by this in the embeddings panel, filter by uniqueness score, or even sort by it to see the most unique images in the dataset:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "most_unique_view = dataset.sort_by(\"uniqueness\", reverse=True)\n", + "session.view = most_unique_view.view() # Most unique images" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "![Most Unique Images](https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/art_analysis_most_unique.jpg)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "least_unique_view = dataset.sort_by(\"uniqueness\", reverse=False)\n", + "session.view = least_unique_view.view() # Least unique images" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "![Least Unique Images](https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/art_analysis_least_unique.jpg)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Going a step further, we can also answer the question of which artist tends to produce the most unique works. We can compute the average uniqueness score for each artist across all of their works of art:" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Unknown Artist: 0.7932221632002723\n", + "boris-kustodiev: 0.7480731948424676\n", + "salvador-dali: 0.7368807620414014\n", + "raphael-kirchner: 0.7315448102204755\n", + "ilya-repin: 0.7204744626806383\n", + "marc-chagall: 0.7169373812321908\n", + "rembrandt: 0.715205220292227\n", + "martiros-saryan: 0.708560775790436\n", + "childe-hassam: 0.7018343391132756\n", + "edgar-degas: 0.699912746806587\n", + "albrecht-durer: 0.6969358680800216\n", + "john-singer-sargent: 0.6839955708720844\n", + "pablo-picasso: 0.6835137858302969\n", + "pyotr-konchalovsky: 0.6780653000855895\n", + "nicholas-roerich: 0.6676504687452387\n", + "ivan-aivazovsky: 0.6484361530090199\n", + "vincent-van-gogh: 0.6472004520699081\n", + "gustave-dore: 0.6307283287457358\n", + "pierre-auguste-renoir: 0.6271467146993583\n", + "paul-cezanne: 0.6251076007168186\n", + "eugene-boudin: 0.6103397516167454\n", + "camille-pissarro: 0.6046182609119615\n", + "claude-monet: 0.5998234558947573\n", + "ivan-shishkin: 0.589796389836674\n" + ] + } + ], + "source": [ + "artist_unique_scores = {\n", + " artist: dataset.match(F(\"artist.label\") == artist).mean(\"uniqueness\")\n", + " for artist in artists\n", + "}\n", + "\n", + "sorted_artists = sorted(\n", + " artist_unique_scores, key=artist_unique_scores.get, reverse=True\n", + ")\n", + "\n", + "for artist in sorted_artists:\n", + " print(f\"{artist}: {artist_unique_scores[artist]}\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "It would seem that the artist with the most unique works in our dataset is Boris Kustodiev! Let's take a look at some of his works:" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [], + "source": [ + "kustodiev_view = dataset.match(F(\"artist.label\") == \"boris-kustodiev\")\n", + "session.view = kustodiev_view.view()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "![Boris Kustodiev Artwork](https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/art_analysis_kustodiev_view.jpg)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Sanatın Görsel Özelliklerle Karakterize Edilmesi" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "To round things out, let's go back to the basics and analyze some core qualities of the images in our dataset. We'll compute standard metrics like brightness, contrast, and saturation for each image and see how these metrics correlate with the artistic style and genre of the art pieces." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "To run these analyses, we will need to download the [FiftyOne Image Quality Plugin](https://github.com/jacobmarks/image-quality-issues):" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "!fiftyone plugins download https://github.com/jacobmarks/image-quality-issues/" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Refresh the app and open the operators list again. This time type `compute` and select one of the image quality operators. We'll start with brightness:" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "![Compute Brightness](https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/art_analysis_compute_brightness.gif)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "When the operator finishes running, we will have a new field in our dataset that contains the brightness score for each image. We can then visualize this data in the app:" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "![Brightness](https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/art_analysis_brightness.gif)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We can also color by brightness, and even see how it correlates with other fields in the dataset like style:" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "![Style by Brightness](https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/art_analysis_style_by_brightness.gif)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Now do the same for contrast and saturation. Here are the results for saturation:" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "![Filter by Saturation](https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/art_analysis_filter_by_saturation.jpg)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Hopefully this illustrates how not everything boils down to applying deep neural networks to your data. Sometimes, simple metrics can be just as informative and can provide a different perspective on your data 🤓!" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "
\n", + "📚 For larger datasets, you may want to delegate the operations for later execution.\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## What's Next?" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In this notebook, we've explored how to use multimodal embeddings, unsupervised learning, and traditional image processing techniques to analyze artistic styles in images. We've seen how to perform image similarity and semantic searches, cluster images based on their style, analyze the uniqueness of images, and compute image quality metrics. These techniques can be applied to a wide range of visual datasets, from art collections to medical images to satellite imagery. Try [loading a different dataset from the Hugging Face Hub](https://docs.voxel51.com/integrations/huggingface.html#loading-datasets-from-the-hub) and see what insights you can uncover!\n", + "\n", + "If you want to go even further, here are some additional analyses you could try:\n", + "\n", + "- **Zero-Shot Classification**: Use a pre-trained vision-language model from 🤗 Transformers to categorize images in the dataset by topic or subject, without any training data. Check out this [Zero-Shot Classification tutorial](https://docs.voxel51.com/tutorials/zero_shot_classification.html) for more info.\n", + "- **Image Captioning**: Use a pre-trained vision-language model from 🤗 Transformers to generate captions for the images in the dataset. Then use this for topic modeling or cluster artwork based on embeddings for these captions. Check out FiftyOne's [Image Captioning Plugin](https://github.com/jacobmarks/fiftyone-image-captioning-plugin) for more info." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### 📚 Kaynaklar" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "- [FiftyOne 🤝 🤗 Hub Integration](https://docs.voxel51.com/integrations/huggingface.html#huggingface-hub)\n", + "- [FiftyOne 🤝 🤗 Transformers Integration](https://docs.voxel51.com/integrations/huggingface.html#transformers-library)\n", + "- [FiftyOne Vector Search Integrations](https://voxel51.com/vector-search/)\n", + "- [Visualizing Data with Dimensionality Reduction Techniques](https://docs.voxel51.com/tutorials/dimension_reduction.html)\n", + "- [Clustering Images with Embeddings](https://docs.voxel51.com/tutorials/clustering.html)\n", + "- [Exploring Image Uniqueness with FiftyOne](https://docs.voxel51.com/tutorials/uniqueness.html)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## FiftyOne Açık Kaynak Projesi" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "[FiftyOne](https://github.com/voxel51/fiftyone/) is the leading open source toolkit for building high-quality datasets and computer vision models. With over 2M downloads, FiftyOne is trusted by developers and researchers across the globe.\n", + "\n", + "💪 The FiftyOne team welcomes contributions from the open source community! If you're interested in contributing to FiftyOne, check out the [contributing guide](https://github.com/voxel51/fiftyone/blob/develop/CONTRIBUTING.md)." + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "fdev", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.0" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} From 839e23ebf7992269edda95a2ad773e144893b330 Mon Sep 17 00:00:00 2001 From: aylingumus Date: Fri, 16 May 2025 15:13:28 +0200 Subject: [PATCH 02/11] docs(translation): improve existing translations, and add new translations - keep "multimodal" and "embedding" words as they are --- .../analyzing_art_with_hf_and_fiftyone.ipynb | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb b/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb index a407b529..19e6672c 100644 --- a/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb +++ b/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Çoklu Modal Gömme ile Sanatsal Stillerin Analizi" + "# Multimodal Gömme ile Sanatsal Stillerin Analizi" ] }, { @@ -28,13 +28,13 @@ "source": [ "Görüntüler gibi görsel veriler bilgi açısından inanılmaz derecede zengindir, ancak yapısal olmayan doğası gereği analiz etmesi zordur.\n", "\n", - "Bu not defterinde, çoklu modal gömme yöntemlerini ve hesaplanan öznitelikleri kullanarak resimlerdeki sanatsal stillerin nasıl analiz edileceğini keşfedeceğiz. Veri analizi ve görselleştirme için kullanmak üzere FiftyOne'a yükleyeceğimiz 🤗 Hub'dan [WikiArt veri kümesini](https://huggingface.co/datasets/huggan/wikiart) kullanacağız. Verilere birçok farklı açıdan göz atacağız:\n", + "Bu not defterinde, multimodal embedding yöntemlerini ve hesaplanan öznitelikleri kullanarak resimlerdeki sanatsal stillerin nasıl analiz edileceğini keşfedeceğiz. Veri analizi ve görselleştirme için kullanmak üzere FiftyOne'a yükleyeceğimiz 🤗 Hub'dan [WikiArt veri kümesini](https://huggingface.co/datasets/huggan/wikiart) kullanacağız. Verilere birçok farklı açıdan göz atacağız:\n", "\n", - "- **Görüntü Benzerliği Arama ve Anlamsal (Semantik) Arama**: 🤗 Transformers'tan ön-eğitimli [CLIP](https://huggingface.co/openai/clip-vit-base-patch32) modelini kullanarak çoklu modal gömüleri üreteceğiz ve yapısal olmayan aramalara izin vermek için veriyi indeksleyeceğiz.\n", + "- **Görüntü Benzerliği Arama ve Anlamsal (Semantik) Arama**: 🤗 Transformers'tan ön-eğitimli [CLIP](https://huggingface.co/openai/clip-vit-base-patch32) modelini kullanarak multimodal embedding'leri üreteceğiz ve yapısal olmayan aramalara izin vermek için veriyi indeksleyeceğiz.\n", "\n", - "- **Kümeleme ve Görselleştirme**: Gömüleri kullanarak görüntüleri sanatsal stillerine göre kümeleyeceğiz ve UMAP boyut indirgeme yöntemini kullanarak sonuçları görselleştireceğiz.\n", + "- **Kümeleme ve Görselleştirme**: Embedding'leri kullanarak görüntüleri sanatsal stillerine göre kümeleyeceğiz ve UMAP boyut indirgeme yöntemini kullanarak sonuçları görselleştireceğiz.\n", "\n", - "- **Benzersizlik Analizi**: Veri kümesindeki diğer görüntülere ne kadar benzediğine bağlı olarak her görüntü için benzersizlik skoru atamak için gömülerimizi kullanacağız.\n", + "- **Benzersizlik Analizi**: Veri kümesindeki diğer görüntülere ne kadar benzediğine bağlı olarak her görüntü için benzersizlik skoru atamak için embedding'lerimizi kullanacağız.\n", "\n", "- **Görüntü Kalitesi Analizi**: Her bir görüntü için parlaklık, kontrast ve doygunluk gibi görüntü kalite metriklerini hesaplayacağız ve bu metriklerin, görüntülerin sanatsal stili ile nasıl ilişkili olduğunu göreceğiz." ] @@ -227,9 +227,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Hoşunuza giden bir sanat eseri bulduğunuzda, onda benzer parçalar bulmak istemeniz doğaldır. Bunu vektör gömüleriyle yapabiliriz! Dahası, çoklu modal gömüleri aracılığıyla, bir tablonun ya da bir şiirin bile tanımı olabilecek, verilen bir metin sorgusunu en yakın temsil eden tabloları bulma yeteğini açacağız.\n", + "Hoşunuza giden bir sanat eseri bulduğunuzda, ona benzer parçalar bulmak istemeniz doğaldır. Bunu vektör embedding'leriyle yapabiliriz! Dahası, multimodal embedding'leri aracılığıyla, bir tablonun ya da bir şiirin bile tanımı olabilecek, verilen bir metin sorgusunu en yakın temsil eden tabloları bulma yeteğini açacağız.\n", "\n", - "Haydi, görüntüler için Transformers'tan 🤗 ön-eğitimli bir CLIP Vision Transformer (ViT) modelini kullanarak çoklu modal gömüleri üretelim. [FiftyOne Brain](https://docs.voxel51.com/user_guide/brain.html)'in `compute_similarity()` fonksiyonunu çalıştırmak, bu gömüleri hesaplayacak ve bu gömüleri, veri setinde bir benzerlik indeksi üretmek için kullanacak." + "Haydi, görüntüler için Transformers'tan 🤗 ön-eğitimli bir CLIP Vision Transformer (ViT) modelini kullanarak multimodal embedding'leri üretelim. [FiftyOne Brain](https://docs.voxel51.com/user_guide/brain.html)'in `compute_similarity()` fonksiyonunu çalıştırmak, bu embedding'leri hesaplayacak ve bu embedding'leri, veri setinde bir benzerlik indeksi üretmek için kullanacak." ] }, { @@ -294,7 +294,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "FiftyOne uygulamasını yenileyin, örnek listedeki bir görüntünün onay kutusunu seçin ve veri kümesindeki en benzer görüntüleri görmek için fotoğraf ikonuna tıklayın. Arka planda, bu butona tıklamak, seçilen görüntüye en çok benzeyen görüntüleri bulan benzerlik indeksi, önceden hesaplanmış gömülere dayanarak bir sorguyu tetikler ve bunları uygulamada gösterir." + "FiftyOne uygulamasını yenileyin, örnek listedeki bir görüntünün onay kutusunu seçin ve veri kümesindeki en benzer görüntüleri görmek için fotoğraf ikonuna tıklayın. Arka planda, bu butona tıklamak, seçilen görüntüye en çok benzeyen görüntüleri bulan benzerlik indeksi, önceden hesaplanmış embedding'lere dayanarak bir sorguyu tetikler ve bunları uygulamada gösterir." ] }, { @@ -315,7 +315,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Ama dahası var! CLIP çoklu modal olduğu için, anlamsal (semantik) aramalar gerçekleştirmek için de kullanabiliriz! Bu, metin sorgularına dayalı görüntü araması yapabileceğimiz anlamına geliyor. Örneğin, \"pastel ağaçlar\" metniyle arama yapabiliriz ve veri kümesinde bu sorguya benzeyen tüm görüntüleri görebiliriz. Bunu yapmak için FiftyOne uygulamasındaki arama butonuna tıklayın ve bir metin sorgusu girin:" + "Ama dahası var! CLIP multimodal olduğu için, anlamsal (semantik) aramalar gerçekleştirmek için de kullanabiliriz! Bu, metin sorgularına dayalı görüntü araması yapabileceğimiz anlamına geliyor. Örneğin, \"pastel ağaçlar\" metniyle arama yapabiliriz ve veri kümesinde bu sorguya benzeyen tüm görüntüleri görebiliriz. Bunu yapmak için FiftyOne uygulamasındaki arama butonuna tıklayın ve bir metin sorgusu girin:" ] }, { @@ -329,7 +329,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Sahne arkasında, metin tokenize edilir, CLIP'in metin kodlayıcısı ile gömülür, ardından veri kümesindeki en benzer görüntüleri bulmak için benzerlik indeksini sorgulamak için kullanılır. Bu, metin sorgularına dayalı görüntü aramak için oldukça etkili bir yöntemdir ve belirli bir tema ya da stille eşleşen görüntüleri bulmak için faydalı olabilir. Ve bu CLIP ile sınırlı değil; görüntüler ve metin için gömüler üretebilen 🤗 Transformers'tan herhangi bir CLIP-benzeri model kullanabilirsiniz!" + "Sahne arkasında, metin tokenize edilir, CLIP'in metin kodlayıcısı ile gömülür, ardından veri kümesindeki en benzer görüntüleri bulmak için benzerlik indeksini sorgulamak için kullanılır. Bu, metin sorgularına dayalı görüntü aramak için oldukça etkili bir yöntemdir ve belirli bir tema ya da stille eşleşen görüntüleri bulmak için faydalı olabilir. Ve bu CLIP ile sınırlı değil; görüntüler ve metin için embedding'ler üretebilen 🤗 Transformers'tan herhangi bir CLIP-benzeri model kullanabilirsiniz!" ] }, { @@ -345,26 +345,26 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Uncovering Artistic Motifs with Clustering and Visualization" + "## Kümeleme ve Görselleştirme ile Sanatsal Motiflerin Ortaya Çıkarılması" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "By performing similarity and semantic searches, we can begin to interact with the data more effectively. But we can also take this a step further and add some unsupervised learning into the mix. This will help us identify artistic patterns in the WikiArt dataset, from stylistic, to topical, and even motifs that are hard to put into words. \n", + "Benzerlik ve anlamsal (semantik) aramalar yaparak verilerle daha etkili bir şekilde etkileşim kurmaya başlayabiliriz. Ancak bunu bir adım daha ileri götürebilir ve işin içine biraz da denetimsiz öğrenme ekleyebiliriz. Bu, WikiArt veri kümesindeki sanatsal paternleri belirlememize yardımcı olacak; stilistik, topikal ve hatta kelimelerle ifade edilmesi zor olan motifleri bile.\n", "\n", - "We will do this in two ways:\n", + "Bunu iki yöntemle yapacağız:\n", "\n", - "1. **Dimensionality Reduction**: We'll use UMAP to reduce the dimensionality of the embeddings to 2D and visualize the data in a scatter plot. This will allow us to see how the images cluster based on their style, genre, and artist.\n", - "2. **Clustering**: We'll use K-Means clustering to cluster the images based on their embeddings and see what groups emerge." + "1. **Boyut İndirgeme**: Embedding'lerin boyutunu 2B'ye indirgemek ve verileri bir dağılım grafiğinde görselleştirmek için UMAP yöntemini kullanacağız. Bu, görüntülerin stillerine, türlerine ve artistlerine göre nasıl kümelendiğini görmemizi sağlayacaktır.\n", + "2. **Kümeleme**: Görüntüleri embedding'lerine göre kümelemek ve hangi grupların ortaya çıktığını görmek için K-Means kümeleme yöntemini kullanacağız." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "For dimensionality reduction, we will run `compute_visualization()` from the FiftyOne Brain, passing in the previously computed embeddings. We specify `method=\"umap\"` to use UMAP for dimensionality reduction, but we could also use PCA or t-SNE:" + "Boyut indirgeme için, önceden hesaplanmış embedding'leri parametre olarak geçerek FiftyOne Brain'den `compute_visualization()` fonksiyonunu çalıştıracağız. Boyut indirgeme amacıyla UMAP yöntemini kullanmak için `method=\"umap\"` olarak belirtiyoruz, ancak PCA veya t-SNE de kullanabiliriz:" ] }, { @@ -448,7 +448,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Now we can open a panel in the FiftyOne App, where we will see one 2D point for each image in the dataset. We can color the points by any field in the dataset, such as the artist or genre, to see how strongly these attributes are captured by our image features:" + "Şimdi FiftyOne uygulamasında veri kümesindeki her görüntü için 2B bir nokta göreceğimiz bir panel açabiliriz. Bu niteliklerin görüntü özelliklerimiz tarafından ne kadar güçlü bir şekilde yakalandığını görmek için, veri kümesindeki noktaları artist veya tür gibi alanlara göre renklendirebiliriz:" ] }, { From 042c234333011ea5b464a2a0828df77f307eeecf Mon Sep 17 00:00:00 2001 From: aylingumus Date: Fri, 16 May 2025 16:19:03 +0200 Subject: [PATCH 03/11] docs(translation): finalize translation for "Uncovering Artistic Motifs" section --- notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb b/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb index 19e6672c..c3c6a5b0 100644 --- a/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb +++ b/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb @@ -462,7 +462,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We can also run clustering on the embeddings to group similar images together — perhaps the dominant features of these works of art are not captured by the existing labels, or maybe there are distinct sub-genres that we want to identify. To cluster our data, we will need to download the [FiftyOne Clustering Plugin](https://github.com/jacobmarks/clustering-plugin):" + "Benzer görüntüleri bir arada gruplayabilmek için embedding'ler üzerinde kümeleme de yapabiliriz — belki bu sanat eserlerinin dominant özellikleri halihazırda var olan etiketler tarafından algılanmamıştır ya da belki tanımlamak istediğimiz farklı alt türler vardır. Verilerimizi kümelemek için [FiftyOne Clustering Plugin](https://github.com/jacobmarks/clustering-plugin)'i indirmemiz gerekecek:" ] }, { @@ -478,14 +478,14 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Refreshing the app again, we can then access the clustering functionality via an operator in the app. Hit the backtick key to open the operator list, type \"cluster\" and select the operator from the dropdown. This will open an interactive panel where we can specify the clustering algorithm, hyperparameters, and the field to cluster on. To keep it simple, we'll use K-Means clustering with $10$ clusters." + "Uygulamayı tekrar yenileyerek, kümeleme fonksiyonalitesine uygulamadaki bir operatör yardımıyla erişebiliriz. Operatör listesini açmak için ters tırnak tuşuna basın, \"cluster\" yazın ve açılan menüden operatörü seçin. Bu, kümeleme algoritmasını, hiperparametreleri ve kümelenecek alanı belirleyebileceğimiz etkileşimli bir panel açacaktır. Basit tutmak için, $10$ küme ile K-Means kümelemesini kullanacağız:" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "We can then visualize the clusters in the app and see how the images group together based on their embeddings:" + "Böylelikle kümeleri uygulamada görselleştirebilir ve görüntülerin embedding'lerine göre nasıl gruplandığını görebiliriz:" ] }, { @@ -499,7 +499,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We can see that some of the clusters select for artist; others select for genre or style. Others are more abstract and may represent sub-genres or other groupings that are not immediately obvious from the data." + "Bazı kümelerin artisti, bazılarının ise türü veya stili temel aldığını görebiliriz. Diğerleri ise daha soyut ve veriden ilk bakışta anlaşılamayan alt türleri veya diğer gruplamaları temsil edebilir." ] }, { From 8cc407933ff0aa62d656beffb349a8f41eca3ce6 Mon Sep 17 00:00:00 2001 From: aylingumus Date: Fri, 16 May 2025 17:54:27 +0200 Subject: [PATCH 04/11] docs(translation): translate "Identifying the Most Unique Works of Art" section --- .../tr/analyzing_art_with_hf_and_fiftyone.ipynb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb b/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb index c3c6a5b0..9b3c6bc9 100644 --- a/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb +++ b/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb @@ -506,16 +506,16 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Identifying the Most Unique Works of Art" + "## En Benzersiz Sanat Eserlerinin Belirlenmesi" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "One interesting question we can ask about our dataset is how *unique* each image is. This question is important for many applications, such as recommending similar images, detecting duplicates, or identifying outliers. In the context of art, how unique a painting is could be an important factor in determining its value.\n", + "Veri kümemiz hakkında sorabileceğimiz ilginç sorulardan biri, her görüntünün ne kadar eşsiz olduğudur. Bu soru, benzer görüntüleri önerilmesi, kopyaların tespit edilmesi veya aykırı değerlerin belirlenmesi gibi birçok uygulama için önemlidir. Sanat eseri bağlamında, bir tablonun ne kadar eşsiz olduğu, onun değerini belirlemede önemli bir faktör olabilir.\n", "\n", - "While there are a million ways to characterize uniqueness, our image embeddings allow us to quantitatively assign each sample a uniqueness score based on how similar it is to other samples in the dataset. Explicitly, the FiftyOne Brain's `compute_uniqueness()` function looks at the distance between each sample's embedding and its nearest neighbors, and computes a score between $0$ and $1$ based on this distance. A score of $0$ means the sample is nondescript or very similar to others, while a score of $1$ means the sample is very unique." + "Benzersizliği tanımlamanın milyonlarca yolu olsa da, görüntü embedding'lerimiz, her örneğe veri kümesindeki diğer örneklere ne kadar benzer olduğuna göre nicel olarak bir benzersizlik skoru atamamızı sağlar. Açıkçası, FiftyOne Brain'in `compute_uniqueness()` fonksiyonu, her örneğin embedding'i ile en yakın komşuları arasındaki mesafeye bakar ve bu mesafeye göre $0$ ile $1$ arasında bir skor hesaplar. Skorun $0$ olması, örneğin belirgin olmayan veya diğerlerine çok benzeyen bir örnek olduğunu; $1$ olması ise çok benzersiz bir örnek olduğunu gösterir." ] }, { @@ -540,7 +540,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We can then color by this in the embeddings panel, filter by uniqueness score, or even sort by it to see the most unique images in the dataset:" + "Böylece embedding panelinde buna göre renklendirme yapabilir, benzersizlik skoruna göre filtreleyebilir ve hatta sıralayarak veri kümesindeki en benzersiz görüntüleri görebiliriz." ] }, { @@ -581,7 +581,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Going a step further, we can also answer the question of which artist tends to produce the most unique works. We can compute the average uniqueness score for each artist across all of their works of art:" + "Bir adım daha ileriye giderek, hangi artistin en benzersiz eserleri üretme eğiliminde olduğu sorusunu da cevaplayabiliriz. Her artistin tüm sanat eserleri için ortalama benzersizlik skorunu hesaplayabiliriz." ] }, { @@ -638,7 +638,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "It would seem that the artist with the most unique works in our dataset is Boris Kustodiev! Let's take a look at some of his works:" + "Görünüşe göre, veri kümemizdeki en benzersiz eserlere sahip artist Boris Kustodiev! Hadi bazı eserlerine göz atalım:" ] }, { From 85206d3eed37d01551229c12d39b984de0ece550 Mon Sep 17 00:00:00 2001 From: aylingumus Date: Fri, 16 May 2025 18:50:42 +0200 Subject: [PATCH 05/11] docs(translation): translate "Characterizing Art with Visual Qualities" section --- .../analyzing_art_with_hf_and_fiftyone.ipynb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb b/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb index 9b3c6bc9..5bd4f4eb 100644 --- a/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb +++ b/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb @@ -662,21 +662,21 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Sanatın Görsel Özelliklerle Karakterize Edilmesi" + "## Sanat Eserinin Görsel Özelliklerle Karakterize Edilmesi" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "To round things out, let's go back to the basics and analyze some core qualities of the images in our dataset. We'll compute standard metrics like brightness, contrast, and saturation for each image and see how these metrics correlate with the artistic style and genre of the art pieces." + "Her şeyi toparlayacak olursak, temel konulara geri dönelim ve veri kümemizdeki görüntülerin bazı temel özelliklerini analiz edelim. Her bir görüntü için parlaklık, kontrast ve doygunluk gibi standart metrikleri hesaplayacağız ve bu metriklerin sanat eserlerinin artistik stili ve türü ile nasıl ilişkili olduğunu göreceğiz." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "To run these analyses, we will need to download the [FiftyOne Image Quality Plugin](https://github.com/jacobmarks/image-quality-issues):" + "Bu analizleri yapmak için, [FiftyOne Image Quality Plugin](https://github.com/jacobmarks/image-quality-issues)'ini indirmemiz gerekecek:" ] }, { @@ -692,7 +692,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Refresh the app and open the operators list again. This time type `compute` and select one of the image quality operators. We'll start with brightness:" + "Uygulamayı yenileyin ve operatör listesini tekrar açın. Bu kez `compute` yazın ve görüntü kalitesi operatörlerinden birini seçin. Parlaklık ile başlayacağız:" ] }, { @@ -706,7 +706,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "When the operator finishes running, we will have a new field in our dataset that contains the brightness score for each image. We can then visualize this data in the app:" + "Operatör çalışmayı tamamladığında, her bir görüntü için parlaklık skoru içeren yeni bir alan veri kümemize eklenmiş olacak. Böylece bu veriyi uygulamada görselleştirebiliriz:" ] }, { @@ -720,7 +720,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We can also color by brightness, and even see how it correlates with other fields in the dataset like style:" + "Aynı zamanda parlaklığa göre renklendirebilir ve hatta stil gibi veri kümesindeki diğer alanlarla nasıl ilişkili olduğunu da görebiliriz:" ] }, { @@ -734,7 +734,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Now do the same for contrast and saturation. Here are the results for saturation:" + "Şimdi aynı işlemi kontrast ve doygunluk için de yapalım. İşte doygunluk için elde edilen sonuçlar:" ] }, { @@ -748,7 +748,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Hopefully this illustrates how not everything boils down to applying deep neural networks to your data. Sometimes, simple metrics can be just as informative and can provide a different perspective on your data 🤓!" + "Umarız bu, verilerinize derin sinir ağları uygulamanın her şey demek olmadığını gösteriyordur. Bazen basit metrikler de en az onlar kadar bilgi verebilir ve verinize farklı bir bakış açısı kazandırabilir 🤓!" ] }, { @@ -756,7 +756,7 @@ "metadata": {}, "source": [ "
\n", - "📚 For larger datasets, you may want to delegate the operations for later execution.\n", + "📚 Daha büyük veri kümeleri için, işlemleri daha sonra yürütülmek üzere devretmeyi düşünebilirsiniz.\n", "
" ] }, From e9a08cabe6eda9362da2f5039cfe2be3360ead75 Mon Sep 17 00:00:00 2001 From: aylingumus Date: Fri, 16 May 2025 19:35:39 +0200 Subject: [PATCH 06/11] docs(translation): translate the final part --- .../tr/analyzing_art_with_hf_and_fiftyone.ipynb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb b/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb index 5bd4f4eb..654861e7 100644 --- a/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb +++ b/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb @@ -764,19 +764,19 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## What's Next?" + "## Sırada Ne Var?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "In this notebook, we've explored how to use multimodal embeddings, unsupervised learning, and traditional image processing techniques to analyze artistic styles in images. We've seen how to perform image similarity and semantic searches, cluster images based on their style, analyze the uniqueness of images, and compute image quality metrics. These techniques can be applied to a wide range of visual datasets, from art collections to medical images to satellite imagery. Try [loading a different dataset from the Hugging Face Hub](https://docs.voxel51.com/integrations/huggingface.html#loading-datasets-from-the-hub) and see what insights you can uncover!\n", + "Bu not defterinde, görüntülerdeki artistik stilleri analiz etmek için, multimodal embedding'leri nasıl kullanacağımızı, gözetimsiz öğrenmeyi ve geleneksel görüntü işleme tekniklerini keşfettik. Görüntü benzerliği ve anlamsal (semantik) arama işlemlerini nasıl gerçekleştirebileceğimizi, görüntüleri stillerine göre nasıl kümeleyeceğimizi, görüntülerin benzersizliğini nasıl analiz edeceğimizi ve görüntü kalite metriklerini nasıl hesaplayacağımızı gördük. Bu teknikler, sanat eseri koleksiyonlarından tıbbi görüntülere veya uydu görüntülerine kadar çok çeşitli görsel veri kümelerine uygulanabilir. [Hugging Face Hub üzerinden farklı bir veri kümesi yüklemeyi deneyin](https://docs.voxel51.com/integrations/huggingface.html#loading-datasets-from-the-hub) ve veriye hangi farklı bakış açılarıyla yaklaşabileceğinizi keşfedin!\n", "\n", - "If you want to go even further, here are some additional analyses you could try:\n", + "Daha da ileri gitmek isterseniz, aşağıdaki bazı ek analizleri de deneyebilirsiniz:\n", "\n", - "- **Zero-Shot Classification**: Use a pre-trained vision-language model from 🤗 Transformers to categorize images in the dataset by topic or subject, without any training data. Check out this [Zero-Shot Classification tutorial](https://docs.voxel51.com/tutorials/zero_shot_classification.html) for more info.\n", - "- **Image Captioning**: Use a pre-trained vision-language model from 🤗 Transformers to generate captions for the images in the dataset. Then use this for topic modeling or cluster artwork based on embeddings for these captions. Check out FiftyOne's [Image Captioning Plugin](https://github.com/jacobmarks/fiftyone-image-captioning-plugin) for more info." + "- **Sıfır-Atış Sınıflandırma (Zero-Shot Classification)**: 🤗 Transformers tarafından önceden eğitilmiş bir görsel-dil modelini kullanarak, herhangi bir eğitim verisine ihtiyaç duymadan, veri kümesindeki görüntüleri konuya ya da içeriğe göre sınıflandırabilirsiniz. Daha fazla bilgi için [Zero-Shot Classification eğitimi](https://docs.voxel51.com/tutorials/zero_shot_classification.html)'ne göz atın.\n", + "- **Görüntü Açıklama (Image Captioning)**: 🤗 Transformers tarafından önceden eğitilmiş bir görsel-dil modelini kullanarak, veri kümesindeki görseller için açıklamalar (caption) oluşturabilirsiniz. Bu açıklamaları konu modellemesinde kullanabilir veya bu açıklamaların embedding'lerine göre sanat eserlerini kümelendirebilirsiniz. Daha fazla bilgi için FiftyOne'ın [Image Captioning Plugin](https://github.com/jacobmarks/fiftyone-image-captioning-plugin)'ine göz atın." ] }, { @@ -809,9 +809,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "[FiftyOne](https://github.com/voxel51/fiftyone/) is the leading open source toolkit for building high-quality datasets and computer vision models. With over 2M downloads, FiftyOne is trusted by developers and researchers across the globe.\n", + "[FiftyOne](https://github.com/voxel51/fiftyone/) yüksek kalitede veri kümeleri ve bilgisayarla görme modelleri oluşturmak için kullanılan önde gelen açık kaynak araç setidir. 2 milyondan fazla kez indirilen FiftyOne, dünya genelindeki geliştiriciler ve araştırmacılar tarafından güvenle kullanılmaktadır.\n", "\n", - "💪 The FiftyOne team welcomes contributions from the open source community! If you're interested in contributing to FiftyOne, check out the [contributing guide](https://github.com/voxel51/fiftyone/blob/develop/CONTRIBUTING.md)." + "💪 FiftyOne ekibi, açık kaynak topluluğundan gelen katkıları memnuniyetle karşılar! Eğer FiftyOne'a katkıda bulunmak istiyorsanız, [katkı rehberine](https://github.com/voxel51/fiftyone/blob/develop/CONTRIBUTING.md) göz atabilirsiniz." ] } ], From 190878dd6b538644fb63b8aac9d689fb0730b349 Mon Sep 17 00:00:00 2001 From: aylingumus Date: Fri, 16 May 2025 19:37:03 +0200 Subject: [PATCH 07/11] docs(translation): make slight improvements --- notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb b/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb index 654861e7..6f2d8a21 100644 --- a/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb +++ b/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb @@ -43,7 +43,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Haydi başlayalım! 🚀" + "## Hadi başlayalım! 🚀" ] }, { @@ -195,7 +195,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Haydi, stillerini analiz edeceğimiz artistlerin isimlerini listeleyelim:" + "Hadi, stillerini analiz edeceğimiz artistlerin isimlerini listeleyelim:" ] }, { @@ -229,7 +229,7 @@ "source": [ "Hoşunuza giden bir sanat eseri bulduğunuzda, ona benzer parçalar bulmak istemeniz doğaldır. Bunu vektör embedding'leriyle yapabiliriz! Dahası, multimodal embedding'leri aracılığıyla, bir tablonun ya da bir şiirin bile tanımı olabilecek, verilen bir metin sorgusunu en yakın temsil eden tabloları bulma yeteğini açacağız.\n", "\n", - "Haydi, görüntüler için Transformers'tan 🤗 ön-eğitimli bir CLIP Vision Transformer (ViT) modelini kullanarak multimodal embedding'leri üretelim. [FiftyOne Brain](https://docs.voxel51.com/user_guide/brain.html)'in `compute_similarity()` fonksiyonunu çalıştırmak, bu embedding'leri hesaplayacak ve bu embedding'leri, veri setinde bir benzerlik indeksi üretmek için kullanacak." + "Hadi, görüntüler için Transformers'tan 🤗 ön-eğitimli bir CLIP Vision Transformer (ViT) modelini kullanarak multimodal embedding'leri üretelim. [FiftyOne Brain](https://docs.voxel51.com/user_guide/brain.html)'in `compute_similarity()` fonksiyonunu çalıştırmak, bu embedding'leri hesaplayacak ve bu embedding'leri, veri setinde bir benzerlik indeksi üretmek için kullanacak." ] }, { From 0c249a2349b93b3fba3f0a6fe0de3798aa56fefa Mon Sep 17 00:00:00 2001 From: aylingumus Date: Mon, 19 May 2025 18:49:42 +0200 Subject: [PATCH 08/11] docs(translation): add the translated recipe in _toctree.yml file --- notebooks/tr/_toctree.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/notebooks/tr/_toctree.yml b/notebooks/tr/_toctree.yml index 6671d588..3ae100b0 100644 --- a/notebooks/tr/_toctree.yml +++ b/notebooks/tr/_toctree.yml @@ -11,6 +11,13 @@ title: Özel Bir Veri Seti Üzerinde Anlamsal Segmentasyon Modeli Fine-Tuning ve Inference API Üzerinden Kullanımı - local: fine_tuning_detr_custom_dataset title: Özel Verisetini DETR Modeli ile Fine-Tuning ederek Nesne Tespiti Yapımı 🖼, Spaces Üzerinde Gösterimi ve Gradio API Entegrasyonu + + - title: Multimodal Tarifleri + isExpanded: false + sections: + - local: analyzing_art_with_hf_and_fiftyone + title: Multimodal Embedding ile Sanatsal Stillerin Analizi + - title: Ajanlar için Tarifler isExpanded: false sections: From 064e50fc369a1afc061080f61ff66c70d8b74e0e Mon Sep 17 00:00:00 2001 From: aylingumus Date: Mon, 19 May 2025 18:51:20 +0200 Subject: [PATCH 09/11] docs(translation): make slight improvements on translation for consistency --- notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb b/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb index 6f2d8a21..d5dd7311 100644 --- a/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb +++ b/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Multimodal Gömme ile Sanatsal Stillerin Analizi" + "# Multimodal Embedding ile Sanatsal Stillerin Analizi" ] }, { @@ -669,7 +669,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Her şeyi toparlayacak olursak, temel konulara geri dönelim ve veri kümemizdeki görüntülerin bazı temel özelliklerini analiz edelim. Her bir görüntü için parlaklık, kontrast ve doygunluk gibi standart metrikleri hesaplayacağız ve bu metriklerin sanat eserlerinin artistik stili ve türü ile nasıl ilişkili olduğunu göreceğiz." + "Her şeyi toparlayacak olursak, temel konulara geri dönelim ve veri kümemizdeki görüntülerin bazı temel özelliklerini analiz edelim. Her bir görüntü için parlaklık, kontrast ve doygunluk gibi standart metrikleri hesaplayacağız ve bu metriklerin sanat eserlerinin sanatsal stili ve türü ile nasıl ilişkili olduğunu göreceğiz." ] }, { @@ -771,7 +771,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Bu not defterinde, görüntülerdeki artistik stilleri analiz etmek için, multimodal embedding'leri nasıl kullanacağımızı, gözetimsiz öğrenmeyi ve geleneksel görüntü işleme tekniklerini keşfettik. Görüntü benzerliği ve anlamsal (semantik) arama işlemlerini nasıl gerçekleştirebileceğimizi, görüntüleri stillerine göre nasıl kümeleyeceğimizi, görüntülerin benzersizliğini nasıl analiz edeceğimizi ve görüntü kalite metriklerini nasıl hesaplayacağımızı gördük. Bu teknikler, sanat eseri koleksiyonlarından tıbbi görüntülere veya uydu görüntülerine kadar çok çeşitli görsel veri kümelerine uygulanabilir. [Hugging Face Hub üzerinden farklı bir veri kümesi yüklemeyi deneyin](https://docs.voxel51.com/integrations/huggingface.html#loading-datasets-from-the-hub) ve veriye hangi farklı bakış açılarıyla yaklaşabileceğinizi keşfedin!\n", + "Bu not defterinde, görüntülerdeki sanatsal stilleri analiz etmek için, multimodal embedding'leri nasıl kullanacağımızı, gözetimsiz öğrenmeyi ve geleneksel görüntü işleme tekniklerini keşfettik. Görüntü benzerliği ve anlamsal (semantik) arama işlemlerini nasıl gerçekleştirebileceğimizi, görüntüleri stillerine göre nasıl kümeleyeceğimizi, görüntülerin benzersizliğini nasıl analiz edeceğimizi ve görüntü kalite metriklerini nasıl hesaplayacağımızı gördük. Bu teknikler, sanat eseri koleksiyonlarından tıbbi görüntülere veya uydu görüntülerine kadar çok çeşitli görsel veri kümelerine uygulanabilir. [Hugging Face Hub üzerinden farklı bir veri kümesi yüklemeyi deneyin](https://docs.voxel51.com/integrations/huggingface.html#loading-datasets-from-the-hub) ve veriye hangi farklı bakış açılarıyla yaklaşabileceğinizi keşfedin!\n", "\n", "Daha da ileri gitmek isterseniz, aşağıdaki bazı ek analizleri de deneyebilirsiniz:\n", "\n", From f81f5e286664b1495d97e0f36c766b4d873ec292 Mon Sep 17 00:00:00 2001 From: aylingumus Date: Mon, 19 May 2025 19:58:05 +0200 Subject: [PATCH 10/11] chore: remove an additional empty line on _toctree.yml file after resolving conflict --- notebooks/tr/_toctree.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/notebooks/tr/_toctree.yml b/notebooks/tr/_toctree.yml index a9e3073c..df2d0087 100644 --- a/notebooks/tr/_toctree.yml +++ b/notebooks/tr/_toctree.yml @@ -19,7 +19,6 @@ title: Özel Verisetini DETR Modeli ile Fine-Tuning ederek Nesne Tespiti Yapımı 🖼, Spaces Üzerinde Gösterimi ve Gradio API Entegrasyonu - local: fine_tuning_vit_custom_dataset title: Vision Transformer Modelini Özel Bir Biyomedikal Verisetiyle Fine-Tune Etmek - - title: Multimodal Tarifleri isExpanded: false From 784c8ddc28d297182726b7bb3d282d65cb4caf74 Mon Sep 17 00:00:00 2001 From: aylingumus Date: Tue, 20 May 2025 00:37:23 +0200 Subject: [PATCH 11/11] docs(translation): make small translation improvements for consistency --- notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb b/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb index d5dd7311..62557631 100644 --- a/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb +++ b/notebooks/tr/analyzing_art_with_hf_and_fiftyone.ipynb @@ -30,7 +30,7 @@ "\n", "Bu not defterinde, multimodal embedding yöntemlerini ve hesaplanan öznitelikleri kullanarak resimlerdeki sanatsal stillerin nasıl analiz edileceğini keşfedeceğiz. Veri analizi ve görselleştirme için kullanmak üzere FiftyOne'a yükleyeceğimiz 🤗 Hub'dan [WikiArt veri kümesini](https://huggingface.co/datasets/huggan/wikiart) kullanacağız. Verilere birçok farklı açıdan göz atacağız:\n", "\n", - "- **Görüntü Benzerliği Arama ve Anlamsal (Semantik) Arama**: 🤗 Transformers'tan ön-eğitimli [CLIP](https://huggingface.co/openai/clip-vit-base-patch32) modelini kullanarak multimodal embedding'leri üreteceğiz ve yapısal olmayan aramalara izin vermek için veriyi indeksleyeceğiz.\n", + "- **Görüntü Benzerliği Arama ve Anlamsal (Semantik) Arama**: 🤗 Transformers tarafından önceden eğitilmiş bir [CLIP](https://huggingface.co/openai/clip-vit-base-patch32) modelini kullanarak multimodal embedding'leri üreteceğiz ve yapısal olmayan aramalara izin vermek için veriyi indeksleyeceğiz.\n", "\n", "- **Kümeleme ve Görselleştirme**: Embedding'leri kullanarak görüntüleri sanatsal stillerine göre kümeleyeceğiz ve UMAP boyut indirgeme yöntemini kullanarak sonuçları görselleştireceğiz.\n", "\n", @@ -229,7 +229,7 @@ "source": [ "Hoşunuza giden bir sanat eseri bulduğunuzda, ona benzer parçalar bulmak istemeniz doğaldır. Bunu vektör embedding'leriyle yapabiliriz! Dahası, multimodal embedding'leri aracılığıyla, bir tablonun ya da bir şiirin bile tanımı olabilecek, verilen bir metin sorgusunu en yakın temsil eden tabloları bulma yeteğini açacağız.\n", "\n", - "Hadi, görüntüler için Transformers'tan 🤗 ön-eğitimli bir CLIP Vision Transformer (ViT) modelini kullanarak multimodal embedding'leri üretelim. [FiftyOne Brain](https://docs.voxel51.com/user_guide/brain.html)'in `compute_similarity()` fonksiyonunu çalıştırmak, bu embedding'leri hesaplayacak ve bu embedding'leri, veri setinde bir benzerlik indeksi üretmek için kullanacak." + "Hadi, görüntüler için 🤗 Transformers tarafından önceden eğitilmiş bir CLIP Vision Transformer (ViT) modelini kullanarak multimodal embedding'leri üretelim. [FiftyOne Brain](https://docs.voxel51.com/user_guide/brain.html)'in `compute_similarity()` fonksiyonunu çalıştırmak, bu embedding'leri hesaplayacak ve bu embedding'leri, veri setinde bir benzerlik indeksi üretmek için kullanacak." ] }, {