-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
memory efficient test #330
Conversation
…msegmentation into memory-efficient-test Conflicts: mmseg/apis/test.py mmseg/core/evaluation/metrics.py
mmseg/apis/test.py
Outdated
temp_file_name = tempfile.NamedTemporaryFile( | ||
suffix='.npy', delete=False).name | ||
np.save(temp_file_name, item) |
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.
I suggest making this part a function. So that we could have sth like:
results.extend(np2tmp(_) for _ in result)
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.
Is there a pair of []?
results.extend([np2tmp(_) for _ in result])
if reduce_zero_label: | ||
# avoid using underflow conversion | ||
label[label == 0] = 255 | ||
label = label - 1 | ||
label[label == 254] = 255 |
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.
Could reduce_zero_labels
be merged with label_map
?
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.
But in custom.py, reduce_zero_label
and label_map
is two different attributes. If we merge the two different attributes in metrics.py but retain the two different attributes in custom.py, is it something disunity?
|
Codecov Report
@@ Coverage Diff @@
## master #330 +/- ##
==========================================
- Coverage 86.47% 86.07% -0.41%
==========================================
Files 95 95
Lines 4761 4789 +28
Branches 765 778 +13
==========================================
+ Hits 4117 4122 +5
- Misses 499 519 +20
- Partials 145 148 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
CPU memory efficient test DeeplabV3+ on Cityscapes (without saving the test results) and evaluate the mIoU.
Using |
* memory efficient test * implement efficient test * merge * Add document and docstring * fix unit test * add memory usage report
* add void check * remove void, add types for params
CPU memory efficient test DeeplabV3+ on Cityscapes (without saving the test results) and evaluate the mIoU.
Using
pmap
to view CPU memory footprint, it used 2.25GB CPU memory withefficient_test=True
and 11.06GB CPU memory withefficient_test=False
. This optional parameter can save a lot of memory.