-
Notifications
You must be signed in to change notification settings - Fork 18
Expose det_order building in the python module
#65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
sync changes
latest changes
…-logic Expose detector order creation
LalehB
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thank you Noah.
btw since the bfs ordering is by default on, is this mostly for the cases that we might want to turn it off?
| def test_build_det_orders_no_bfs(): | ||
| assert tesseract_decoder.utils.build_det_orders( | ||
| _DETECTOR_ERROR_MODEL, num_det_orders=1, det_order_bfs=False, seed=0 | ||
| ) == [[0, 1]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that for this DEM, with bfs and no bfs will have the same det_orders, right?
| if (det_order_bfs) { | ||
| auto graph = build_detector_graph(dem); | ||
| std::uniform_int_distribution<size_t> dist_det(0, graph.size() - 1); | ||
| for (size_t det_order = 0; det_order < num_det_orders; ++det_order) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for moving the build_det_orders to the util folder! it makes more sense :-) maybe later we break this build_det_orders function into smaller helper functions such as generate_bfs_order and more.
--det-order-bfssignificantly improves the performance of tesseract for decoding e.g. color code circuit-level noisetesseract_main.cc