jacklangerman commited on
Commit
b9b3598
1 Parent(s): ae2963e

update proc to include __imagekey__

Browse files
Files changed (2) hide show
  1. hoho/hoho.py +7 -5
  2. setup.py +1 -1
hoho/hoho.py CHANGED
@@ -158,31 +158,33 @@ def temp_working_directory():
158
  ############# Dataset #############
159
  def proc(row, split='train'):
160
  out = {}
 
 
161
  for k, v in row.items():
162
- colname = k.split('.')[0]
 
 
 
163
  if colname in {'ade20k', 'depthcm', 'gestalt'}:
164
  if colname in out:
165
  out[colname].append(v)
166
  else:
167
  out[colname] = [v]
168
  elif colname in {'wireframe', 'mesh'}:
169
- # out.update({a: b.tolist() for a,b in v.items()})
170
  out.update({a: b for a,b in v.items()})
171
  elif colname in 'kr':
172
  out[colname.upper()] = v
173
  else:
174
  out[colname] = v
175
-
176
  return Sample(out)
177
 
178
 
179
 
180
 
181
 
 
182
  from . import read_write_colmap
183
  def decode_colmap(s):
184
- # with open('colmap_solve/points3D.bin', 'wb') as stream:
185
-
186
  with temp_working_directory():
187
 
188
  with open('points3D.bin', 'wb') as stream:
 
158
  ############# Dataset #############
159
  def proc(row, split='train'):
160
  out = {}
161
+ out['__key__'] = None
162
+ out['__imagekey__'] = []
163
  for k, v in row.items():
164
+ key_parts = k.split('.')
165
+ colname = key_parts[0]
166
+ if colname == 'ade20k':
167
+ out['__imagekey__'].append(key_parts[1])
168
  if colname in {'ade20k', 'depthcm', 'gestalt'}:
169
  if colname in out:
170
  out[colname].append(v)
171
  else:
172
  out[colname] = [v]
173
  elif colname in {'wireframe', 'mesh'}:
 
174
  out.update({a: b for a,b in v.items()})
175
  elif colname in 'kr':
176
  out[colname.upper()] = v
177
  else:
178
  out[colname] = v
 
179
  return Sample(out)
180
 
181
 
182
 
183
 
184
 
185
+
186
  from . import read_write_colmap
187
  def decode_colmap(s):
 
 
188
  with temp_working_directory():
189
 
190
  with open('points3D.bin', 'wb') as stream:
setup.py CHANGED
@@ -7,7 +7,7 @@ import glob
7
  required = []
8
 
9
  setup(name='hoho',
10
- version='0.0.1',
11
  description='Tools and utilites for the HoHo Dataset and S23DR Competition',
12
  url='usm3d.github.io',
13
  author='Jack Langerman, Dmytro Mishkin, S23DR Orgainizing Team',
 
7
  required = []
8
 
9
  setup(name='hoho',
10
+ version='0.0.2',
11
  description='Tools and utilites for the HoHo Dataset and S23DR Competition',
12
  url='usm3d.github.io',
13
  author='Jack Langerman, Dmytro Mishkin, S23DR Orgainizing Team',