Skip to content
Snippets Groups Projects
Commit 027cc421 authored by Layton's avatar Layton
Browse files

methods for evaluating smoothing operations

parent 1fe9adeb
Branches
No related tags found
No related merge requests found
function results=smoothEval(strDB,nProcessors,gtPath)
[root,~,~] = fileparts(strDB);
results = [];
if ~(exist('nProcessors','var') && ~isempty(nProcessors))
[conn,CONSTANTS]=openDB(strDB);
close(conn);
nProcessors=ljsNProcs(CONSTANTS);
end
[conn,CONSTANTS,segParams]=openDB(strDB);
Batch.batchSegment(strDB,nProcessors,false);
Batch.batchTrack(strDB);
Smooth.Patch.patch11(conn);
% score after initial segmentation and tracking
results = smoothScore(conn,strDB,root,gtPath,results);
Smooth.Patch.patch12(conn);
Smooth.Patch.patch21(conn);
% score after segementation operation: Patch
results = smoothScore(conn,strDB,root,gtPath,results);
Smooth.Merge.goMerge(conn,CONSTANTS,segParams)
% score after segmentation operation: Merge
results = smoothScore(conn,strDB,root,gtPath,results);
Smooth.Classify.goClassifyMitosis(conn,CONSTANTS,nProcessors);
Smooth.extFamily(conn);
% score after mitotic detection is complete for final score
res = ctcEval1(strDB,[],root,gtPath);
results = [results;res];
Batch.batchFeatures(conn,CONSTANTS,nProcessors);
close(conn)
function results = smoothScore(conn,strDB,root,gtPath,results)
Smooth.extFamily(conn);
res = ctcEval1(strDB,[],root,gtPath);
results = [results;res];
gtPath = '\\BIOIMAGE20\g\gRaw\ctc2020';
sourceFolder='F:\leverjs\temp';
results = [];
flist = dir(fullfile(sourceFolder,'*training*.LEVER'));
% 2d targets list
% TO DO target list creation method
targets = {'BF-C2DL-HSC','BF-C2DL-MuSC','DIC-C2DH-HeLa','Fluo-C2DL-Huh7', ...
'Fluo-C2DL-MSC','Fluo-N2DH-GOWT1','Fluo-N2DH-SIM+','Fluo-N2DL-HeLa', ...
'PhC-C2DL-PSC','PhC-C2DH-U373'};
% 3d targets list
% TO DO specify 2d and 3d target lists
% targets = {'Fluo-C3DH-A549-SIM','Fluo-C3DH-A549','Fluo-C3DH-H157','Fluo-C3DL-MDA231', ...
% 'Fluo-N3DH-CE','Fluo-N3DH-CHO','Fluo-N3DH-SIM+','Fluo-N3DL-DRO', ...
% 'Fluo-N3DL-TRIC','Fluo-N3DL-TRIF'};
for ff = 1:length(flist)
strDB = fullfile(flist(ff).folder,flist(ff).name);
% compare to target list
match = cellfun(@(x) strfind(strDB,x),targets,'UniformOutput',false);
if all(isempty([match{:}]))
continue
end
Helpers.goEraseAll(strDB)
res = smoothEval(strDB,[],gtPath);
results = [results;res];
end
writetable(results,fullfile(sourceFolder,'results.txt'));
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment