Skip to content
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

Pipelines for FBA #209

Merged
merged 20 commits into from
Feb 27, 2021
Merged

Pipelines for FBA #209

merged 20 commits into from
Feb 27, 2021

Conversation

yaochaorui
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Feb 25, 2021

Codecov Report

Merging #209 (c08bc95) into master (0abd0fe) will increase coverage by 0.00%.
The diff coverage is 86.53%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #209   +/-   ##
=======================================
  Coverage   82.27%   82.27%           
=======================================
  Files         145      145           
  Lines        6691     6732   +41     
  Branches      997     1004    +7     
=======================================
+ Hits         5505     5539   +34     
- Misses       1083     1086    +3     
- Partials      103      107    +4     
Flag Coverage Δ
unittests 82.27% <86.53%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmedit/datasets/pipelines/__init__.py 100.00% <ø> (ø)
mmedit/datasets/pipelines/loading.py 95.21% <76.92%> (-1.27%) ⬇️
mmedit/datasets/pipelines/matting_aug.py 94.23% <88.88%> (-0.93%) ⬇️
mmedit/datasets/pipelines/augmentation.py 99.16% <100.00%> (-0.01%) ⬇️
mmedit/datasets/pipelines/crop.py 96.81% <100.00%> (-0.02%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0abd0fe...596b594. Read the comment docs.

trimap[trimap_o == 255, 1] = 255
clicks = np.zeros((h, w, 6))
for k in range(2):
if (np.count_nonzero(trimap[:, :, k]) > 0):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

np.any(trimap[:, :, k])

@innerlee
Copy link
Contributor

Please add unittests for this function

@innerlee
Copy link
Contributor

Add repr

trimap2 = np.zeros((h, w, 2), dtype=np.uint8)
trimap2[trimap == 0, 0] = 255
trimap2[trimap == 255, 1] = 255
trimap_trans = np.zeros((h, w, 6), dtype=np.uint8)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is float32

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Sorry.

@innerlee innerlee changed the title Added pipelines for FBA. Pipelines for FBA Feb 27, 2021

@PIPELINES.register_module()
class TransformTrimap:
"""Generate two-channel transformed trimap.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not two channel

@innerlee
Copy link
Contributor

thanks!

@innerlee innerlee merged commit 4f90c0c into master Feb 27, 2021
@innerlee innerlee deleted the ycr/pipeline branch February 27, 2021 11:29
Yshuo-Li pushed a commit to Yshuo-Li/mmediting that referenced this pull request Jul 15, 2022
* Added pipelines for FBA.

* Modified.

* Added test.

* Tiny.

* Added __repr__  funcs.

* Added use_cache.

* Added test.

* Tiny.

* Added unittest.

* Speed up via broadcasting.

* Tiny.

* Use online cache.

* Tiny.

* Tiny.

* Simplified.

* Tiny。

* Tiny.

* Tiny.

* Tiny.

* Polished the doc string.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants