Skip to content

Commit

Permalink
Update lesson3-rsna-pneumonia-detection-kaggle.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
Tian committed Sep 3, 2018
1 parent 818b2f1 commit d48eac1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lesson3-rsna-pneumonia-detection-kaggle.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1497,7 +1497,6 @@
"def predict(image_fps, filepath='sample_submission.csv', min_conf=0.98): \n",
" \n",
" # assume square image\n",
" resize_factor = ORIG_SIZE / config.IMAGE_SHAPE[0]\n",
" \n",
" with open(filepath, 'w') as file:\n",
" for image_id in tqdm(image_fps): \n",
Expand Down Expand Up @@ -1532,8 +1531,8 @@
" y1 = r['rois'][i][0]\n",
" width = r['rois'][i][3] - x1 \n",
" height = r['rois'][i][2] - y1 \n",
" bboxes_str = \"{} {} {} {}\".format(x1*resize_factor, y1*resize_factor, \\\n",
" width*resize_factor, height*resize_factor) \n",
" bboxes_str = \"{} {} {} {}\".format(x1, y1, \\\n",
" width, height) \n",
" out_str += bboxes_str\n",
"\n",
" file.write(out_str+\"\\n\")"
Expand Down Expand Up @@ -1980,4 +1979,4 @@
]
}
]
}
}

0 comments on commit d48eac1

Please sign in to comment.