ignaciorlando / fundus-vessel-segmentation-tbme

In this work, we present an extensive description and evaluation of our method for blood vessel segmentation in fundus images based on a discriminatively trained, fully connected conditional random field model. Standard segmentation priors such as a Potts model or total variation usually fail when dealing with thin and elongated structures. We overcome this difficulty by using a conditional random field model with more expressive potentials, taking advantage of recent results enabling inference of fully connected models almost in real-time. Parameters of the method are learned automatically using a structured output support vector machine, a supervised technique widely used for structured prediction in a number of machine learning applications. Our method, trained with state of the art features, is evaluated both quantitatively and qualitatively on four publicly available data sets: DRIVE, STARE, CHASEDB1 and HRF. Additionally, a quantitative comparison with respect to other strategies is included. The experimental results show that this approach outperforms other techniques when evaluated in terms of sensitivity, F1-score, G-mean and Matthews correlation coefficient. Additionally, it was observed that the fully connected model is able to better distinguish the desired structures than the local neighborhood based approach. Results suggest that this method is suitable for the task of segmenting elongated structures, a feature that can be exploited to contribute with other medical and biological applications.
47 stars 15 forks source link

Field assignment to a non-structure array object. #6

Closed soulnd closed 7 years ago

soulnd commented 7 years ago

I set up the DRIVE dataset according the user_manual . Then I run the script_experiments_massive.m, the error occurs: Field assignment to a non-structure array object.

Error in runVesselSegmentation (line 36) [model, config.qualityOverValidation, config] = learnConfiguredCRF(trainingdata, validationdata, config);

Error in script_experiments_massive (line 41) results{experiment,crfver} = runVesselSegmentation(config);

And I have another question: My dataset don't have binary ground truth masks of the vessels, so how can I use your model to segment the vessels of my dataset?

ignaciorlando commented 7 years ago

Hi @soulnd

I've pushed a newer version of the repository without that bug. Would you mind to verify if it solved your problem?

Please, remember to set the variable thereAreLabelsInTheTestData in false for your data set without ground truth labels.

Cheers,

Nacho

soulnd commented 7 years ago

I run the new version and the original problem is solved. But the new error occurs:

Subscripted assignment dimension mismatch.

Error in learnCRFPotentials>findBestC (line 77) qualitiesOnValidationSet(:, count) = averageMeasures.qualities;

Error in learnCRFPotentials (line 16) [bestModel, qualityOverValidation, bestParam, ~] = findBestC(config, trainingdata, validationdata, better);

Error in learnConfiguredCRF (line 42) [model, qualityOverValidation, config] = learnCRFPotentials(config, trainingdata, validationdata);

Error in runVesselSegmentation (line 36) [model, qualityOverValidation, config] = learnConfiguredCRF(trainingdata, validationdata, config);

Error in script_experiments_massive (line 41) results{experiment,crfver} = runVesselSegmentation(config);

hsiaoma commented 7 years ago

I ran into the same problem as @souInd. It seems that averageMeasures.qualities returns zeros(7,1). When I modified qualitiesOnValidationSet(:, count) to a (7,4) array instead of (8,4), Another problem occured.

Reference to non-existent field 'fMeasure'。

Error in getfield (line 36) f = s.(deblank(strField)); % deblank field name

Error in learnCRFPotentials>findBestC (line 100) currentQuality = getfield(averageMeasures, config.modelSelectionMetric);

Error in learnCRFPotentials (line 16) [bestModel, qualityOverValidation, bestParam, ~] = findBestC(config, trainingdata, validationdata, better);

Error in learnConfiguredCRF (line 42) [model, qualityOverValidation, config] = learnCRFPotentials(config, trainingdata, validationdata);

Error in runVesselSegmentation (line 36) [model, qualityOverValidation, config] = learnConfiguredCRF(trainingdata, validationdata, config);

Error in script_experiments_massive (line 42) results{experiment,crfver} = runVesselSegmentation(config);

ignaciorlando commented 7 years ago

Hi all!

Would you mind to check again now? In my laptop is working well.

Cheers,

Nacho

soulnd commented 7 years ago

I run the version you committed recently and it works! Thanks a lot!

ignaciorlando commented 7 years ago

Great!