Skip to content

Commit

Permalink
Add different image channels warning to export onnx Megvii-BaseDetect…
Browse files Browse the repository at this point in the history
  • Loading branch information
rpehkone committed Apr 15, 2024
1 parent 85c22a4 commit 0e314d8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/export_onnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ def main():
exp = get_exp(args.exp_file, args.name)
exp.merge(args.opts)

if exp.color_channel != args.num_channels:
logger.warning(f"When exporting to ONNX, it is important to ensure that the image channels match those used during training.")

if not args.experiment_name:
args.experiment_name = exp.exp_name

Expand Down

0 comments on commit 0e314d8

Please sign in to comment.