Skip to content

Commit

Permalink
update: close the visualization
Browse files Browse the repository at this point in the history
  • Loading branch information
changhaonan committed Sep 14, 2023
1 parent c289dd5 commit 322efa9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lgmcts/components/patterns.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ def gen_prior(cls, img_size, rng, **kwargs):
scale_max = PATTERN_CONSTANTS["line"]["line_len"]["M"][0]
scale_min = PATTERN_CONSTANTS["line"]["line_len"]["M"][1]
scale = rng.random() * (scale_max - scale_min) + scale_min

enable_vis = False
block_vis = False

if len(rel_obj_ids) == 0:
if len(obj_ids) == 0:
# pure pattern
Expand Down Expand Up @@ -134,7 +135,7 @@ def gen_prior(cls, img_size, rng, **kwargs):
cls.draw_line(prior, x0, y0, x1, y1, thickness)

# Debug
if not block_vis:
if enable_vis and not block_vis:
vis_prior = prior.copy()
for id, rel_pix in zip(rel_obj_ids, rel_obj_poses_pix):
cv2.circle(vis_prior, (rel_pix[1], rel_pix[0]), 5, 1.0, 1)
Expand Down

0 comments on commit 322efa9

Please sign in to comment.