Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

Feature Pyramid Networks #685

Merged
merged 51 commits into from
Feb 6, 2019
Merged

Feature Pyramid Networks #685

merged 51 commits into from
Feb 6, 2019

Conversation

Hakuyume
Copy link
Member

@Hakuyume Hakuyume commented Sep 5, 2018

No description provided.

# offset
gt_loc[:, :2] = (gt_loc[:, :2] - rois_yx[mask]) / \
rois_hw[mask] / std[0]
gt_loc[:, 2:] = xp.log(gt_loc[:, 2:] / rois_hw[mask]) / std[1]
Copy link
Member

@yuyu2172 yuyu2172 Nov 6, 2018

Choose a reason for hiding this comment

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

I find it convenient to see this operation defined in a function because I use this operation myself when writing my own loss function.
Could you define one or use the one included already in ChainerCV?
I think your style seems to be simpler than the one below.

https://github.com/chainer/chainercv/blob/master/chainercv/links/model/faster_rcnn/utils/bbox2loc.py

Copy link
Member

Choose a reason for hiding this comment

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

Same applies for loc2bbox

Copy link
Member Author

Choose a reason for hiding this comment

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

Similar method is also used in SSD. So, I agree with you that we should add a common utility for this functionality. Note that I cannot use bbox2loc here since they are not exactly same.

@Hakuyume
Copy link
Member Author

train/eval/demo scripts are working now.
I will add docs and tests.

@Hakuyume
Copy link
Member Author

Although we discussed loc2bbox/bbox2loc in #685 (comment), I want to add that in another PR.

@yuyu2172
Copy link
Member

OK

@knorth55 knorth55 added this to the 0.12 milestone Jan 25, 2019
@Hakuyume Hakuyume changed the title [WIP] Feature Pyramid Network Feature Pyramid Networks Feb 5, 2019
Copy link
Member

@yuyu2172 yuyu2172 left a comment

Choose a reason for hiding this comment

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

I checked everything except tests

_canonical_level = 2
_canonical_scale = 224
_roi_size = 7
_roi_sample_ratio = 2
Copy link
Member

Choose a reason for hiding this comment

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

Is _roi_sample_ratio used?

shape :math:`(R_l,)`.
std (tuple of floats): Two coefficients used for encoding
bounding boxes.
bboxes (list of arrays): A lisf of arrays whose shape is
Copy link
Member

Choose a reason for hiding this comment

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

lisf -> list

bboxes (list of arrays): A lisf of arrays whose shape is
:math:`(R_n, 4)`, where :math:`R_n` is the number of
ground truth bounding boxes.
labels (list of arrays): A lisf of arrays whose shape is
Copy link
Member

Choose a reason for hiding this comment

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

ditto

sizes (list of tuples of two ints): A list of
:math:`(H_n, W_n)`, where :math:`H_n` and :math:`W_n`
are height and width of the :math:`n`-th image.
bboxes (list of arrays): A lisf of arrays whose shape is
Copy link
Member

Choose a reason for hiding this comment

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

ditto

:math:`(R_n,)`.

Returns:
tuple of four arrays:
Copy link
Member

Choose a reason for hiding this comment

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

tuple of four lists?

| Faster-RCNN FPN ResNet50 | 36.7 % [2] | 37.1 % |
| Faster-RCNN FPN ResNet50 | 39.4 % [2] | 39.5 % |

Scores are mean of mean Average Precision (mmAP).
Copy link
Member

Choose a reason for hiding this comment

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

the mean of mean Average Precision

You can train the model with the following code.
Note that this code requires `chainermn` module.
```
$ mpi4exec -n <#gpu> python train_multi.py [--model faster_rcnn_fpn_resnet50|faster_rcnn_fpn_101] [--batchsize <batchsize>]
Copy link
Member

Choose a reason for hiding this comment

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

mpiexec?

Copy link
Member Author

Choose a reason for hiding this comment

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

README(s) of other models also use mpi4exec. So, I guess this is ok.

Copy link
Member

Choose a reason for hiding this comment

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

is mpi4exec a valid command? I never used it.

Copy link
Member Author

Choose a reason for hiding this comment

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

I changed my mind since the official document of ChainerMN uses mpiexec. Should I update all README(s) in this PR?

Copy link
Member

Choose a reason for hiding this comment

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

It is ok to change all READMEs in this PR.

sed -e 's/return_crowded=True)/return_crowded=True).slice[:20]/' -i eval_coco.py

$PYTHON eval_coco.py --model faster_rcnn_fpn_resnet50 --gpu 0 --batchsize 2
$PYTHON eval_coco.py --model faster_rcnn_fpn_resnet10 --gpu 0 --batchsize 2
Copy link
Member

Choose a reason for hiding this comment

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

typo?

@yuyu2172 yuyu2172 merged commit a029d2f into chainer:master Feb 6, 2019
@Hakuyume Hakuyume deleted the fpn branch February 6, 2019 11:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants