Aesthetics: Cleaned up preprocessing.py
LalithShiyam opened this issue ยท 4 comments
#30 Basically address the comments present here!
I addressed the most changes and updated the branch for #18.
Implemented changes regarding the review
- Changed computeMI to compute_MI
- compute_MI now returns positive MI
- Changed current_MI < MI_threshold to current_MI > MI_threshold to account for above change
- Changed determine_starting_frame_by_threshold to find_start_frame
- Using fileOP make_dir now
- Sample size is now calculated based on amount of available files (20%)
- Added downsample_image() which combines blurring and resampling
- Imported mpire for future use
- Imported constants.py and added three shrink levels
Changes ToDo:
- Utilize mpire
The changes ran without any errors or unexpected behaviour in a simple test case. Same outcome as before changes with the expected result of the determined starting frame.
mpire implementation needs a bit more testing before I will add it.
Hi @Keyn34, cool! I went through the changes, and I think the function find_start_frame
in preProcessing.py
doesn't return anything now. I might be wrong...
For the time being we can stall mpire
parallel processing. And add it later as well. Whatever is convenient.
@LalithShiyam, it does return the index of the corresponding starting frame. Or what do you mean? Did I miss something?
I'll add it soon - just need a bit more time for testing and maybe rearranging the functions and how they work/enclosed they are.
@Keyn34: LOL, yes sorry my bad! I missed it ๐