MCPcopy Create free account
hub / github.com/TonyLianLong/LLM-groundedDiffusion / predicate_spatial

Function predicate_spatial

utils/eval/utils.py:104–117  ·  view source on GitHub ↗
(query_names1, query_names2, verify_fn, gen_boxes, verbose=False)

Source from the content-addressed store, hash-verified

102
103
104def predicate_spatial(query_names1, query_names2, verify_fn, gen_boxes, verbose=False):
105 # gen_boxes: dict with keys 'name' and 'bounding_box'
106
107 object_box1 = get_box(gen_boxes, query_names1)
108 object_box2 = get_box(gen_boxes, query_names2)
109
110 if verbose:
111 print(
112 f"object_box1: {object_box1}, object_box2: {object_box2}")
113
114 if object_box1 is None or object_box2 is None:
115 return False
116
117 return verify_fn(object_box1['bounding_box'], object_box2['bounding_box'])

Callers

nothing calls this directly

Calls 1

get_boxFunction · 0.85

Tested by

no test coverage detected