Commit fc0f6fca authored by Yuxin Wu's avatar Yuxin Wu

some docs update

parent b2a396e5
Bug Reports/Feature Requests/Usage Questions Only: Bug Reports/Feature Requests/Usage Questions Only:
Any unexpected problems with code: PLEASE always include Any unexpected problems: PLEASE always include
1. What you did. (command you run and changes you made if using examples; post or describe your code if not) 1. What you did. (command you run and changes you made if using examples; post or describe your code if not)
2. What you observed, e.g. as much as logs possible. 2. What you observed, e.g. as much as logs possible.
3. What you expected, if not obvious. 3. What you expected, if not obvious.
......
...@@ -65,4 +65,5 @@ TEST_PRE_NMS_TOPK = 6000 ...@@ -65,4 +65,5 @@ TEST_PRE_NMS_TOPK = 6000
TEST_POST_NMS_TOPK = 1000 # if you encounter OOM in inference, set this to a smaller number TEST_POST_NMS_TOPK = 1000 # if you encounter OOM in inference, set this to a smaller number
FASTRCNN_NMS_THRESH = 0.5 FASTRCNN_NMS_THRESH = 0.5
RESULT_SCORE_THRESH = 0.05 RESULT_SCORE_THRESH = 0.05
RESULT_SCORE_THRESH_VIS = 0.3 # only visualize confident results
RESULTS_PER_IM = 100 RESULTS_PER_IM = 100
...@@ -343,6 +343,10 @@ if __name__ == '__main__': ...@@ -343,6 +343,10 @@ if __name__ == '__main__':
assert args.load assert args.load
print_config() print_config()
if args.predict or args.visualize:
config.RESULT_SCORE_THRESH = config.RESULT_SCORE_THRESH_VIS
if args.visualize: if args.visualize:
visualize(args.load) visualize(args.load)
else: else:
...@@ -355,7 +359,7 @@ if __name__ == '__main__': ...@@ -355,7 +359,7 @@ if __name__ == '__main__':
assert args.evaluate.endswith('.json') assert args.evaluate.endswith('.json')
offline_evaluate(pred, args.evaluate) offline_evaluate(pred, args.evaluate)
elif args.predict: elif args.predict:
COCODetection(config.BASEDIR, 'train2014') # to load the class names into caches COCODetection(config.BASEDIR, 'val2014') # Only to load the class names into caches
predict(pred, args.predict) predict(pred, args.predict)
else: else:
logger.set_logger_dir(args.logdir) logger.set_logger_dir(args.logdir)
......
...@@ -294,8 +294,8 @@ class Trainer(object): ...@@ -294,8 +294,8 @@ class Trainer(object):
""" """
Same as :meth:`train()`, but will: Same as :meth:`train()`, but will:
1. Append `DEFAULT_CALLBACKS()` to callbacks. 1. Append :meth:`DEFAULT_CALLBACKS()` to callbacks.
2. Append `DEFAULT_MONITORS()` to monitors. 2. Append :meth:`DEFAULT_MONITORS()` to monitors.
3. Provide default values for every option except `steps_per_epoch`. 3. Provide default values for every option except `steps_per_epoch`.
""" """
callbacks = (callbacks or []) + DEFAULT_CALLBACKS() callbacks = (callbacks or []) + DEFAULT_CALLBACKS()
......
...@@ -67,12 +67,14 @@ class TrainConfig(object): ...@@ -67,12 +67,14 @@ class TrainConfig(object):
callbacks (list): a list of :class:`Callback` to perform during training. callbacks (list): a list of :class:`Callback` to perform during training.
extra_callbacks (list): the same as ``callbacks``. This argument extra_callbacks (list): the same as ``callbacks``. This argument
is only used to provide the defaults in addition to ``callbacks``. The defaults are is only used to provide the defaults in addition to ``callbacks``.
``MovingAverageSummary()``, ``ProgressBar()``, The list of callbacks that will be used in the end is ``callbacks + extra_callbacks``.
``MergeAllSummaries()``, ``RunUpdateOps()``. The list of
callbacks that will be used in the end is ``callbacks + extra_callbacks``. It is usually left as None and the default value for this
option will be the return value of :meth:`train.DEFAULT_CALLBACKS()`.
You can override it when you don't like any of the default callbacks.
monitors (list): a list of :class:`TrainingMonitor`. monitors (list): a list of :class:`TrainingMonitor`.
Defaults to ``TFEventWriter()``, ``JSONWriter()``, ``ScalarPrinter()``. Defaults to the return value of :meth:`train.DEFAULT_MONITORS()`.
session_creator (tf.train.SessionCreator): Defaults to :class:`sesscreate.NewSessionCreator()` session_creator (tf.train.SessionCreator): Defaults to :class:`sesscreate.NewSessionCreator()`
with the config returned by :func:`tfutils.get_default_sess_config()`. with the config returned by :func:`tfutils.get_default_sess_config()`.
......
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