79592925

Date: 2025-04-25 16:17:05
Score: 7 🚩
Natty:
Report link

I am not sure who these anchor boxes are coming from?

Are these defined during the model training process?

I am doing custom object detection using mediapipe model_maker but it creates a model that has two outputs. The outputs are of Shape=[ 1 27621 4] and Shape=[ 1 27621 3].

I am totally confused on what is going on and how can I get the four outputs? I want output locations, classes, scores, detections.

Following is my current code, please help me understand what's going on and how to obtain the desired outputs?

# Set up the model

quantization_config = quantization.QuantizationConfig.for_float16()
spec = object_detector.SupportedModels.MOBILENET_MULTI_AVG
hparams = object_detector.HParams(export_dir='exported_model', epochs=30)
options = object_detector.ObjectDetectorOptions(
    supported_model=spec,
    hparams=hparams
)

# Run retraining
model = object_detector.ObjectDetector.create(
    train_data=train_data,
    validation_data=validation_data,
    options=options)

# Evaluate the model

loss, coco_metrics = model.evaluate(validation_data, batch_size=4)
print(f"Validation loss: {loss}")
print(f"Validation coco metrics: {coco_metrics}")

# Save the model
model.export_model(model_name=regular_output_model_name)

model.export_model(model_name=fp16_output_model_name, quantization_config=quantization_config)
Reasons:
  • Blacklisted phrase (0.5): how can I
  • Blacklisted phrase (1): help me
  • RegEx Blacklisted phrase (3): please help me
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-1):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Arc Jai