allenai / allenai/ai2thor

bounding box mismatch

Offen
#1,000 5 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
C#
Sterne
1.8k
Forks
297
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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?

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.