ennauata / houseganpp

Other
188 stars 37 forks source link

how to process the RPLAN dataset #3

Open czhxiaohuihui opened 3 years ago

czhxiaohuihui commented 3 years ago

I use the code in misc/read_floorplan.py to process the RPLAN dataset,

but I find the bboxes is not computed,and always [] !!!!!

So, how to get the bboxes

bboxes, edges, ed_rm = [], [], []
info=dict() for w_i in range(len(walls)): edges.append([((walls[w_i][0]-min_x)/lenx),((walls[w_i][1]-min_y)/leny),((walls[w_i][2]-min_x)/lenx),((walls[w_i][3]-min_y)/leny),walls[w_i][5],walls[w_i][8]]) if(walls[w_i][6]==-1): ed_rm.append([walls[w_i][7]]) elif(walls[w_i][7]==-1): ed_rm.append([walls[w_i][6]]) else: ed_rm.append([walls[w_i][6],walls[w_i][7]])

for i in range(len(poly)):
    p=poly[i]
    pm=[]
    for p_i in range((p)):
            if(p_i%2==0):
                pm.append(([edges[km+p_i][0],edges[km+p_i][1]]))
            else:
                pm.append(([edges[km+p_i][2],edges[km+p_i][3]]))
    km=km+p
info['room_type'] = room_type
info['boxes'] = bboxes
info['edges'] = edges
info['ed_rm'] = ed_rm
ennauata commented 2 years ago

Please use this script https://github.com/sepidsh/Housegan-data-reader.