Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: facebookresearch#31

Differential Revision: D17895179

Pulled By: ppwwyyxx

fbshipit-source-id: 9aa9d85cfe8e9901aaba5f56cda74224b1e2a51f
  • Loading branch information
ppwwyyxx authored and facebook-github-bot committed Oct 12, 2019
1 parent e67f881 commit 300df23
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
14 changes: 7 additions & 7 deletions projects/DensePose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ python /path/to/detectron2/projects/DensePose/train_net.py --config-file <config
For example, to launch end-to-end DensePose-RCNN training with ResNet-50 FPN backbone on a single GPU,
one should execute:
```bash
python /path/to/detectron2/projects/DensePose/train_net.py --config-file /path/to/detectron2/projects/DensePose/configs/densepose_R_50_FPN_s1x.yaml
python /path/to/detectron2/projects/DensePose/train_net.py --config-file configs/densepose_R_50_FPN_s1x.yaml
```

## Testing
## Evaluation

Model testing can be done in the same way as training, except for an additional flag `--eval-only` and
model location specification through `MODEL.WEIGHT model.pth` in the command line
Model evaluation can be done in the same way as training, except for an additional flag `--eval-only` and
model location specification through `MODEL.WEIGHTS model.pth` in the command line
```bash
python /path/to/detectron2/projects/DensePose/train_net.py --config-file /path/to/detectron2/projects/DensePose/configs/densepose_R_50_FPN_s1x.yaml --eval-only MODEL.WEIGHT model.pth
python /path/to/detectron2/projects/DensePose/train_net.py --config-file configs/densepose_R_50_FPN_s1x.yaml --eval-only MODEL.WEIGHTS model.pth
```

## Tools
Expand All @@ -44,10 +44,10 @@ We provide tools which allow one to:
- visualize DensePose model results;

`query_db` is a tool to print or visualize DensePose data in a dataset.
Details on this tool can be found in [`TOOL_QUERY_DB.md`](doc/TOOL_QUERY_DB.md)
Details on this tool can be found in [`TOOL_QUERY_DB.md`](doc/TOOL_QUERY_DB.md)

`apply_net` is a tool to print or visualize DensePose results.
Details on this tool can be found in [`TOOL_APPLY_NET.md`](doc/TOOL_APPLY_NET.md)
Details on this tool can be found in [`TOOL_APPLY_NET.md`](doc/TOOL_APPLY_NET.md)

## <a name="CitingDensePose"></a>Citing DensePose

Expand Down
12 changes: 6 additions & 6 deletions projects/DensePose/doc/TOOL_APPLY_NET.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ python apply_net.py dump [-h] [-v] [--output <dump_file>] <config> <model> <inpu

There are three mandatory arguments:
- `<config>`, configuration file for a given model;
- `<model>`, model file with trained parameters
- `<model>`, model file with trained parameters
- `<input>`, input image file name, pattern or folder

One can additionally provide `--output` argument to define the output file name,
Expand Down Expand Up @@ -45,7 +45,7 @@ python apply_net.py show [-h] [-v] [--min_score <score>] [--nms_thresh <threshol

There are four mandatory arguments:
- `<config>`, configuration file for a given model;
- `<model>`, model file with trained parameters
- `<model>`, model file with trained parameters
- `<input>`, input image file name, pattern or folder
- `<visualizations>`, visualizations specifier; currently available visualizations are:
* `bbox` - bounding boxes of detected persons;
Expand All @@ -72,22 +72,22 @@ with ResNet-50 FPN backbone using different visualizations for image `image.jpg`
```bash
python apply_net.py show configs/densepose_R_50_FPN_s1x.yaml DensePose_ResNet50_FPN_s1x-e2e.pkl image.jpg bbox,dp_segm -v
```
![Bounding Box + Segmentation Visualization](images/res_bbox_dp_segm.png)
![Bounding Box + Segmentation Visualization](images/res_bbox_dp_segm.jpg)

2. Show bounding box and estimated U coordinates for body parts:
```bash
python apply_net.py show configs/densepose_R_50_FPN_s1x.yaml DensePose_ResNet50_FPN_s1x-e2e.pkl image.jpg bbox,dp_u -v
```
![Bounding Box + U Coordinate Visualization](images/res_bbox_dp_u.png)
![Bounding Box + U Coordinate Visualization](images/res_bbox_dp_u.jpg)

3. Show bounding box and estimated V coordinates for body parts:
```bash
python apply_net.py show configs/densepose_R_50_FPN_s1x.yaml DensePose_ResNet50_FPN_s1x-e2e.pkl image.jpg bbox,dp_v -v
```
![Bounding Box + V Coordinate Visualization](images/res_bbox_dp_v.png)
![Bounding Box + V Coordinate Visualization](images/res_bbox_dp_v.jpg)

4. Show bounding box and estimated U and V coordinates via contour plots:
```bash
python apply_net.py show configs/densepose_R_50_FPN_s1x.yaml DensePose_ResNet50_FPN_s1x-e2e.pkl image.jpg dp_contour,bbox -v
```
![Bounding Box + Contour Visualization](images/res_bbox_dp_contour.png)
![Bounding Box + Contour Visualization](images/res_bbox_dp_contour.jpg)
9 changes: 4 additions & 5 deletions projects/TridentNet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,14 @@ python /path/to/detectron2/projects/TridentNet/train_net.py --config-file <confi
For example, to launch end-to-end TridentNet training with ResNet-50 backbone on 8 GPUs,
one should execute:
```bash
python /path/to/detectron2/projects/TridentNet/train_net.py --config-file /path/to/detectron2/projects/TridentNet/configs/tridentnet_fast_R_50_C4_1x.yaml --num_gpus 8
python /path/to/detectron2/projects/TridentNet/train_net.py --config-file configs/tridentnet_fast_R_50_C4_1x.yaml --num_gpus 8
```

## Testing
## Evaluation

Model testing can be done in the same way as training, except for an additional flag `--eval-only` and
model location specification through `MODEL.WEIGHT model.pth` in the command line
Model evaluationcan be done similarly:
```bash
python /path/to/detectron2/projects/TridentNet/train_net.py --config-file /path/to/detectron2/projects/TridentNet/configs/tridentnet_fast_R_50_C4_1x.yaml --eval-only MODEL.WEIGHT model.pth
python /path/to/detectron2/projects/TridentNet/train_net.py --config-file configs/tridentnet_fast_R_50_C4_1x.yaml --eval-only MODEL.WEIGHTS model.pth
```

## Results on MS-COCO in Detectron2
Expand Down

0 comments on commit 300df23

Please sign in to comment.