未验证 提交 19e1e652 编写于 作者: C cnn 提交者: GitHub

fix bug of import and update doc (#2642)

上级 6ad5973d
...@@ -5,16 +5,16 @@ TrainDataset: ...@@ -5,16 +5,16 @@ TrainDataset:
!COCODataSet !COCODataSet
image_dir: trainval_split/images image_dir: trainval_split/images
anno_path: trainval_split/s2anet_trainval_paddle_coco.json anno_path: trainval_split/s2anet_trainval_paddle_coco.json
dataset_dir: /paddle/dataset/DOTA_1024_s2anet dataset_dir: dataset/DOTA_1024_s2anet
data_fields: ['image', 'gt_bbox', 'gt_class', 'is_crowd', 'gt_rbox'] data_fields: ['image', 'gt_bbox', 'gt_class', 'is_crowd', 'gt_rbox']
EvalDataset: EvalDataset:
!COCODataSet !COCODataSet
image_dir: trainval_split/images image_dir: trainval_split/images
anno_path: trainval_split/s2anet_trainval_paddle_coco.json anno_path: trainval_split/s2anet_trainval_paddle_coco.json
dataset_dir: /paddle/dataset/DOTA_1024_s2anet/ dataset_dir: dataset/DOTA_1024_s2anet/
TestDataset: TestDataset:
!ImageFolder !ImageFolder
anno_path: trainval_split/s2anet_trainval_paddle_coco.json anno_path: trainval_split/s2anet_trainval_paddle_coco.json
dataset_dir: /paddle/dataset/DOTA_1024_s2anet/ dataset_dir: dataset/DOTA_1024_s2anet/
...@@ -54,11 +54,6 @@ DOTA数据集中总共有2806张图像,其中1411张图像作为训练集,45 ...@@ -54,11 +54,6 @@ DOTA数据集中总共有2806张图像,其中1411张图像作为训练集,45
sudo nvidia-docker run -it --name paddle_s2anet -v $PWD:/paddle --network=host registry.baidubce.com/paddlepaddle/paddle:2.0.1-gpu-cuda10.1-cudnn7 /bin/bash sudo nvidia-docker run -it --name paddle_s2anet -v $PWD:/paddle --network=host registry.baidubce.com/paddlepaddle/paddle:2.0.1-gpu-cuda10.1-cudnn7 /bin/bash
``` ```
进入容器后,安装必要的python包:
```
python3.7 -m pip install Cython wheel tqdm opencv-python==4.2.0.32 scipy PyYAML shapely pycocotools
```
镜像中paddle2.0.1已安装好,进入python3.7,执行如下代码检查paddle安装是否正常: 镜像中paddle2.0.1已安装好,进入python3.7,执行如下代码检查paddle安装是否正常:
``` ```
import paddle import paddle
...@@ -66,7 +61,7 @@ print(paddle.__version__) ...@@ -66,7 +61,7 @@ print(paddle.__version__)
paddle.utils.run_check() paddle.utils.run_check()
``` ```
进入到`ext_op`文件夹,安装: 进入到`ppdet/ext_op`文件夹,安装:
``` ```
python3.7 setup.py install python3.7 setup.py install
``` ```
...@@ -96,7 +91,7 @@ Paddle中`multiclass_nms`算子的输入支持四边形输入,因此部署时 ...@@ -96,7 +91,7 @@ Paddle中`multiclass_nms`算子的输入支持四边形输入,因此部署时
```bash ```bash
# 预测 # 预测
CUDA_VISIBLE_DEVICES=0 python tools/infer.py -c configs/dota/s2anet_1x_dota.yml -o weights=model.pdparams --infer_img=demo/P0072__1.0__0___0.png --use_gpu=True CUDA_VISIBLE_DEVICES=0 python tools/infer.py -c configs/dota/s2anet_1x_dota.yml -o weights=model.pdparams --infer_img=demo/P0072__1.0__0___0.png
``` ```
......
...@@ -27,6 +27,7 @@ from .operators import register_op, BaseOperator, Resize ...@@ -27,6 +27,7 @@ from .operators import register_op, BaseOperator, Resize
from .op_helper import jaccard_overlap, gaussian2D from .op_helper import jaccard_overlap, gaussian2D
from scipy import ndimage from scipy import ndimage
from ppdet.modeling import bbox_utils
from ppdet.utils.logger import setup_logger from ppdet.utils.logger import setup_logger
logger = setup_logger(__name__) logger = setup_logger(__name__)
......
...@@ -39,6 +39,7 @@ from PIL import Image, ImageEnhance, ImageDraw ...@@ -39,6 +39,7 @@ from PIL import Image, ImageEnhance, ImageDraw
from ppdet.core.workspace import serializable from ppdet.core.workspace import serializable
from ppdet.modeling.layers import AnchorGrid from ppdet.modeling.layers import AnchorGrid
from ppdet.modeling import bbox_utils
from .op_helper import (satisfy_sample_constraint, filter_and_process, from .op_helper import (satisfy_sample_constraint, filter_and_process,
generate_sample_bbox, clip_bbox, data_anchor_sampling, generate_sample_bbox, clip_bbox, data_anchor_sampling,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册