zoukankan      html  css  js  c++  java
  • detectron2 中的coco数据集默认位置更改

    detectron2 中的coco数据集默认位置更改

    其默认的dataset的位置是 .../detectron2/data/datasets/...

    更改方式

    打开上述路径下的buildin.py文件

    # -*- coding: utf-8 -*-
    # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
    
    """
    This file registers pre-defined datasets at hard-coded paths, and their metadata.
    
    We hard-code metadata for common datasets. This will enable:
    1. Consistency check when loading the datasets
    2. Use models on these standard datasets directly and run demos,
       without having to download the dataset annotations
    
    We hard-code some paths to the dataset that's assumed to
    exist in "./datasets/". #其默认位置为"./datasets/"
    
    Users SHOULD NOT use this file to create new dataset / metadata for new dataset.
    To add new dataset, refer to the tutorial "docs/DATASETS.md".
    """
    

    更改最下面的函数:

    # Register them all under "./datasets"
    _root = os.getenv("DETECTRON2_DATASETS", "/media/code/T1/") #更改DATASETS的值
    register_all_coco(_root)
    register_all_lvis(_root)
    register_all_cityscapes(_root)
    register_all_pascal_voc(_root)
    
  • 相关阅读:
    maven只编译某个module
    idea中java文件不显示成class标识符
    服务系统要点
    shell命令
    shell中的exit
    性能统计方法
    聚类
    java 外部类可以访问嵌套类的私有成员
    SqlServer动态生成临时表
    优化JavaScript脚本的性能(转载)
  • 原文地址:https://www.cnblogs.com/jiashun/p/12674998.html
Copyright © 2011-2022 走看看