İçeriğe geç

Model Değerlendirmesi ve İnce Ayar Hakkında Görüşler

Giriş

Bilgisayarla görme modelinizi eğittikten sonra, en iyi performansı göstermesi için onu değerlendirmek ve iyileştirmek çok önemlidir. Sadece modelinizi eğitmek yeterli değildir. Modelinizin doğru, verimli olduğundan ve bilgisayarla görme projenizin amacını yerine getirdiğinden emin olmanız gerekir. Modelinizi değerlendirip ince ayar yaparak zayıf yönlerini belirleyebilir, doğruluğunu artırabilir ve genel performansını yükseltebilirsiniz.

Bu kılavuzda, bir bilgisayarla görme projesinin bu adımını daha ulaşılabilir hale getirecek model değerlendirme ve ince ayar hakkında içgörüler paylaşacağız. Değerlendirme metriklerini nasıl anlayacağınızı ve ince ayar tekniklerini nasıl uygulayacağınızı tartışacağız ve size modelinizin yeteneklerini artıracak bilgileri vereceğiz.

Ölçümleri Kullanarak Model Performansını Değerlendirme

Bir modelin ne kadar iyi performans gösterdiğini değerlendirmek, ne kadar etkili çalıştığını anlamamıza yardımcı olur. Performansı ölçmek için çeşitli metrikler kullanılır. Bu performans met rikleri, modelin amaçlanan hedeflere ulaştığından emin olmak için iyileştirmelere rehberlik edebilecek net, sayısal bilgiler sağlar. Şimdi birkaç temel metriğe daha yakından bakalım.

Güvenilirlik Puanı

Güvenilirlik puanı, modelin algılanan bir nesnenin belirli bir sınıfa ait olduğundan emin olmasını temsil eder. 0 ile 1 arasında değişir ve daha yüksek puanlar daha fazla güveni gösterir. Güvenilirlik puanı, tahminleri filtrelemeye yardımcı olur; Yalnızca belirli bir eşiğin üzerinde güvenilirlik puanlarına sahip algılamalar geçerli kabul edilir.

Hızlı İpucu: Çıkarımları çalıştırırken, herhangi bir tahmin göremiyorsanız ve diğer her şeyi kontrol ettiyseniz, güven puanını düşürmeyi deneyin. Bazen eşik çok yüksektir ve modelin geçerli tahminleri göz ardı etmesine neden olur. Puanı düşürmek modelin daha fazla olasılığı dikkate almasını sağlar. Bu, proje hedeflerinizi karşılamayabilir ancak modelin neler yapabileceğini görmek ve nasıl ince ayar yapacağınıza karar vermek için iyi bir yoldur.

Birlik Üzerinde Kavşak

Intersection over Union (IoU) is a metric in object detection that measures how well the predicted bounding box overlaps with the ground truth bounding box. IoU values range from 0 to 1, where one stands for a perfect match. IoU is essential because it measures how closely the predicted boundaries match the actual object boundaries.

Union Üzerindeki Kavşağa Genel Bakış

Mean Average Precision

Mean Average Precision (mAP) is a way to measure how well an object detection model performs. It looks at the precision of detecting each object class, averages these scores, and gives an overall number that shows how accurately the model can identify and classify objects.

İki özel mAP metriğine odaklanalım:

  • mAP@.5: Measures the average precision at a single IoU (Intersection over Union) threshold of 0.5. This metric checks if the model can correctly find objects with a looser accuracy requirement. It focuses on whether the object is roughly in the right place, not needing perfect placement. It helps see if the model is generally good at spotting objects.
  • mAP@.5:.95: 0,05'lik artışlarla 0,5 ila 0,95 arasında birden fazla IoU eşiğinde hesaplanan mAP değerlerinin ortalamasını alır. Bu metrik daha ayrıntılı ve katıdır. Modelin farklı katılık seviyelerinde nesneleri ne kadar doğru bulabildiğine dair daha kapsamlı bir resim verir ve özellikle hassas nesne tespiti gerektiren uygulamalar için kullanışlıdır.

Diğer mAP ölçümleri arasında 0,75'lik daha katı bir IoU eşiği kullanan mAP@0.75 ve farklı boyutlardaki nesneler arasında hassasiyeti değerlendiren mAP@küçük, orta ve büyük yer alır.

Ortalama Ortalama Hassasiyet Genel Bakış

Evaluating YOLO11 Model Performance

With respect to YOLO11, you can use the validation mode to evaluate the model. Also, be sure to take a look at our guide that goes in-depth into YOLO11 performance metrics and how they can be interpreted.

Toplulukla İlgili Sık Sorulan Sorular

When evaluating your YOLO11 model, you might run into a few hiccups. Based on common community questions, here are some tips to help you get the most out of your YOLO11 model:

Değişken Görüntü Boyutlarını İşleme

Evaluating your YOLO11 model with images of different sizes can help you understand its performance on diverse datasets. Using the rect=true validation parameter, YOLO11 adjusts the network's stride for each batch based on the image sizes, allowing the model to handle rectangular images without forcing them to a single size.

Bu imgsz doğrulama parametresi, varsayılan olarak 640 olan görüntü yeniden boyutlandırma için maksimum boyutu ayarlar. Bunu veri setinizin maksimum boyutlarına ve mevcut GPU belleğine göre ayarlayabilirsiniz. ile bile imgsz ayarlamak rect=true Adımı dinamik olarak ayarlayarak modelin değişen görüntü boyutlarını etkili bir şekilde yönetmesini sağlar.

Accessing YOLO11 Metrics

If you want to get a deeper understanding of your YOLO11 model's performance, you can easily access specific evaluation metrics with a few lines of Python code. The code snippet below will let you load your model, run an evaluation, and print out various metrics that show how well your model is doing.

Kullanım

from ultralytics import YOLO

# Load the model
model = YOLO("yolo11n.pt")

# Run the evaluation
results = model.val(data="coco8.yaml")

# Print specific metrics
print("Class indices with average precision:", results.ap_class_index)
print("Average precision for all classes:", results.box.all_ap)
print("Average precision:", results.box.ap)
print("Average precision at IoU=0.50:", results.box.ap50)
print("Class indices for average precision:", results.box.ap_class_index)
print("Class-specific results:", results.box.class_result)
print("F1 score:", results.box.f1)
print("F1 score curve:", results.box.f1_curve)
print("Overall fitness score:", results.box.fitness)
print("Mean average precision:", results.box.map)
print("Mean average precision at IoU=0.50:", results.box.map50)
print("Mean average precision at IoU=0.75:", results.box.map75)
print("Mean average precision for different IoU thresholds:", results.box.maps)
print("Mean results for different metrics:", results.box.mean_results)
print("Mean precision:", results.box.mp)
print("Mean recall:", results.box.mr)
print("Precision:", results.box.p)
print("Precision curve:", results.box.p_curve)
print("Precision values:", results.box.prec_values)
print("Specific precision metrics:", results.box.px)
print("Recall:", results.box.r)
print("Recall curve:", results.box.r_curve)

The results object also includes speed metrics like preprocess time, inference time, loss, and postprocess time. By analyzing these metrics, you can fine-tune and optimize your YOLO11 model for better performance, making it more effective for your specific use case.

İnce Ayar Nasıl Çalışır?

İnce ayar, önceden eğitilmiş bir modeli almayı ve belirli bir görev veya veri kümesindeki performansı artırmak için parametrelerini ayarlamayı içerir. Model yeniden eğitimi olarak da bilinen işlem, modelin gerçek dünya uygulamalarında karşılaşacağı belirli veriler için sonuçları daha iyi anlamasına ve tahmin etmesine olanak tanır. En iyi sonuçları elde etmek için modelinizi model değerlendirmenize göre yeniden eğitebilirsiniz.

Modelinize İnce Ayar Yapmak İçin İpuçları

Bir modele ince ayar yapmak, optimum performans elde etmek için çeşitli hayati parametrelere ve tekniklere çok dikkat etmek anlamına gelir. İşte süreç boyunca size rehberlik edecek bazı temel ipuçları.

Starting With a Higher Learning Rate

Usually, during the initial training epochs, the learning rate starts low and gradually increases to stabilize the training process. However, since your model has already learned some features from the previous dataset, starting with a higher learning rate right away can be more beneficial.

When evaluating your YOLO11 model, you can set the warmup_epochs doğrulama parametresini warmup_epochs=0 öğrenme oranının çok yüksek başlamasını önlemek için. Bu süreci takip ederek, eğitim, yeni verilerinizin nüanslarına uyum sağlayarak sağlanan ağırlıklardan devam edecektir.

Küçük Nesneler için Görüntü Döşeme

Image tiling can improve detection accuracy for small objects. By dividing larger images into smaller segments, such as splitting 1280x1280 images into multiple 640x640 segments, you maintain the original resolution, and the model can learn from high-resolution fragments. When using YOLO11, make sure to adjust your labels for these new segments correctly.

Toplulukla etkileşim kurun

Sharing your ideas and questions with other computer vision enthusiasts can inspire creative solutions to roadblocks in your projects. Here are some excellent ways to learn, troubleshoot, and connect.

Yardım ve Destek Bulma

  • GitHub Issues: Explore the YOLO11 GitHub repository and use the Issues tab to ask questions, report bugs, and suggest features. The community and maintainers are available to assist with any issues you encounter.
  • Ultralytics Discord Sunucusu: Diğer kullanıcılar ve geliştiricilerle bağlantı kurmak, destek almak, bilgi paylaşmak ve beyin fırtınası yapmak için Ultralytics Discord sunucusuna katılın.

Resmi Belgeler

  • Ultralytics YOLO11 Documentation: Check out the official YOLO11 documentation for comprehensive guides and valuable insights on various computer vision tasks and projects.

Son Düşüncelerimiz

Evaluating and fine-tuning your computer vision model are important steps for successful model deployment. These steps help make sure that your model is accurate, efficient, and suited to your overall application. The key to training the best model possible is continuous experimentation and learning. Don't hesitate to tweak parameters, try new techniques, and explore different datasets. Keep experimenting and pushing the boundaries of what's possible!

SSS

What are the key metrics for evaluating YOLO11 model performance?

To evaluate YOLO11 model performance, important metrics include Confidence Score, Intersection over Union (IoU), and Mean Average Precision (mAP). Confidence Score measures the model's certainty for each detected object class. IoU evaluates how well the predicted bounding box overlaps with the ground truth. Mean Average Precision (mAP) aggregates precision scores across classes, with mAP@.5 and mAP@.5:.95 being two common types for varying IoU thresholds. Learn more about these metrics in our YOLO11 performance metrics guide.

How can I fine-tune a pre-trained YOLO11 model for my specific dataset?

Fine-tuning a pre-trained YOLO11 model involves adjusting its parameters to improve performance on a specific task or dataset. Start by evaluating your model using metrics, then set a higher initial learning rate by adjusting the warmup_epochs parametresini anında kararlılık için 0'a ayarlayın. Aşağıdaki gibi parametreleri kullanın rect=true çeşitli görüntü boyutlarını etkili bir şekilde işlemek için. Daha ayrıntılı rehberlik için aşağıdaki bölümümüze bakın fine-tuning YOLO11 models.

How can I handle variable image sizes when evaluating my YOLO11 model?

Değerlendirme sırasında değişken görüntü boyutlarını işlemek için rect=true parameter in YOLO11, which adjusts the network's stride for each batch based on image sizes. The imgsz parametresi görüntü yeniden boyutlandırma için maksimum boyutu ayarlar, varsayılan değer 640'tır. Ayarla imgsz veri setinize ve GPU belleğinize uyacak şekilde ayarlayın. Daha fazla ayrıntı için değişken görüntü boyutlarını işleme bölümü.

What practical steps can I take to improve mean average precision for my YOLO11 model?

Improving mean average precision (mAP) for a YOLO11 model involves several steps:

  1. Tuning Hyperparameters: Experiment with different learning rates, batch sizes, and image augmentations.
  2. Data Augmentation: Use techniques like Mosaic and MixUp to create diverse training samples.
  3. Image Tiling: Split larger images into smaller tiles to improve detection accuracy for small objects. Refer to our detailed guide on model fine-tuning for specific strategies.

How do I access YOLO11 model evaluation metrics in Python?

You can access YOLO11 model evaluation metrics using Python with the following steps:

Kullanım

from ultralytics import YOLO

# Load the model
model = YOLO("yolo11n.pt")

# Run the evaluation
results = model.val(data="coco8.yaml")

# Print specific metrics
print("Class indices with average precision:", results.ap_class_index)
print("Average precision for all classes:", results.box.all_ap)
print("Mean average precision at IoU=0.50:", results.box.map50)
print("Mean recall:", results.box.mr)

Analyzing these metrics helps fine-tune and optimize your YOLO11 model. For a deeper dive, check out our guide on YOLO11 metrics.

📅 Created 3 months ago ✏️ Updated 23 days ago

Yorumlar