Commencer

Jeu de données Tiger-Pose

Introduction#

Le jeu de données Tiger-Pose d’Ultralytics est un petit jeu de données d’estimation de pose annoté avec 12 points clés par tigre. Il comprend 263 images tirées d’une vidéo YouTube, dont 210 sont destinées à l’entraînement et 53 à la validation, et convient parfaitement aux tests et au dépannage des algorithmes d’estimation de pose.

Malgré son ensemble d’entraînement modeste de 210 images, le jeu de données Tiger-Pose offre une diversité qui le rend adapté à l’évaluation des pipelines d’entraînement, à la détection d’erreurs potentielles et à une première prise en main avant de passer à des jeux de données d’estimation de pose plus volumineux.

Une fois que ton pipeline s’entraîne correctement sur ce petit ensemble, remplace ses données par tes propres points clés d’animaux ou d’objets et augmente l’échelle de l’entraînement sur Ultralytics Platform, sans quitter le navigateur.

Structure du jeu de données#

  • Nombre total d’images : 263 (210 pour l’entraînement / 53 pour la validation).
  • Points clés : 12 par tigre (sans indicateur de visibilité).
  • Taille du téléchargement : ~49,8 Mo.
  • Arborescence : points clés au format YOLO stockés dans labels/{train,val}, à côté des répertoires images/{train,val}.


Regarder : Entraîner un modèle de pose Ultralytics YOLO sur le jeu de données Tiger-Pose

Fichier YAML du jeu de données#

Le fichier tiger-pose.yaml définit la configuration du jeu de données, notamment les chemins d’accès aux fichiers, les définitions de classes et les paramètres des points clés.

ultralytics/cfg/datasets/tiger-pose.yaml
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license

# Tiger Pose dataset by Ultralytics
# Documentation: https://docs.ultralytics.com/datasets/pose/tiger-pose
# Example usage: yolo train data=tiger-pose.yaml
# parent
# ├── ultralytics
# └── datasets
#     └── tiger-pose ← downloads here (49.8 MB)

# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
path: tiger-pose # dataset root dir
train: images/train # train images (relative to 'path') 210 images
val: images/val # val images (relative to 'path') 53 images

# Keypoints
kpt_shape: [12, 2] # number of keypoints, number of dims (2 for x,y or 3 for x,y,visible)
flip_idx: [0, 1, 2, 3, 7, 6, 5, 4, 10, 11, 8, 9]

# Classes
names:
  0: tiger

# Keypoint names per class
kpt_names:
  0:
    - nose
    - head
    - withers
    - tail_base
    - right_hind_hock
    - right_hind_paw
    - left_hind_paw
    - left_hind_hock
    - right_front_wrist
    - right_front_paw
    - left_front_wrist
    - left_front_paw

# Download script/URL (optional)
download: https://github.com/ultralytics/assets/releases/download/v0.0.0/tiger-pose.zip

Utilisation#

Pour entraîner un modèle YOLO26n-pose sur le jeu de données Tiger-Pose pendant 100 époques, avec une taille d’image de 640, tu peux utiliser les extraits de code suivants.

Exemple d’entraînement
from ultralytics import YOLO

# Charger un modèle
model = YOLO("yolo26n-pose.pt")  # charger un modèle préentraîné (recommandé pour l’entraînement)

# Entraîner le modèle
results = model.train(data="tiger-pose.yaml", epochs=100, imgsz=640)

Exemples d’images et annotations#

Voici quelques exemples d’images du jeu de données Tiger-Pose, accompagnées de leurs annotations correspondantes :

Tiger pose estimation dataset mosaic training batch
  • Image en mosaïque : cette image montre un lot d’entraînement composé d’images du jeu de données assemblées en mosaïque. La mosaïque est une technique utilisée pendant l’entraînement qui combine plusieurs images en une seule afin d’augmenter la variété des objets et des scènes dans chaque lot d’entraînement. Elle aide le modèle à mieux généraliser à différentes tailles d’objets, proportions et contextes.

Cet exemple illustre la diversité et la complexité des images du jeu de données Tiger-Pose, ainsi que les avantages de la mosaïque pendant l’entraînement.

Exemple d’inférence#

Après l’entraînement, charge ton meilleur checkpoint et lance l’inférence sur de nouvelles images ou vidéos — consulte la page Prédiction pour obtenir la liste complète des arguments.

Exemple d’inférence
from ultralytics import YOLO

# Charger un modèle
model = YOLO("path/to/best.pt")  # charger un modèle entraîné sur tiger-pose

# Exécuter l’inférence
results = model.predict(source="https://youtu.be/Gc6K5eKrTNQ", show=True)

Citations et remerciements#

Ultralytics publie les annotations du jeu de données Tiger-Pose sous la licence AGPL-3.0. La vidéo source reste soumise à ses conditions d’origine, qu’il convient de vérifier avant d’utiliser ou de redistribuer les images extraites.

FAQ#

  • Le jeu de données Ultralytics Tiger-Pose est conçu pour les tâches d’estimation de pose et comprend 263 images extraites d’une vidéo YouTube. Le jeu de données est divisé en 210 images d’entraînement et 53 images de validation, ce qui le rend parfaitement adapté aux tests, à l’entraînement et à l’amélioration des algorithmes d’estimation de pose.

  • Charge yolo26n-pose.pt et appelle model.train(data="tiger-pose.yaml", epochs=100, imgsz=640) — consulte l’exemple d’entraînement ci-dessus pour obtenir les extraits Python et CLI complets, et la page Entraînement pour consulter la liste complète des arguments.

  • Le fichier tiger-pose.yaml définit le chemin du jeu de données, les répertoires d’images d’entraînement et de validation, une seule classe (tiger) et kpt_shape: [12, 2] — 12 points clés par instance, sans indicateur de visibilité. Consulte le fichier de configuration du jeu de données Ultralytics Tiger-Pose pour voir la configuration exacte.

  • Charge ton checkpoint entraîné (par exemple, path/to/best.pt) et appelle model.predict(source=..., show=True) — consulte l’exemple d’inférence ci-dessus pour obtenir les extraits Python et CLI complets, et la page Prédiction pour consulter la liste complète des arguments.

  • Avec 263 images au total (210 pour l’entraînement / 53 pour la validation), 1 classe, 12 points clés par instance et un téléchargement de ~49,8 Mo, Tiger-Pose est assez petit pour être traité rapidement, tout en étant suffisamment diversifié pour vérifier rapidement un pipeline d’entraînement de pose et repérer les erreurs avant de travailler avec des jeux de données plus volumineux.

Commentaires17

Pose une question, partage tes résultats ou aide quelqu’un d’autre.

  1. wcy7788GitHub

    What software should be used for the training of fish key points,I should mark a few key points?

    1. Glenn JocherUltralytics(modifié)

      @wcy7788 for training fish keypoints, you can use the YOLO26-pose model. Annotate your dataset with keypoints and follow the training process similar to the Tiger-Pose example. For more details, refer to the Ultralytics documentation.

    1. Glenn JocherUltralytics(modifié)

      Yes, for pose estimation tasks like those using the Tiger-Pose dataset, each label row includes a bounding box followed by the keypoints: <class-index> <x> <y> <width> <height> <px1> <py1> .... The bounding box (normalized center x, y, width, height) is part of the pose label format, so annotate both the box and the keypoints for each object. 🐅

      For more details on setting up your dataset for pose estimation, you can refer to the Tiger-Pose dataset documentation and the pose dataset format.

  2. teengineerGitHub

    Hello, when i executed the predict code, i took a warning 'WARNING ⚠️ Environment does not support cv2.imshow() or PIL Image.show() google colab'. I worked on Google Colab. How can i see the results?

    1. Glenn JocherUltralytics(modifié)

      @teengineer hello! 😊 It seems you're facing an issue with displaying images in Google Colab due to its environment limitations. To view your results in Colab, you can use the following approach to display images directly in the notebook:

      from pathlib import Path
      
      from IPython.display import Image, display
      from ultralytics import YOLO
      
      # Load your model
      model = YOLO('yolo26n.pt')  # or your custom model
      
      # Run prediction (ensure 'save' is True to save output images)
      results = model.predict(source='path/to/your/image.jpg', save=True)
      
      # Display the saved image
      display(Image(f"{results[0].save_dir}/{Path(results[0].path).name}"))  # saved output in the predict run folder

      This method saves the output image and then uses IPython's display capabilities to show the image within your notebook. Hope this helps you see your results! Let us know if you have any more questions.

      1
    2. teengineerGitHub

      Hi, I want to show prediction result on video but it throw an warning, is there a way for showing? This warning is 'WARNING ⚠️ Environment does not support cv2.imshow() or PIL Image.show()'

    3. Glenn JocherUltralytics(modifié)

      Hey there! 😊 It looks like you're trying to display video predictions in an environment that doesn't support cv2.imshow() or PIL Image.show(), such as Google Colab. No worries, you can still view your video predictions by saving the output and then displaying it directly in the notebook. Here's a quick example on how you could modify your code to save the video predictions and then use IPython.display to show the video:

      from ultralytics import YOLO
      from pathlib import Path
      
      from IPython.display import FileLink, display
      
      # Load your model
      model = YOLO('yolo26n.pt')  # or your custom model
      
      # Run prediction on your video and save the output
      results = model.predict(source='path/to/your/video.mp4', save=True)
      
      # The output is saved in the predict run folder (results[0].save_dir), named after the source file
      # (.mp4 on macOS, .avi on Windows/Linux)
      # Generate a link to download the video file
      output_video_path = next(Path(results[0].save_dir).glob('*.*'))
      display(FileLink(output_video_path))

      This code will provide a link to download the video file with the predictions. Just replace 'path/to/your/video.mp4' with your actual video path. Hope this helps you view your prediction results! Let me know if there's anything else I can assist you with.

      1
    4. Glenn JocherUltralytics

      Hey there! 😊 If you're encountering the 'WARNING ⚠️ Environment does not support cv2.imshow() or PIL Image.show()' message while trying to display video predictions in Google Colab, you can save the predictions to a video file and then display it directly in the notebook. Here's a quick example on how to do it:

      from ultralytics import YOLO
      
      # Load your model
      model = YOLO('yolov8n.pt')  # or your custom model
      
      # Run prediction on your video and save the output
      results = model.predict(source='path/to/your/video.mp4', save=True)
      
      # Use the 'files.download()' function from Google Colab to download the result video
      from google.colab import files
      files.download('path/to/saved/video.mp4')  # Adjust the path to your saved video

      This way, you can view the video with predictions by downloading it. Hope this helps! Let me know if you have any more questions.

      1
    1. Glenn JocherUltralytics

      @teengineer hey there! 🐯 YOLOv8-pose can indeed classify different tiger poses like standing or lying down, but it primarily focuses on pose estimation rather than direct classification. You'd typically train the model to recognize various keypoints on the tiger, and based on the keypoints' positions, you could infer the pose.

      For example, after training with the Tiger-Pose dataset, you could analyze the keypoints to determine the pose:

      from ultralytics import YOLO
      
      # Load your trained model
      model = YOLO('path/to/your/trained_model.pt')
      
      # Run inference
      results = model.predict(source='path/to/your/image.jpg')
      
      # Analyze keypoints for pose classification
      keypoints = results[0].keypoints
      # Here you'd implement your logic to classify poses based on keypoints

      This approach gives you the flexibility to define what constitutes a "standing" or "lying down" pose based on the keypoints' arrangement. Hope this helps! Let us know if you have more questions.

    2. Glenn JocherUltralytics

      Hey there! 🐅 Absolutely, YOLOv8-pose can be tailored to classify specific tiger poses by analyzing the keypoints' arrangement. While it's primarily designed for pose estimation, you can infer poses like standing or lying down based on the keypoints. Here's a quick example using the Tiger-Pose dataset:

      from ultralytics import YOLO
      
      # Load your trained model
      model = YOLO('path/to/your/trained_model.pt')
      
      # Run inference on an image
      results = model.predict(source='path/to/your/image.jpg')
      
      # Analyze keypoints for pose classification
      keypoints = results[0].keypoints
      # Implement your logic here to classify poses based on keypoints

      This way, you can classify the tiger's pose by examining the positions of detected keypoints. Hope this helps, and feel free to reach out if you have more questions! 🚀

      2