Skip to content

Commit

Permalink
Merge pull request #35 from marabuuu/batch-processing
Browse files Browse the repository at this point in the history
Batch processing
  • Loading branch information
haesleinhuepf committed May 28, 2023
2 parents 2844787 + f31c981 commit 0e3658c
Show file tree
Hide file tree
Showing 9 changed files with 752 additions and 111 deletions.
3 changes: 3 additions & 0 deletions docs/16_3d_image_visualization/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ Mac users may have to execute the second command like this:
```
pip install "napari[all]"
```

See also
* [Annotating 3D images in napari blog post](https://focalplane.biologists.com/2023/03/30/annotating-3d-images-in-napari/)
3 changes: 2 additions & 1 deletion docs/19_spatial_transforms/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
Whenever we need to change the voxel size of images or move/rotate their content, we are applying spatial transforms. Most commonly these operations are applied when registering image data. Image registation is the process of determining the transform that is necessary so that two images fit well together if overlayed. After this transform has been determined, images can be fused. When image acquisition produces tiled datasets, multiple images of different positions in the same field of view, which partially overlap, image registation can be applied to put these images together in one scene. We call this process image stitching.

See also
* [Image registration (video)](https://youtu.be/3CGC-5vwraM)
* [Image registration (video)](https://youtu.be/3CGC-5vwraM)
* [Rescaling images and pixel (an)isotropy blog post](https://focalplane.biologists.com/2023/03/02/rescaling-images-and-pixel-anisotropy/)
1 change: 0 additions & 1 deletion docs/22_feature_extraction/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
(feature_extraction)=
# Feature extraction

Feature extraction is a term that refers to retrieving quantitative measurements from image data. This is the step where image data is turned into non-image data. Feature extraction can be applied to images directly, e.g. when measuring the mean average intensity in the image. Technically, counting all nuclei in an image is feature extraction.
Expand Down
10 changes: 4 additions & 6 deletions docs/29_algorithm_validation/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@

In this chapter we will explore techniques for determining seqmentation quality and quality of spot detection algorithms.

See also
- [Lena Maier-Hein, Annika Reinke, et al. Metrics reloaded: Pitfalls and recommendations for image analysis validation
](https://arxiv.org/abs/2206.01653)
- [(Bench)mark: Pitfalls in AI Validation | Annika Reinke](https://www.youtube.com/watch?v=HnRcKln5amw)

## See also
* [%he Analysis of Method Comparison Studies (D.G. Altman and J.M. Bland 1983)](https://www-users.york.ac.uk/~mb55/meas/ab83.pdf)
* [The Analysis of Method Comparison Studies (D.G. Altman and J.M. Bland 1983)](https://www-users.york.ac.uk/~mb55/meas/ab83.pdf)
* [Method comparison and Bland-Altman plots](https://www.youtube.com/watch?v=PbSrSupnZFQ)
* [Sklearn: Metrics and scoring](https://scikit-learn.org/stable/modules/model_evaluation.html)
* [Lena Maier-Hein, Annika Reinke, et al. Metrics reloaded: Pitfalls and recommendations for image analysis validation](https://arxiv.org/abs/2206.01653)
* [(Bench)mark: Pitfalls in AI Validation | Annika Reinke](https://www.youtube.com/watch?v=HnRcKln5amw)
* [Quality assurance of segmentation results blog post](https://focalplane.biologists.com/2023/04/13/quality-assurance-of-segmentation-results/)

## Installation of requirements

Expand Down
23 changes: 19 additions & 4 deletions docs/33_batch_processing/12_process_folders.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"import os\n",
Expand All @@ -36,7 +38,9 @@
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -94,7 +98,9 @@
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -189,6 +195,15 @@
" print(file)"
]
},
{
"cell_type": "markdown",
"metadata": {
"tags": []
},
"source": [
"As you can see above `image_file_list` is a list of strings. Storing the name of the image in a list means way less computational power than storing the images themselves in the list. It makes sense to `imread` the images at the latest possible point in time, here in the for-loop below. If you are interested in folder structures and specifying these directories, you can check out these two jupyter notebooks [here](https://github.com/BiAPoL/Quantitative_Bio_Image_Analysis_with_Python_2022/blob/main/docs/day1x_Folder_Structures/05_Folder_structures.ipynb) and [here](https://github.com/BiAPoL/Quantitative_Bio_Image_Analysis_with_Python_2022/blob/main/docs/day1x_Folder_Structures/06_Folder_structures2.ipynb)."
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -633,7 +648,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.9"
"version": "3.9.16"
},
"toc": {
"base_numbering": 1,
Expand Down
4 changes: 2 additions & 2 deletions docs/33_batch_processing/14_process_timelapse.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"id": "687b797b-bfd7-4991-b2eb-5345f64d2d96",
"metadata": {},
"source": [
"First, we should define the origin of the data we want to proces and where the results should be saved to."
"First, we should define the origin of the data we want to process and where the results should be saved to."
]
},
{
Expand Down Expand Up @@ -435,7 +435,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.10"
"version": "3.9.16"
}
},
"nbformat": 4,
Expand Down
4 changes: 4 additions & 0 deletions docs/33_batch_processing/readme.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# Batch processing

[Batch processing](https://www.investopedia.com/terms/b/batch-processing.asp) comes into play when we want to process multiple images in the same way.
One example of batch processing would be to loop over a folder of images using a for-loop to apply a segmentation-workflow.

810 changes: 713 additions & 97 deletions docs/34_timelapse_analysis/intensity_over_time.ipynb

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions docs/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,11 @@ parts:
# - file: 27_cell_classification/cell_classification
# - file: 27_cell_classification/cell_classification_correction.ipynb

- file: 34_timelapse_analysis/readme
sections:
- file: 34_timelapse_analysis/intensity_over_time
- file: 34_timelapse_analysis/tracking

- file: 35_parameter_optimization/readme
sections:
- file: 35_parameter_optimization/optimization_basics
Expand Down

0 comments on commit 0e3658c

Please sign in to comment.