Skip to content

Commit

Permalink
Merge pull request #87 from jo-mueller/add-more-info-on-datasets
Browse files Browse the repository at this point in the history
Added info on target dataset for upload
  • Loading branch information
jo-mueller authored Aug 21, 2024
2 parents 239913e + 15f69fc commit c81fec7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions docs/johannes_mueller/yolo_from_omero/train_yolo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Train/Test/Validation split\n",
"\n",
"Before we dive into the training, we have to do one final step. It is common practice in deep learning, to split the data into a training, validation and a testing cohort. This is done to evaluate the model on data it has not seen before. We will do a 70/20/10% split for training, validation and testing, respectively. We first create the folder structure:"
]
},
Expand Down Expand Up @@ -642,7 +644,9 @@
"\n",
"```{note}\n",
" The steps up to this point can take a bit of time so you may have to reconnect to the omero server.\n",
"```"
"```\n",
"\n",
"One issue/question may arise here. *Where to upload the data?* My recommendation would be to create a new dataset on the omero server and upload the data there. In the following code, the dataset I created carries the id `260`, so'd have to replace this with the id of the dataset you created. *But why not just upload it tothe dataset I was already using up until here?* Well, you could do that, but it would be a bit messy because ad hoc it would be impossible to differentiate between the annotations you made manually above and the predictions done by YOLO. To keep it clean, it's better to create a new dataset."
]
},
{
Expand All @@ -654,7 +658,8 @@
"image_to_upload = io.imread(test_image)\n",
"image_id = ezomero.post_image(\n",
" conn, image=image_to_upload[None, None, None, :], dim_order='tczyx',\n",
" dataset_id=260, image_name='example_prediction'\n",
" dataset_id=260, # replace 260 with the id of the dataset you want to upload the image to\n",
" image_name='example_prediction'\n",
" )\n",
"\n",
"roid_id = ezomero.post_roi(conn, image_id=image_id, shapes=rectangles)"
Expand Down

0 comments on commit c81fec7

Please sign in to comment.