Commit 691375cd authored by Yuxin Wu's avatar Yuxin Wu

summarize box area; update docs

parent 714b0e09
...@@ -44,11 +44,12 @@ If you expect higher speed, please read ...@@ -44,11 +44,12 @@ If you expect higher speed, please read
http://tensorpack.readthedocs.io/tutorial/performance-tuning.html http://tensorpack.readthedocs.io/tutorial/performance-tuning.html
before posting. before posting.
If you expect certain training results (e.g., accuracy), only in one of the two conditions can we help with it: If you expect the model to work better, only in one of the two conditions can we help with it:
(1) You're unable to reproduce the results documented in tensorpack examples. (1) You're unable to reproduce the results documented in tensorpack examples.
(2) It appears to be a tensorpack bug. (2) It appears to be a tensorpack bug.
Otherwise, how to train a model is a machine learning question. Otherwise, how to train a good model on your task or your
modifications is a machine learning question.
We do not answer machine learning questions and it is your responsibility to We do not answer machine learning questions and it is your responsibility to
figure out how to make your models more accurate. figure out how to make your models more accurate.
......
...@@ -11,6 +11,7 @@ from tensorpack.tfutils.tower import get_current_tower_context ...@@ -11,6 +11,7 @@ from tensorpack.tfutils.tower import get_current_tower_context
from config import config as cfg from config import config as cfg
from data import get_all_anchors, get_all_anchors_fpn from data import get_all_anchors, get_all_anchors_fpn
from utils.box_ops import area as tf_area
from . import model_frcnn from . import model_frcnn
from . import model_mrcnn from . import model_mrcnn
...@@ -73,6 +74,8 @@ class GeneralizedRCNN(ModelDesc): ...@@ -73,6 +74,8 @@ class GeneralizedRCNN(ModelDesc):
proposals, rpn_losses = self.rpn(image, features, anchor_inputs) # inputs? proposals, rpn_losses = self.rpn(image, features, anchor_inputs) # inputs?
targets = [inputs[k] for k in ['gt_boxes', 'gt_labels', 'gt_masks'] if k in inputs] targets = [inputs[k] for k in ['gt_boxes', 'gt_labels', 'gt_masks'] if k in inputs]
gt_boxes_area = tf.reduce_mean(tf_area(inputs["gt_boxes"]), name='mean_gt_box_area')
add_moving_summary(gt_boxes_area)
head_losses = self.roi_heads(image, features, proposals, targets) head_losses = self.roi_heads(image, features, proposals, targets)
if self.training: if self.training:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment