thomaskuestner/CNNArt

some bugs in main.py

Closed this issue · 3 comments

Hi all, I still have some problems when running the main.py program in master. I've made a summary here:

  1. lDatasets should be not be defined as
lDatasets = cfg['selectedDatabase']['dataref'] + cfg['selectedDatabase']['dataart']

otherwise it would be a concatenated string instead of a list (the same to iLabels below it)

  1. In line 74 where tmpPatches and tmpLabels are defined:
tmpPatches, tmpLabels  = datapre.fPreprocessData(os.path.join(dbinfo.sPathIn, os.sep, pat, os.sep, dbinfo.sSubDirs[1], os.sep, seq), cfg['patchSize'], cfg['patchOverlap'], 1 )

I think os.sep should not be added here, otherwise it will only pass seq as pathDicom to DataProcessing.py as I tested on my local environment.

  1. In DataProcessing.py in line 99, loadMark is specified as
loadMark = shelve.open("C:/Users/Sebastian Milde/Pictures/Universitaet/Masterarbeit/Markings/" + proband + ".slv")

where the address is not a valid one.

Could you please look into these issues? Thank you so much.

you need to change the config definition of dataref and dataart
solved: f6f145f

@thomaskuestner Hi Thomas, it seems we should add [] (list) instead if {} (dictionary)
and could you also please look into the other two issues I mentioned above?

for the last point you have to talk to @SebastianMilde