forked from spborder/Collagen_Segmentation
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCollagenWSITest.py
More file actions
30 lines (19 loc) · 814 Bytes
/
Copy pathCollagenWSITest.py
File metadata and controls
30 lines (19 loc) · 814 Bytes
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
27
28
29
30
"""
WSI prediction main file, organize inputs into input pipeline and prediction script
"""
import os
import sys
import pandas as pd
import json
from WSI_Input_Pipeline import WSISegmentationDataSet
from WSI_Predict import Test_Network
# Changing up from sys.argv to reading a specific set of input parameters
parameters_file = sys.argv[1]
parameters = json.load(open(parameters_file))
input_parameters = parameters['input_parameters']
test_parameters = parameters['testing_parameters']
testing_dataset = WSISegmentationDataSet(test_parameters['target_type'],
test_parameters['batch_size'],
input_parameters['image_dir'])
model_path = input_parameters['model_file']
Test_Network(model_path,testing_dataset,test_parameters)