Open bessszilard opened 4 years ago
The absl module first needs to parse the flags before they can be used. Please refer to the FAQ at the bottom of this page: https://abseil.io/docs/python/guides/flags#faqs
@parthkhopkar thanks for your answer, but I don't understand the linked blog post. I want to run this in a jupyter notebook. Can you give me an example code?
@bessszilard I was able to solve this by adding FLAGS(sys.argv)
just after importing libraries in models.py
@bessszilard, follow my complete example
yolo_max_boxes = 100
yolo_iou_threshold = 0.5
yolo_score_threshold = 0.5
from absl.flags import FLAGS
FLAGS([
'./program',
f'--yolo_max_boxes={yolo_max_boxes}',
f'--yolo_iou_threshold={yolo_iou_threshold}',
f'--yolo_score_threshold={yolo_score_threshold}'
])
Hi,
You need to import this class first. import yolov3_tf2.models
On Thu, Dec 3, 2020 at 3:11 PM yaelhdd notifications@github.com wrote:
Hi, while stomping on the same problem as @bessszilard https://github.com/bessszilard, I have tried both @escudero https://github.com/escudero and @Ajinkya-Bhandare https://github.com/Ajinkya-Bhandare solutions. With @escudero https://github.com/escudero I get: "UnrecognizedFlagError: Unknown command line flag 'yolo_max_boxes' " With @Ajinkya-Bhandare https://github.com/Ajinkya-Bhandare I get: NameError: name 'sys' is not defined.
If any of you would extend on their solution (@bessszilard https://github.com/bessszilard perhaps you found anything else or one of these worked well).
Thanks so much
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zzh8829/yolov3-tf2/issues/309#issuecomment-738187297, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAHXJETODBBWMICBBP6BPLSS7IEVANCNFSM4PKMEUNA .
Hello! I run this command successfully.
After that I tried to load the model in my code:
And I got this error:
I don't understand why I got this error, because the
convert.py
script loads the model similarly way to my code.