wuhp commited on
Commit
371a532
·
verified ·
1 Parent(s): d77f034

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -6
app.py CHANGED
@@ -97,7 +97,7 @@ def convert_seg_to_bbox(api_key: str, dataset_url: str):
97
  if not os.path.isfile(src):
98
  continue
99
  shutil.copy(src, os.path.join(img_out, fname))
100
- with open(os.path.join(lbl_out, fname.rsplit('.',1)[0]+".txt"), 'w') as lf:
101
  lf.write("\n".join(annos.get(img_id, [])))
102
 
103
  # build before/after samples
@@ -152,12 +152,18 @@ def upload_and_train_detection(
152
  )
153
 
154
  # upload the YOLO dataset
155
- ws.upload_dataset(dataset_path, project_slug,
156
- project_license=project_license,
157
- project_type=project_type)
 
 
 
158
 
159
- # generate a new version (must pass settings arg—even if empty)
160
- version_num = proj.generate_version(settings={})
 
 
 
161
 
162
  # train it
163
  proj.version(str(version_num)).train()
 
97
  if not os.path.isfile(src):
98
  continue
99
  shutil.copy(src, os.path.join(img_out, fname))
100
+ with open(os.path.join(lbl_out, fname.rsplit('.',1)[0] + ".txt"), 'w') as lf:
101
  lf.write("\n".join(annos.get(img_id, [])))
102
 
103
  # build before/after samples
 
152
  )
153
 
154
  # upload the YOLO dataset
155
+ ws.upload_dataset(
156
+ dataset_path,
157
+ project_slug,
158
+ project_license=project_license,
159
+ project_type=project_type
160
+ )
161
 
162
+ # generate a new version (must pass both keys—even if empty)
163
+ version_num = proj.generate_version(settings={
164
+ "augmentation": {},
165
+ "preprocessing": {},
166
+ })
167
 
168
  # train it
169
  proj.version(str(version_num)).train()