• simpledet 的配置


    • simpledet 的配置

    • 1. 通过 docker 配置 simpledet

    • 1.1 系统要求

      ubuntu16.04

      python >=3.5

    • 1.2 下载 docker 镜像

      匹配的版本为 ubuntu16.04, cuda9.0, cudnn7, python3。

      https://gitlab.com/nvidia/cuda/blob/ubuntu16.04/9.0/devel/cudnn7/Dockerfile

    • 1.3 运行 docker

      nvidia-docker run -v $HOST-SIMPLEDET-DIR:$CONTAINER-WORKDIR -it nvidia/cuda:9.0-cudnn7-devel-ubuntu16.04 bash

    • 1.4 安装所需环境

    # Install dependency
    sudo apt-get update
    sudo apt-get install -y build-essential git
    sudo apt-get install -y libopenblas-dev
    
    • 1.5 下载 simpledet 和 pycocotools, mxnext 项目

    git clone <https://github.com/TuSimple/simpledet.git>
    cd /path/to/simpledet
    make
    
    # Install a patched cocotools for python3
    git clone <https://github.com/RogerChern/cocoapi>
    cd cocoapi/PythonAPI
    python3 setup.py install
    
    # setup mxnext, a wrapper of mxnet symbolic API
    cd /path/to/simpledet
    git clone <https://github.com/RogerChern/mxnext>
    
    • 1.6 安装mxnet

    # Specify simpledet directory
    export SIMPLEDET_DIR=/path/to/simpledet
    export COCOAPI_DIR=/path/to/cocoapi
    
    git clone https://github.com/apache/incubator-mxnet mxnet
    cd mxnet
    git checkout 1.3.1
    git submodule init
    git submodule update
    echo "USE_OPENCV = 0" >> ./config.mk
    echo "USE_BLAS = openblas" >> ./config.mk
    echo "USE_CUDA = 1" >> ./config.mk
    echo "USE_CUDA_PATH = /usr/local/cuda" >> ./config.mk
    echo "USE_CUDNN = 1" >> ./config.mk
    echo "USE_NCCL = 1" >> ./config.mk
    echo "USE_DIST_KVSTORE = 1" >> ./config.mk
    cp -r $SIMPLEDET_DIR/operator_cxx/* src/operator/
    mkdir -p src/coco_api
    cp -r $COCOAPI_DIR/common src/coco_api/
    make -j
    cd python
    python3 setup.py install
    
    experiments/
        tridentnet_r101v2c4_c5_1x/
            checkpoint-0006.params
            checkpoint-symbol.json
            log.txt
            coco_minival2014_result.json
    
    • 2.2 构建 coco roidb 测试集,将coco数据集按以下目录结构进行存放
    data/
        coco/
            annotations/
                instances_train2014.json
                instances_valminusminival2014.json
                instances_minival2014.json
                image_info_testdev2017.json
            images/
                train2014
                val2014
                test2017
    
    • 2.3 执行转换命令,例如:
    python3 utils/generate_roidb.py --dataset coco --dataset-split train2014
    python3 utils/generate_roidb.py --dataset coco --dataset-split valminusminival2014
    python3 utils/generate_roidb.py --dataset coco --dataset-split minival2014
    python3 utils/generate_roidb.py --dataset coco --dataset-split test-dev2017
    
    • 2.4 测试
    python3 detection_test.py --config config/detection_config.py
    
    • 3. 单张图像的检测

    详见 https://github.com/danpe1327/simpledet/blob/master/detect_image.py

    ——无善无恶心之体, 有善有恶意之动, 知善知恶是良知, 为善去恶是格物
  • 相关阅读:
    java 的 线程池应用和实践
    拦截信息短信息并转发到指定手机
    分享 UC优视 的android程序员面试题
    解释通讯协议中的xml
    设计模式工厂模式
    MongoDB基础教程系列第一篇 进入MongoDB世界
    Docx组件读写Word文档介绍
    [转]Oracle数据库逻辑增量备份之exp/imp
    JSON文件读取
    JAVA综合--如何掌握JDK1.5枚举类型[转]
  • 原文地址:https://www.cnblogs.com/danpe/p/10381660.html
Copyright © 2020-2023  润新知