forked from EliasNehme/DeepSTORM3D
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo3.py
27 lines (19 loc) · 1.08 KB
/
demo3.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# ======================================================================================================================
# Demo 3 demonstrates how to use a model trained on simulations to localize a simulated example with non-uniform
# background and emitter size. The parameters assumed for this demo match our Telomere simulations (Fig. 4 main text).
# This script also prints quantitative metrics and compare the result to the GT simulated positions.
# ======================================================================================================================
# test a Tetrapod pre-trained model
from DeepSTORM3D.Testing_Localization_Model import test_model
import matplotlib.pyplot as plt
import os
# path to the learning results
path_curr_dir = os.getcwd()
path_results = path_curr_dir + '/Demos/Results_Tetrapod_demo3/'
# set the postprocessing parameters
postprocessing_params = {'thresh': 80, 'radius': 4}
# model testing
seed = 11 # you can change this to randomize the sampled example
test_model(path_results, postprocessing_params, None, seed)
# show all plots
plt.show()