Skip to content

Commit

Permalink
fix link in docs; upgrade container in circleci for gcc5
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: fairinternal/detectron2#372

Differential Revision: D19482654

Pulled By: ppwwyyxx

fbshipit-source-id: 0772df003713991085ca5f98cfa77a56d3c1f85e
  • Loading branch information
ppwwyyxx authored and facebook-github-bot committed Jan 21, 2020
1 parent d3b9f7b commit 116e31e
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version: 2
# -------------------------------------------------------------------------------------
cpu: &cpu
docker:
- image: circleci/python:3.6.2
- image: circleci/python:3.6.8-stretch
resource_class: medium

gpu: &gpu
Expand Down
7 changes: 5 additions & 2 deletions detectron2/engine/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ def default_setup(cfg, args):

class DefaultPredictor:
"""
Create a simple end-to-end predictor with the given config.
Create a simple end-to-end predictor with the given config that runs on
single device for a single input image.
The predictor takes an BGR image, resizes it to the specified resolution,
runs the model and produces a dict of predictions.
Expand Down Expand Up @@ -174,7 +175,9 @@ def __call__(self, original_image):
original_image (np.ndarray): an image of shape (H, W, C) (in BGR order).
Returns:
predictions (dict): the output of the model
predictions (dict):
the output of the model for one image only.
See :doc:`/tutorials/models` for details about the format.
"""
with torch.no_grad(): # https://github.com/sphinx-doc/sphinx/issues/4258
# Apply pre-processing to image.
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/data_loading.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ You can implement it using any tools you like.

If you use [DefaultTrainer](../modules/engine.html#detectron2.engine.defaults.DefaultTrainer),
you can overwrite its `build_{train,test}__loader` method to use your own dataloader.
See the [densepose dataloader](/projects/DensePose/train_net.py)
See the [densepose dataloader](../../projects/DensePose/train_net.py)
for an example.

If you write your own training loop, you can plug in your data loader easily.
2 changes: 1 addition & 1 deletion docs/tutorials/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ We provide a tool, `tools/caffe2_converter.py` as an example that uses
these APIs to convert a standard model.

To convert an official Mask R-CNN trained on COCO, first
[prepare the COCO dataset](datasets), then pick the model from [Model Zoo](MODEL_ZOO.md), and run:
[prepare the COCO dataset](../../datasets/), then pick the model from [Model Zoo](../../MODEL_ZOO.md), and run:
```
python tools/caffe2_converter.py --config-file configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml \
--output ./caffe2_model --run-eval \
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/training.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ From the previous tutorials, you may now have a custom model and data loader.
You are free to create your own optimizer, and write the training logic: it's
usually easy with PyTorch, and allow researchers to see the entire training
logic more clearly.
One such example is provided in [tools/plain_train_net.py](https://github.com/facebookresearch/detectron2/blob/master/tools/plain_train_net.py).
One such example is provided in [tools/plain_train_net.py](../../tools/plain_train_net.py).

We also provide a standarized "trainer" abstraction with a
[minimal hook system](../modules/engine.html#detectron2.engine.HookBase)
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/write-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ Then, you can use `cfg.MODEL.BACKBONE.NAME = 'ToyBackBone'` in your config objec
As another example, to add new abilities to the ROI heads in the Generalized R-CNN meta-architecture,
you can implement a new
[ROIHeads](../modules/modeling.html#detectron2.modeling.ROIHeads) subclass and put it in the `ROI_HEADS_REGISTRY`.
See [densepose in detectron2](https://github.com/facebookresearch/detectron2/tree/master/projects/DensePose)
See [densepose in detectron2](../../projects/DensePose)
for an example that implements new ROIHeads.
And [projects/](https://github.com/facebookresearch/detectron2/tree/master/projects/)
And [projects/](../../projects/)
contains examples that implement a few different architectures.

A complete list of registries can be found in [API documentation](../modules/modeling.html#model-registries).
Expand Down

0 comments on commit 116e31e

Please sign in to comment.