New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extension framework + Feature-based alignment #19
Conversation
…fied in template file. Also fixed csv output line endings
- Added option to use feature based image alignment using a reference image - Refactored template options to some generic framework in view of supporting future extensions.
No problem! As long as the code is improving we won't face such issues in the future.
Yeah, they were updated into sample1 folder. I will test by updating their template.json files (might need a bit help from you here)
modules would be a better term I think.
Yes, template.json shall not contain the whole preprocessing config. At-least there should not be a compulsion to supply it in every template(As it is not the user's worry). Also, the
Valid point, maybe an additional config.json file which if present, will override the default config including preprocessing and the flags.
We can follow camelCasing for all keys, lowercase would cause readability issues.
Would look into it :) |
This branch would contain my changes(conflict resolutions and sample case fixes etc) over your commits for merging this PR with conflicts- |
@leongwaikay just giving update - I will soon find some time to finish reviewing this PR(with a fabulous contribution of +1000-400). Thanks for being patient! |
@leongwaikay I am currently testing out my samples with the new configurations. Specifically, using the Markers.py extension(now renamed to CropOnMarkers.py) with sample1.
Will fix this so that Older samples also get compatible with this configuration Edit: Fix added(with many other changes for making sample1 run) :-4cdc4fe |
@leongwaikay I have made changes in your branch to make it compatible with my samples. |
Quite a number of things in this PR, as I was refactoring and tidying up as I go (Just following the Boy Scouts rule of leaving your code better than you found it). Ideally each new point should be a separate PR on its own but it was too intertwined to separate when I was done with writing.
Summary of changes
ImagePreprocessor
they will be loaded.template
andconfiguration
file.template.json
are now case insensitive and ordered. Basically, they are converted to lowercase and then placed in an OrderedDict. This is because order matters to the application of the image preprocessors. And it is confusing to keep wondering what case the keys are.pathlib
for most filepaths.os.path.join
is too unclean. Next step should be to clean up the output file paths.