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

Add Pascal Context to mmsegmentation #133

Merged
merged 13 commits into from
Sep 22, 2020
Merged

Add Pascal Context to mmsegmentation #133

merged 13 commits into from
Sep 22, 2020

Conversation

yamengxi
Copy link
Collaborator

No description provided.

@CLAassistant
Copy link

CLAassistant commented Sep 15, 2020

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Sep 15, 2020

Codecov Report

Merging #133 into master will increase coverage by 0.00%.
The diff coverage is 85.71%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #133   +/-   ##
=======================================
  Coverage   83.03%   83.04%           
=======================================
  Files          84       85    +1     
  Lines        3968     3980   +12     
  Branches      625      627    +2     
=======================================
+ Hits         3295     3305   +10     
- Misses        539      541    +2     
  Partials      134      134           
Flag Coverage Δ
#unittests 83.04% <85.71%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
mmseg/models/segmentors/encoder_decoder.py 89.93% <ø> (-0.07%) ⬇️
mmseg/datasets/pascal_context.py 80.00% <80.00%> (ø)
mmseg/core/evaluation/mean_iou.py 100.00% <100.00%> (ø)
mmseg/datasets/__init__.py 100.00% <100.00%> (ø)

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 768c3ee...1e73bf1. Read the comment docs.

@@ -2,7 +2,7 @@

from .version import __version__, version_info

MMCV_MIN = '1.1.2'
MMCV_MIN = '1.1.0'
Copy link
Collaborator

Choose a reason for hiding this comment

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

We may keep this file unchanged.

Comment on lines 23 to 25
'''
PALETTE is testing
'''
Copy link
Collaborator

Choose a reason for hiding this comment

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

We may remove this line if the palette works fine.

@@ -91,7 +91,7 @@ def encode_decode(self, img, img_metas):
size=img.shape[2:],
mode='bilinear',
align_corners=self.align_corners)
return out
return out.exp()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
return out.exp()
return out

Comment on lines 175 to 176
# assert h_crop <= h_img and w_crop <= w_img, (
# 'crop size should not greater than image size')
Copy link
Collaborator

Choose a reason for hiding this comment

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

These lines could be removed. We may also add comments about what would happen if h_crop > h_img.

run.sh Outdated
@@ -0,0 +1,15 @@
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=1 tools/slurm_train.sh mediaf pr_test configs/hrnet/fcn_hr48_480x480_40k_pascal_context.py --seed=0
Copy link
Collaborator

Choose a reason for hiding this comment

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

This file is not necessary.

@@ -21,4 +21,4 @@ srun -p ${PARTITION} \
--cpus-per-task=${CPUS_PER_TASK} \
--kill-on-bad-exit=1 \
${SRUN_ARGS} \
python -u tools/test.py ${CONFIG} ${CHECKPOINT} --launcher="slurm" ${PY_ARGS}
python -u tools/test.py ${CONFIG} ${CHECKPOINT} --launcher="slurm" ${PY_ARGS} &
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unnecessary modification.

@@ -20,4 +20,4 @@ srun -p ${PARTITION} \
--cpus-per-task=${CPUS_PER_TASK} \
--kill-on-bad-exit=1 \
${SRUN_ARGS} \
python -u tools/train.py ${CONFIG} --launcher="slurm" ${PY_ARGS}
python -u tools/train.py ${CONFIG} --launcher="slurm" ${PY_ARGS} &
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unnecessary modification.

tools/test.py Outdated
Comment on lines 115 to 123
if 'CLASSES' not in checkpoint['meta']:
model.CLASSES = dataset.CLASSES
else:
model.CLASSES = checkpoint['meta']['CLASSES']

if 'PALETTE' not in checkpoint['meta']:
model.PALETTE = dataset.PALETTE
else:
model.PALETTE = checkpoint['meta']['PALETTE']
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unnecessary modification.

Comment on lines 1 to 9
# optimizer
optimizer = dict(type='SGD', lr=0.004, momentum=0.9, weight_decay=0.0001)
optimizer_config = dict()
# learning policy
lr_config = dict(policy='poly', power=0.9, min_lr=1e-4, by_epoch=False)
# runtime settings
total_iters = 40000
checkpoint_config = dict(by_epoch=False, interval=4000)
evaluation = dict(interval=4000, metric='mIoU')
Copy link
Collaborator

Choose a reason for hiding this comment

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

We may delete this file and modify the corresponding lr directly.

optimizer = dict(type='SGD', lr=0.004, momentum=0.9, weight_decay=0.0001)
optimizer_config = dict()
# learning policy
lr_config = dict(policy='poly', power=0.9, min_lr=1e-4, by_epoch=False)
Copy link
Collaborator

Choose a reason for hiding this comment

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

We may delete this file and modify the corresponding lr directly.

@yamengxi
Copy link
Collaborator Author

I have resolved all the problems, please review.

yamengxi and others added 3 commits September 18, 2020 11:16
update hint

Co-authored-by: Jerry Jiarui XU <xvjiarui0826@gmail.com>
@yamengxi
Copy link
Collaborator Author

Here is the update comment version.

### Pascal Context
| Method | Backbone | Crop Size | Lr schd | Mem (GB) | Inf time (fps) | mIoU | mIoU(ms+flip) | download |
|-----------|----------|-----------|--------:|----------|----------------|------:|--------------:|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| DeepLabV3 | R-101-D8 | 480x480 | 40000 | 9.2 | 7.09 | 46.55 | 47.81 | [model](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r101-d8_480x480_80k_pascal_context/deeplabv3_r101-d8_480x480_40k_pascal_context_20200911_204118-1aa27336.pth) &#124; [log](https://openmmlab.oss-accelerate.aliyuncs.com/mmsegmentation/v0.5/deeplabv3/deeplabv3_r101-d8_480x480_80k_pascal_context/deeplabv3_r101-d8_480x480_40k_pascal_context-20200911_204118.log.json) |
Copy link
Collaborator

Choose a reason for hiding this comment

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

These filenames are not the same as the paths provided. Please check.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be pascal_context- not pascal_context_.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also, check the timestamp.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

you means should be pascal_context_ not pascal_context-

@yamengxi
Copy link
Collaborator Author

I have fixed the model path mistakes.

@xvjiarui xvjiarui merged commit a2738fd into open-mmlab:master Sep 22, 2020
@hellock
Copy link
Member

hellock commented Sep 22, 2020

Task linked: CU-4fp4de Pascal Context

bowenroom pushed a commit to bowenroom/mmsegmentation that referenced this pull request Feb 25, 2022
* Add Pascal Context to mmsegmentation

* Add benchmark result to Pascal Context

* fix mmcv version

* fix code syntax

* fix code syntax again

* Update mmseg/models/segmentors/encoder_decoder.py

update hint

Co-authored-by: Jerry Jiarui XU <xvjiarui0826@gmail.com>

* update comment

* fix pascal context model path

* fix model path mistake again

* fix model path mistake again

* fix model path mistakes again

Co-authored-by: Jerry Jiarui XU <xvjiarui0826@gmail.com>
aravind-h-v pushed a commit to aravind-h-v/mmsegmentation that referenced this pull request Mar 27, 2023
* Update README.md

line 23, 24 and 25: Remove "that" because "that" is unnecessary in these three sentences.
line 33: Rewrite this sentence and make it more straightforward.
line 34: This first sentence is incomplete.
line 117: “focusses" -> "focuses"
line 118: "continuous" -> "continuous"
line 119: "consise" -> "concise"

* Update README.md
wjkim81 pushed a commit to wjkim81/mmsegmentation that referenced this pull request Dec 3, 2023
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.

4 participants