bounding box mismatch
- 主要语言
- C#
- 星标
- 1.8k
- 派生
- 296
- PR 合并指标
- 30 天内没有已合并 PR
描述
generate bounding box for each frame in order to do 2D object detection. But the results in the bounding box is mismatching. When I draw the bbox in the picture, the result is wrong.
controller = Controller(
agentMode="default",
visibilityDistance=0.5,
scene="FloorPlan1",
gridSize=0.25,
movementGaussianSigma=0.005,
rotateStepDegrees=90,
rotateGaussianSigma=0.5,
renderDepthImage=True,
renderInstanceSegmentation=True,
width=666,
height=666,
fieldOfView=60
)
# controller.reset(scene="FloorPlan_Train1_5", rotateStepDegrees=30)
event = controller.step(dict(action='Initialize', renderObjectImage=True, renderClassImage=True))
controller.step(dict(action='Teleport', x=-1.25, y=1.00, z=-1.5))
positions = controller.step(
action="GetReachablePositions"
).metadata["actionReturn"]
counter = 0
for p in range(5):
counter = counter + 1
r = random.randint(0, 5)
if r == 0:
s1 = controller.step(
action="MoveAhead",
#moveMagnitude=random.uniform(0.1, 1.0)
)
elif r == 1:
s1 = controller.step(
action="MoveBack",
#moveMagnitude=random.uniform(0.1, 1.0)
)
elif r == 2:
s1 = controller.step(
action="RotateRight",
degrees=random.randint(30, 90)
)
elif r == 3:
s1 = controller.step(
action="RotateLeft",
degrees=random.randint(30, 90)
)
elif r == 4:
s1 = controller.step(
action="MoveLeft",
)
elif r == 5:
s1 = controller.step(
action="MoveRight",
)
img = Image.fromarray(s1.frame, 'RGB')
img.save('./data' + 'my' + str(counter) + '.jpg')
filename = 'bounding_box' + str(counter) + '.json'
with open(filename, 'w') as file_obj:
data = json.dumps(s1.instance_detections2D, cls=NumpyEncoder)
json.dump(data, file_obj)
How to fix this?
贡献指南
评估
这个 Issue 还没有评估数据。