Skip to content

Week 2: Data Collection and Annotation with DeepLabCut

Carlos Lizarraga-Celaya edited this page Jul 16, 2024 · 7 revisions

  • Data Collection Considerations: Participants will revisit their video data collection, considering DeepLabCut's recommendations for background, lighting, and marker placement (if applicable). They might need to refine their data collection setup based on these guidelines.
  • DeepLabCut's Annotation Tools: DeepLabCut offers built-in annotation tools (e.g., Chunk labeling) for creating training and validation datasets. Participants will learn to use these tools for efficient keypoint annotation on their video frames.
  • Data Preprocessing with DeepLabCut: DeepLabCut provides functionalities for data pre-processing, including cropping and resizing images for training. Participants will explore these functionalities and prepare their annotated data for DeepLabCut's training pipeline.

Data Collection Considerations Activities

Here's a breakdown of activities for the "Data Collection Considerations" step:

Reviewing DeepLabCut's Recommendations: Participants should revisit the DeepLabCut documentation or tutorials on data collection. Please see this DeepCutLab beginners guide.

These resources typically discuss factors like:

  • Background: A clean, uncluttered background with high contrast between the subject and background is preferred for accurate keypoint detection. Participants might need to adjust their background setup (e.g., using a green screen).

  • Lighting: Consistent and even lighting is crucial. Participants might need to adjust lighting conditions to avoid shadows or overly bright areas that could affect keypoint detection.

  • Marker Placement (if applicable): If using markers for keypoint identification, DeepLabCut offers guidelines for marker size, placement, and distinctiveness. Participants should review these guidelines and refine marker placement on their subjects if necessary.

Evaluating Existing Video Data: Participants should assess their pre-recorded video data based on DeepLabCut's recommendations. They should identify areas for improvement (e.g., background noise, uneven lighting) and determine if additional data collection is necessary.

Refining Data Collection Setup (if needed): Based on the evaluation, participants might need to refine their data collection setup. This could involve adjusting lighting, changing the background, or repositioning markers on subjects for a new round of video recording.

DeepLabCut's Annotation Tools Activities

Here are specific activities for the "DeepLabCut's Annotation Tools" step:

Exploring Annotation Functionality: Participants should explore DeepLabCut's built-in annotation tools through the documentation or tutorials. Common tools include "Chunk labeling," which allows efficient annotation of keypoints on video frames.

Understanding Keypoint Definitions: DeepLabCut requires defining the keypoints of interest (e.g., head, paws) for the chosen pose estimation task. Participants should clearly define these keypoints based on their chosen behavior analysis.

Practicing with Annotation Tools: Encourage participants to practice using DeepLabCut's annotation tools on a small subset of video frames. This helps them get comfortable with the interface and annotation process.

Annotating Training and Validation Datasets: Participants will use DeepLabCut's tools to annotate keypoints on a significant portion of their video frames. Remember to separate the data into training and validation sets for model evaluation.

Ensuring Annotation Consistency: It's crucial to maintain consistency in keypoint annotation across different video frames. Encourage participants to discuss strategies for ensuring consistency, such as using reference images or collaborating on annotation tasks.

Data Preprocessing with DeepLabCut Activities

Here's a breakdown of activities for the "Data Preprocessing with DeepLabCut" step:

Exploring DeepLabCut's Preprocessing Options: Participants should explore DeepLabCut's functionalities for data pre-processing through the documentation or tutorials. These functionalities might include:

  • Image Cropping: DeepLabCut might allow cropping images to focus on the region of interest (containing the subject) and remove unnecessary background information.

  • Image Resizing: DeepLabCut might offer functionalities to resize images to a standard size suitable for the chosen deep learning model.

  • Normalization: Normalization techniques might be available to scale pixel values for improved training performance.

Understanding Preprocessing Requirements: DeepLabCut's documentation should explain the required pre-processing steps for the chosen training configuration. Participants should identify the necessary pre-processing steps for their project.

Applying Preprocessing Functionalities: Participants will use DeepLabCut's functionalities to pre-process their annotated video frames. This might involve cropping, resizing, and potentially normalizing the image data.

Visualizing Preprocessed Data (optional): Encourage participants to visualize a few pre-processed images to confirm that the process is working as expected. This helps identify any errors or unexpected outcomes in data pre-processing.

By engaging in these activities, participants gain practical experience with DeepLabCut's data collection, annotation, and pre-processing functionalities, preparing their data effectively for the training stage of their video pose estimation project.


Created: 07/13/2024 (C. Lizárraga)

Updated: 07/15/2024 (C. Lizárraga)

University of Arizona DataLab, Data Science Institute, University of Arizona.

CC BY-NC-SA 4.0