facebookresearch / detectron2

Detectron2 is a platform for object detection, segmentation and other visual recognition tasks.
https://detectron2.readthedocs.io/en/latest/
Apache License 2.0
29.3k stars 7.32k forks source link

export_model.py - list_of_lines[165] = " [1344, 1344], 1344 \n" #5264

Open kaustubhsapru opened 2 months ago

kaustubhsapru commented 2 months ago

📚 Documentation Issue

This issue category is for problems about existing documentation, not for asking how-to questions.

a_file = open("/content/detectron2/tools/deploy/export_model.py", "r") list_of_lines = a_file.readlines() list_of_lines[165] = " [1344, 1344], 1344 \n"

a_file = open("/content/detectron2/tools/deploy/export_model.py", "w") a_file.writelines(list_of_lines) a_file.close() exit(1)

line 165 in export_model.py reads : "# get a first batch from dataset" What has to change is this code for an error free conversion from .yaml to onnx ?

Huxwell commented 2 months ago

I'm not a maintainer, but what is the actual error you are getting? You can manually change the relevant line in export_model.py as well.