关于Object Detection API未文档TFRecord字段用途的技术问询
TfExampleDecoder Fields Great question! I’ve worked with the TensorFlow Object Detection API’s TfExampleDecoder component extensively, so let me share what I know about these two undocumented fields:
1. groundtruth_group_of (mapped from image/object/group_of)
This field is used to flag whether a detected object belongs to a group or cluster of identical/related objects. For example:
- A group of pedestrians walking together
- A stack of boxes or a cluster of identical products
- Its value is typically a boolean (
1means the object is part of a group,0means it’s an individual target)
While it’s not explicitly documented in the official API docs, this field ties into annotation standards used in datasets like COCO, where some objects are labeled as part of a group. The decoder maps this raw TFExample field to fields.InputDataFields.groundtruth_group_of to make it accessible in training pipelines that need to handle group-aware detection tasks.
2. groundtruth_weights (mapped from image/object/weight)
This field assigns a loss weight to individual object bounding boxes. Its core use cases are:
- Giving higher weight to hard-to-detect objects (to prioritize their loss during training)
- Lowering weight for low-confidence annotations (to reduce their impact on model learning)
- Balancing class imbalance by weighting underrepresented classes more heavily
During training, if this field is present in your TFExamples, loss calculation functions (like fast_rcnn_loss or ssd_loss) will use these weights to scale the loss contribution of each object.
Official Documentation Status
Unfortunately, these fields aren’t covered in the public official docs—they’re considered advanced, niche features that are mostly documented through code comments and implementation logic. To get deeper context, you can check:
- The inline comments in the
TfExampleDecodersource code (around line 207, where you found these mappings) - Loss function implementations in the TensorFlow Object Detection API repo, where these weights are actually used in computation
内容的提问来源于stack exchange,提问作者Steve Goley

