Skip to content

Conversation

@bernardev254
Copy link

Summary

This PR updates the train_step() function in hackathon/objectdetection.py to properly align with the new object detection loss function and batch structure.

Changes

  • Extracts and converts image data to NCHW format.
  • Unpacks detection targets from the updated batch["objects"] structure.
  • Passes YOLO-style detection targets to loss_fn, including bbox_target, object_mask, and class_target.
  • Computes gradients and updates model parameters using Optax.

Motivation

This brings train_step() in sync with the newly implemented loss and evaluation logic, enabling full-cycle model training for object detection using YOLOv10-style predictions.

closes #8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Verify and adjust data handling in 'train_step'

1 participant