mit-quest / necstlab-damage-segmentation

MIT License
5 stars 6 forks source link

Clean the code in model.py #91

Closed CarolinaFurtado closed 3 years ago

CarolinaFurtado commented 3 years ago

e.g. put the if statements into dictionaries outside de main function

CarolinaFurtado commented 3 years ago

@BrendenBarbour I created a branch (cf/clean_models) for this and started working on it. Want to follow up? We can also open this up to more general cleaning, not just models.py @rak5216 what's your take on this?

BrendenBarbour commented 3 years ago

I created a branch as well to do this but your implementation is much more elegant and high level. I would recommend the comment on the mechanics of the libraries more explicitly for the benefit of less experienced users. I would be more than happy to do so myself in the future.

I think this is a good idea for the rest of our code as well as a personal goal of mine is to get less experienced users acquanted with the repository and workflow.

CarolinaFurtado commented 3 years ago

Oh, sorry about that! I did not understand that you were also working on this already. Ok, cool, I'll make sure I add more comments from now on. Fell free to modify the branch as you see fit or to expand the same ideas to other parts od the code

CarolinaFurtado commented 3 years ago

train: if no dataset exists, gives error

image

train: if no pretrained model exists, gives error

image

train thresholds: if no model exists, gives error

image

train thresholds: if no datasets exists, gives error

image

plots ok

image image

right model selected - yes

no image but it selects the right model depending on the model name

all workflowsteps work? yes

train

image

train_thresholds

image

test

image