-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Enhance] Merge EditVal/TestLoop and EditPreprocessor to dev-1.x
#1656
Conversation
b93180b
to
be5f5f7
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## dev-1.x #1656 +/- ##
===========================================
- Coverage 88.22% 87.80% -0.43%
===========================================
Files 401 399 -2
Lines 26383 26368 -15
Branches 4083 4114 +31
===========================================
- Hits 23276 23152 -124
- Misses 2204 2329 +125
+ Partials 903 887 -16
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
bf72f22
to
f1d8b35
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR involves significant changes.
Please list as detailed as possible use_case, migration notes, etc.
Hi @LeoXing1996 feel free to discuss any comments. If I misunderstand some usage, please correct me. |
* refactor packeditinput and editdatasample * move util from formatting to img_utils * fix bugs in ut * use permute instead of transpose in all_to_tensor * remove undesired output results * fix the path of results in ut * use np.ascontiguousarray(img) in image_to_tensor * remove entry function from unit test files * refine sinGAN's config Co-authored-by: LeoXing1996 <[email protected]>
* unify GenDataPreprocessor and EditDataPreprocessor * revise models with EditDataPreprocessor * adopt configs with revised EditDataPreprocessor * adopt train_step and unit tests to revised EditDataPreprocessor * fix unit test of inpainter inferencer * add more metainfo to EditDataSample * refactor EditDataPreprocessor to standardize the output channel order and value range of data_samples and inputs * adopt SR models to refactored EditDataPreprocessor * revise padding checking in destruct * revise color order conversion to support get input channel order from metafile and handle single channel images * remove norm_data_samples_in_testing and use upper case for channel order * adopt baseGAN and baseCondGAN for new data preprocessor * convert is_list_of to is_seq_of * refactor inpaintors to adopt new data preprocessor * standardize channel order representation and refactor channel order conversion behaviors * refactor channel conversion in destruct and remove unused codes * update unit test for edit data preprocessor and fix some bugs * adopt inpainting models' with data preprocessor * adopt frame interpolation models' with data preprocessor * revise train_step and unit tests of global_local and partial_conv * adopt colorization models' with data preprocessor * revise train_step and unit tests of aot-gan * adopt SR and VSR models with data preprocessor * revise test config of LIIF * adopt dcgan and SWD, MS-SSIM to new data preprocessor * adopt wgan, ggan and lsgan to new data preprocessor * adopt pggan and styleganv1 to new data preprocessor * adopt pix2pix to new data preprocessor * adopt cyclegan to new data preprocessor * adopt conditional-datasets to new data preprocessor * adopt sngan and sagan to new data preprocessor * adopt biggan to new data preprocessor * adopt stylegan2, singan and mspie to new data preprocessor * adopt stylegan3 to new data preprocessor * adopt eg3d to new data preprocessor * revise transform pipelines * revise unit test of EditDataSample * adopt baseEditModel, vis_hook and visualizer for new data preprocessor * some minor fix of edit data preprocessor and add unit test for model utils * adopt metrics for new data preprocessor * add env var for deterministic training * refactor mattor data preprocessor based on edit data preprocessor * fix lint error * fix some unit tests * update unit test of inpainting inferencer, sad and data preprocessor * optimize the memory cost for AOT-GAN and BasicVSR's unit tests * optimize the memory cost for IconVSR's unit tests * skip ttsr unit test on windows CI
* support new loops * refactor base sample wise metrics, FID and IS * adopt configs to new loops * refine EditLoops and add docstring and unit test for EditLoops * rename GenEvaluator to EditEvaluator * revise configs for new EditLoops and EditEvaluator * remove unused imported modules * revise unit test of BaseSampleWiseMetric * remove GenDataPreprocessor, GenLoop from configs, docstrings and tutorials * avoid raise duplicate conversion warning in EditDataprocessor * revise channel order conversion in FID metric * rename GenLogProcessor and GenIterTimeHook to EditLogProcessor and EditIterTimeHook * rename some elements in default_runtime * support non-scalar in get_log_after_epoch as MMEngine's LogProcessor * save metainfo in Resize for outkeys * complete prepare method for Matting metrics * remove GenLoop, MutliLoop, GenDataPreprocessor * remove PixelData
add more docstring to pass lint checking
* support stack and split in data sample * support stack for EditDataPreprocessor * support length in EditDataSample and revise stack and split operation * adapt models for the stacked data samples * support stack for MattorPreprocessor * remove useless comments * revise the return type of forward_inference to EditDataSample * add security checking for EditDataSample.split * revise inferencer unit tests * revise inception utils * revise conditional gan models * revise unit test for base mattor * revise unit test for twostage inpaintor and aot-inpaintor * revise unit test for LIIF * revise unit test for cyclegan and pix2pix * revise unit test for pconv * revise unit test for vis hook + fix bug in split * revise more unit tests to pass CI and reduce the input resolution of wo-stage UI * support video process for EditDataPreprocessor.process_image_tensor * revise unit test of EDVR * revise comment in EditDataSample.split * remove more useless comments
* make forward logic more clear for GAN models * revise eg3d inferencer unit test * polish length calculate and split operation for EditDataSample * revise forward pipeline for BaseGAN and BaseCondGAN * revise forward pipeline for EG3D * revise forward pipeline for PGGAN * remove useless comments from SinGAN * remove is_stacked property from EditDataSample
e2b0922
to
d0bbfe5
Compare
remove useless comments from MS-SSIM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.
Motivation
Merge refactored loops and preprocessor to
dev-1.x
.Modification
stack
andsplit
forEditDataSample
[Enhancement] Supportstack
andsplit
forEditDataSampe
#1669Hightlights
and
MultiValLoophas been merged to
EditValLoop,
GenTestLoopand
MultiTestLoophas been merged to
EditTestLoop`. Use case:stack
andsplit
forEditDataSample
, Use case:Who can help? @ them here!
BC-breaking (Optional)
data_samples.gt_img
instead ofinputs['img']
GenValLoop
andMultiValLoop
has been merged toEditValLoop
,GenTestLoop
andMultiTestLoop
has been merged toEditTestLoop
.GenDataPreprocessor
has been merged intoEditDataPreprocessor
,type
field in config.input_view
andoutput_view
since we will infer the shape of mean automatically.BGR
(for three-channel images) and[0, 255]
.PixelData
has been removedUse cases (Optional)
If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.
Checklist
Before PR:
After PR: