-
Notifications
You must be signed in to change notification settings - Fork 302
Conversation
…tors-from-apply-detection-link
…tors-from-apply-detection-link
…tors-from-apply-detection-link
This is a great idea! |
* :obj:`gt_values`: A tuple of iterators. Each iterator \ | ||
returns a corresponding ground truth value. If the input \ | ||
iterator does not give any ground truth values, this tuple \ | ||
will be empty. |
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.
Perhaps, we can add an example for gt_values
as well.
:func:`predict` as an argument. | ||
The rests are treated as ground truth values. | ||
hook: A callable which is called after each iteration. | ||
:obj:`imgs`, :obj:`pred_labels` and :obj:`gt_values` are passed as |
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 think pred_labels
is wrong
>>> pred_vals0, pred_vals1 = predict(imgs) | ||
>>> # pred_vals0: [pred_val0] | ||
>>> # pred_vals1: [pred_val1] | ||
|
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.
A simple working code example would help.
and :obj:`next(pred_values[1])` will be \ | ||
:obj:`pred_val0` and :obj:`pred_val1`. | ||
* :obj:`gt_values`: A tuple of iterators. Each iterator \ | ||
returns a corresponding ground truth value. |
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.
You forgot \
.
>>> # pred_vals0: [pred_val0] | ||
>>> # pred_vals1: [pred_val1] | ||
|
||
Here is an exmple which applies a pretrained Faster R-CNN to |
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 think you need a comma before which because this is a nonrestrictive phrase.
A nonrestrictive phrase adds a little bit of extra (but not essential) information about a noun phrase that you’ve already mentioned in your sentence.
https://www.grammarly.com/blog/comma-before-which/
Also, I have read that that
is preferred in a restrictive phrase case.
Perhaps, we can change which
used in Args to that
.
Although some writers use "which" to introduce a restrictive clause, the traditional practice is to use "that" to introduce a restrictive clause and "which" to introduce a nonrestrictive clause.
http://www.kentlaw.edu/academics/lrw/grinker/LwtaClauses__Restrictive_and_Nonrest.htm
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 think which
s used in Args
are restrictive.
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.
If its restrictive, don't we not use commas?
Also, I think , which
should be used for this line, and that (no comma)
for Args.
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.
Sorry, I was misunderstanding.
>>> dataset = VOCDetectionDataset(year='2007', split='test') | ||
>>> # next(iterator) -> [(img, gt_bbox, gt_label)] | ||
>>> iterator = iterators.SerialIterator( | ||
... dataset, 32, repeat=False, shuffle=False) |
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.
How about batchsize 2?
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 think it is better to set batchsize
more than 1 because we can show apply_prediction_to_iterator
flattens batches.
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.
Sorry. I changed my initial comment. How about 2?
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 think 2 is OK. I fixed.
Except for |
merge after #227