Skip to content

Commit 4dfae3a

Browse files
[Fix] Fix hvu object numclasses (open-mmlab#307)
* resolve comments * update changelog * fix config * fix typo (action model is trained with the right numclasses) * update influenced model links * fix bug * remove file mis-added * update changelog
1 parent 303b62b commit 4dfae3a

File tree

10 files changed

+12
-11
lines changed

10 files changed

+12
-11
lines changed

configs/recognition/tsn/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ In data benchmark, we compare:
129129
| :----------------------------------------------------------: | :----------: | :------------: | :--: | :------: | :------: | :--: | :-------: | :-------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: |
130130
| [tsn_r18_1x1x8_100e_hvu_action_rgb](/configs/recognition/tsn/hvu/tsn_r18_1x1x8_100e_hvu_action_rgb.py) | action | short-side 256 | 8x2 | ResNet18 | ImageNet | 57.5 | 51.8 | 53.5 | [ckpt](https://download.openmmlab.com/mmaction/recognition/tsn/hvu/action/tsn_r18_1x1x8_100e_hvu_action_rgb_20201027-011b282b.pth) | [log](https://download.openmmlab.com/mmaction/recognition/tsn/hvu/action/tsn_r18_1x1x8_100e_hvu_action_rgb_20201027.log) | [json](https://download.openmmlab.com/mmaction/recognition/tsn/hvu/action/tsn_r18_1x1x8_100e_hvu_action_rgb_20201027.json) |
131131
| [tsn_r18_1x1x8_100e_hvu_scene_rgb](/configs/recognition/tsn/hvu/tsn_r18_1x1x8_100e_hvu_scene_rgb.py) | scene | short-side 256 | 8 | ResNet18 | ImageNet | 55.2 | 55.8 | 57.2 | [ckpt](https://download.openmmlab.com/mmaction/recognition/tsn/hvu/scene/tsn_r18_1x1x8_100e_hvu_scene_rgb_20201027-00e5748d.pth) | [log](https://download.openmmlab.com/mmaction/recognition/tsn/hvu/scene/tsn_r18_1x1x8_100e_hvu_scene_rgb_20201027.log) | [json](https://download.openmmlab.com/mmaction/recognition/tsn/hvu/scene/tsn_r18_1x1x8_100e_hvu_scene_rgb_20201027.json) |
132-
| [tsn_r18_1x1x8_100e_hvu_object_rgb](/configs/recognition/tsn/hvu/tsn_r18_1x1x8_100e_hvu_object_rgb.py) | object | short-side 256 | 8 | ResNet18 | ImageNet | 45.7 | 34.2 | 35.1 | [ckpt](https://download.openmmlab.com/mmaction/recognition/tsn/hvu/object/tsn_r18_1x1x8_100e_hvu_object_rgb_20201027-ec8e1083.pth) | [log](https://download.openmmlab.com/mmaction/recognition/tsn/hvu/object/tsn_r18_1x1x8_100e_hvu_object_rgb_20201027.log) | [json](https://download.openmmlab.com/mmaction/recognition/tsn/hvu/object/tsn_r18_1x1x8_100e_hvu_object_rgb_20201027.json) |
132+
| [tsn_r18_1x1x8_100e_hvu_object_rgb](/configs/recognition/tsn/hvu/tsn_r18_1x1x8_100e_hvu_object_rgb.py) | object | short-side 256 | 8 | ResNet18 | ImageNet | 45.7 | 34.2 | 35.1 | [ckpt](https://download.openmmlab.com/mmaction/recognition/tsn/hvu/object/tsn_r18_1x1x8_100e_hvu_object_rgb_20201102-24a22f30.pth) | [log](https://download.openmmlab.com/mmaction/recognition/tsn/hvu/object/tsn_r18_1x1x8_100e_hvu_object_rgb_20201027.log) | [json](https://download.openmmlab.com/mmaction/recognition/tsn/hvu/object/tsn_r18_1x1x8_100e_hvu_object_rgb_20201027.json) |
133133
| [tsn_r18_1x1x8_100e_hvu_event_rgb](/configs/recognition/tsn/hvu/tsn_r18_1x1x8_100e_hvu_event_rgb.py) | event | short-side 256 | 8 | ResNet18 | ImageNet | 63.7 | 38.5 | 39.8 | [ckpt](https://download.openmmlab.com/mmaction/recognition/tsn/hvu/event/tsn_r18_1x1x8_100e_hvu_event_rgb_20201027-dea8cd71.pth) | [log](https://download.openmmlab.com/mmaction/recognition/tsn/hvu/event/tsn_r18_1x1x8_100e_hvu_event_rgb_20201027.log) | [json](https://download.openmmlab.com/mmaction/recognition/tsn/hvu/event/tsn_r18_1x1x8_100e_hvu_event_rgb_20201027.json) |
134134
| [tsn_r18_1x1x8_100e_hvu_concept_rgb](/configs/recognition/tsn/hvu/tsn_r18_1x1x8_100e_hvu_concept_rgb.py) | concept | short-side 256 | 8 | ResNet18 | ImageNet | 47.5 | 26.1 | 27.3 | [ckpt](https://download.openmmlab.com/mmaction/recognition/tsn/hvu/concept/tsn_r18_1x1x8_100e_hvu_concept_rgb_20201027-fc1dd8e3.pth) | [log](https://download.openmmlab.com/mmaction/recognition/tsn/hvu/concept/tsn_r18_1x1x8_100e_hvu_concept_rgb_20201027.log) | [json](https://download.openmmlab.com/mmaction/recognition/tsn/hvu/concept/tsn_r18_1x1x8_100e_hvu_concept_rgb_20201027.json) |
135135
| [tsn_r18_1x1x8_100e_hvu_attribute_rgb](/configs/recognition/tsn/hvu/tsn_r18_1x1x8_100e_hvu_attribute_rgb.py) | attribute | short-side 256 | 8 | ResNet18 | ImageNet | 46.1 | 33.6 | 34.9 | [ckpt](https://download.openmmlab.com/mmaction/recognition/tsn/hvu/attribute/tsn_r18_1x1x8_100e_hvu_attribute_rgb_20201027-0b3b49d2.pth) | [log](https://download.openmmlab.com/mmaction/recognition/tsn/hvu/attribute/tsn_r18_1x1x8_100e_hvu_attribute_rgb_20201027.log) | [json](https://download.openmmlab.com/mmaction/recognition/tsn/hvu/attribute/tsn_r18_1x1x8_100e_hvu_attribute_rgb_20201027.json) |

configs/recognition/tsn/hvu/tsn_r18_1x1x8_100e_hvu_action_rgb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# model settings
22
category_nums = dict(
3-
action=729, attribute=117, concept=291, event=69, object=1679, scene=248)
3+
action=739, attribute=117, concept=291, event=69, object=1678, scene=248)
44
target_cate = 'action'
55

66
model = dict(

configs/recognition/tsn/hvu/tsn_r18_1x1x8_100e_hvu_attribute_rgb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# model settings
22
category_nums = dict(
3-
action=729, attribute=117, concept=291, event=69, object=1679, scene=248)
3+
action=739, attribute=117, concept=291, event=69, object=1678, scene=248)
44
target_cate = 'attribute'
55

66
model = dict(

configs/recognition/tsn/hvu/tsn_r18_1x1x8_100e_hvu_concept_rgb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# model settings
22
category_nums = dict(
3-
action=729, attribute=117, concept=291, event=69, object=1679, scene=248)
3+
action=739, attribute=117, concept=291, event=69, object=1678, scene=248)
44
target_cate = 'object'
55

66
model = dict(

configs/recognition/tsn/hvu/tsn_r18_1x1x8_100e_hvu_event_rgb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# model settings
22
category_nums = dict(
3-
action=729, attribute=117, concept=291, event=69, object=1679, scene=248)
3+
action=739, attribute=117, concept=291, event=69, object=1678, scene=248)
44
target_cate = 'event'
55

66
model = dict(

configs/recognition/tsn/hvu/tsn_r18_1x1x8_100e_hvu_object_rgb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# model settings
22
category_nums = dict(
3-
action=729, attribute=117, concept=291, event=69, object=1679, scene=248)
3+
action=739, attribute=117, concept=291, event=69, object=1678, scene=248)
44
target_cate = 'object'
55

66
model = dict(

configs/recognition/tsn/hvu/tsn_r18_1x1x8_100e_hvu_scene_rgb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# model settings
22
category_nums = dict(
3-
action=729, attribute=117, concept=291, event=69, object=1679, scene=248)
3+
action=739, attribute=117, concept=291, event=69, object=1678, scene=248)
44
target_cate = 'scene'
55

66
model = dict(

docs/changelog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Changelog
22

3-
###v 0.9.0 (master)
3+
### 0.9.0 (master)
44

55
**Highlights**
66

@@ -14,6 +14,7 @@
1414

1515
**Bug Fixes**
1616
- Fix a bug in BaseDataset when `data_prefix` is None ([#314](https://github.com/open-mmlab/mmaction2/pull/314))
17+
- Fix the bug of HVU object `num_classes` from 1679 to 1678 ([#307](https://github.com/open-mmlab/mmaction2/pull/307))
1718

1819
**ModelZoo**
1920

mmaction/models/losses/hvu_loss.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class HVULoss(BaseWeightedLoss):
1414
this order. Default: ['action', 'attribute', 'concept', 'event',
1515
'object', 'scene'].
1616
category_nums (tuple[int]): Number of tags for each category. Default:
17-
(739, 117, 291, 69, 1679, 248).
17+
(739, 117, 291, 69, 1678, 248).
1818
category_loss_weights (tuple[float]): Loss weights of categories, it
1919
applies only if `loss_type == 'individual'`. The loss weights will
2020
be normalized so that the sum equals to 1, so that you can give any
@@ -34,7 +34,7 @@ class HVULoss(BaseWeightedLoss):
3434
def __init__(self,
3535
categories=('action', 'attribute', 'concept', 'event',
3636
'object', 'scene'),
37-
category_nums=(739, 117, 291, 69, 1679, 248),
37+
category_nums=(739, 117, 291, 69, 1678, 248),
3838
category_loss_weights=(1, 1, 1, 1, 1, 1),
3939
loss_type='all',
4040
with_mask=False,

tests/test_data/test_dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def setup_class(cls):
141141
'action', 'attribute', 'concept', 'event', 'object', 'scene'
142142
]
143143

144-
cls.hvu_category_nums = [739, 117, 291, 69, 1679, 248]
144+
cls.hvu_category_nums = [739, 117, 291, 69, 1678, 248]
145145
cls.filename_tmpl = 'img_{:05d}.jpg'
146146

147147
def test_hvu_dataset(self):

0 commit comments

Comments
 (0)