forked from EliasNehme/DeepSTORM3D
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo2.py
More file actions
28 lines (20 loc) · 1.18 KB
/
Copy pathdemo2.py
File metadata and controls
28 lines (20 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# ======================================================================================================================
# Demo 2 demonstrates how to use a model trained on simulations to localize experimental data. Again, the experimental
# frames are taken from our STORM experiment (Fig. 3 main text). Note that the frames saved in the folder
# <Experimental_Data/Tetrapod_demo2/> are those after minimum subtraction.
# ======================================================================================================================
# import related script and packages to load the exp. image
from DeepSTORM3D.Testing_Localization_Model import test_model
import matplotlib.pyplot as plt
import os
# pre-trained weights on simulations
path_curr = os.getcwd()
path_results = path_curr + '/Demos/Results_Tetrapod_demo2/'
# path to experimental images
path_exp_data = path_curr + '/Experimental_Data/Tetrapod_demo2_crop/'
# postprocessing parameters
postprocessing_params = {'thresh': 40, 'radius': 4}
# test the model by comparing the regenerated image alongside the 3D positions
xyz_rec, conf_rec = test_model(path_results, postprocessing_params, path_exp_data)
# show all plots
plt.show()