install
\
python -m pip install detectron2{d2_version} -f \\
- https://dl.fbaipublicfiles.com/detectron2/wheels/{cuda}/torch{torch}/index.html
-
"""
+ %swheels/{cuda}/torch{torch}/index.html
+ """ % prefix_url
CUDA_SUFFIX = {"10.2": "cu102", "10.1": "cu101", "10.0": "cu100", "9.2": "cu92", "cpu": "cpu"}
diff --git a/PyTorch/built-in/cv/detection/Faster_Mask_RCNN_for_PyTorch/docs/conf.py b/PyTorch/built-in/cv/detection/Faster_Mask_RCNN_for_PyTorch/docs/conf.py
index 6b2d445bb19d5bc61b7641f3ac648dc788a4f624..46107df2778f6bef5236c4259fac3acf44ca56a7 100755
--- a/PyTorch/built-in/cv/detection/Faster_Mask_RCNN_for_PyTorch/docs/conf.py
+++ b/PyTorch/built-in/cv/detection/Faster_Mask_RCNN_for_PyTorch/docs/conf.py
@@ -39,6 +39,7 @@ from typing import Dict, List, Tuple
#
import sphinx_rtd_theme
+CURRENT_PATH = os.path.abspath(os.path.dirname(__file__))
class GithubURLDomain(Domain):
"""
@@ -46,7 +47,10 @@ class GithubURLDomain(Domain):
"""
name = "githuburl"
- ROOT = "https://github.com/facebookresearch/detectron2/blob/master/"
+ with open(os.path.join(CURRENT_PATH, '../url.ini'), 'r') as _f:
+ _content = _f.read()
+ master_prefix_url = _content.split('master_prefix_url=')[1].split('\n')[0]
+ ROOT = master_prefix_url
LINKED_DOC = ["tutorials/install", "tutorials/getting_started"]
def resolve_any_xref(self, env, fromdocname, builder, target, node, contnode):
@@ -150,10 +154,16 @@ if DEPLOY:
else:
# skip this when building locally
intersphinx_timeout = 0.1
+
+with open(os.path.join(CURRENT_PATH, '../url.ini'), 'r') as _f:
+ _content = _f.read()
+ python_url = _content.split('python_url=')[1].split('\n')[0]
+ numpy_url = _content.split('numpy_url=')[1].split('\n')[0]
+ torch_url = _content.split('torch_url=')[1].split('\n')[0]
intersphinx_mapping = {
- "python": ("https://docs.python.org/3.6", None),
- "numpy": ("https://docs.scipy.org/doc/numpy/", None),
- "torch": ("https://pytorch.org/docs/master/", None),
+ "python": (python_url, None),
+ "numpy": (numpy_url, None),
+ "torch": (torch_url, None),
}
# -------------------------
@@ -338,7 +348,10 @@ def paper_ref_role(
else:
paper_url, paper_title = _PAPER_DATA[link]
if "/" not in paper_url:
- paper_url = "https://arxiv.org/abs/" + paper_url
+ with open(os.path.join(CURRENT_PATH, '../url.ini'), 'r') as _f:
+ _content = _f.read()
+ arxiv_abs_url = _content.split('arxiv_abs_url=')[1].split('\n')[0]
+ paper_url = arxiv_abs_url + paper_url
if not has_explicit_title:
title = paper_title
pnode = nodes.reference(title, title, internal=False, refuri=paper_url)
diff --git a/PyTorch/built-in/cv/detection/Faster_Mask_RCNN_for_PyTorch/public_address_statement.md b/PyTorch/built-in/cv/detection/Faster_Mask_RCNN_for_PyTorch/public_address_statement.md
new file mode 100644
index 0000000000000000000000000000000000000000..f7ba5b03bd747754b5da67b1b1a97094f157277f
--- /dev/null
+++ b/PyTorch/built-in/cv/detection/Faster_Mask_RCNN_for_PyTorch/public_address_statement.md
@@ -0,0 +1,24 @@
+| 类型 | 开源代码地址 | 文件名 | 公网IP地址/公网URL地址/域名/邮箱地址 | 用途说明 |
+|--------|------------------------------|---------------------------------------------------------------------------------------|----------------------------------------------------------|---------|
+| 开源代码引入 | https://github.com/facebookresearch/detectron2.git | Faster_Mask_RCNN_for_PyTorch/datasets/prepare_for_tests.sh | https://dl.fbaipublicfiles.com/detectron2 | 下载依赖 |
+| 开源代码引入 | https://github.com/facebookresearch/detectron2.git | Faster_Mask_RCNN_for_PyTorch/datasets/prepare_panoptic_fpn.py | https://dl.fbaipublicfiles.com/detectron2/ | 下载依赖 |
+| 开源代码引入 | https://github.com/facebookresearch/detectron2.git | Faster_Mask_RCNN_for_PyTorch/detectron2/checkpoint/catalog.py | https://dl.fbaipublicfiles.com/detectron | 下载依赖 |
+| 开源代码引入 | https://github.com/facebookresearch/detectron2.git | Faster_Mask_RCNN_for_PyTorch/detectron2/checkpoint/catalog.py | https://download.openmmlab.com/mmocr/data/font.TTF | 下载依赖 |
+| 开源代码引入 | https://github.com/facebookresearch/detectron2.git | Faster_Mask_RCNN_for_PyTorch/detectron2/model_zoo/model_zoo.py | https://dl.fbaipublicfiles.com/detectron2/ | 下载依赖 |
+| 开源代码引入 | https://github.com/facebookresearch/detectron2.git | Faster_Mask_RCNN_for_PyTorch/dev/packaging/build_wheel.sh | https://download.pytorch.org/whl/ | 下载依赖 |
+| 开源代码引入 | https://github.com/facebookresearch/detectron2.git | Faster_Mask_RCNN_for_PyTorch/dev/packaging/gen_install_table.py | https://dl.fbaipublicfiles.com/detectron2/ | 下载依赖 |
+| 开源代码引入 | https://github.com/facebookresearch/detectron2.git | Faster_Mask_RCNN_for_PyTorch/docker/Dockerfile | https://bootstrap.pypa.io/get-pip.py | 下载依赖 |
+| 开源代码引入 | https://github.com/facebookresearch/detectron2.git | Faster_Mask_RCNN_for_PyTorch/docker/Dockerfile | https://download.pytorch.org/whl/cu101/torch_stable.html | 下载依赖 |
+| 开源代码引入 | https://github.com/facebookresearch/detectron2.git | Faster_Mask_RCNN_for_PyTorch/docker/Dockerfile | https://github.com/facebookresearch/fvcore | 下载依赖 |
+| 开源代码引入 | https://github.com/facebookresearch/detectron2.git | Faster_Mask_RCNN_for_PyTorch/docker/Dockerfile | https://github.com/facebookresearch/detectron2 | 下载依赖 |
+| 开源代码引入 | https://github.com/facebookresearch/detectron2.git | Faster_Mask_RCNN_for_PyTorch/docker/Dockerfile-circleci | https://bootstrap.pypa.io/get-pip.py | 下载依赖 |
+| 开源代码引入 | https://github.com/facebookresearch/detectron2.git | Faster_Mask_RCNN_for_PyTorch/docker/Dockerfile-circleci | https://download.pytorch.org/whl/cu101/torch_stable.html | 下载依赖 |
+| 开源代码引入 | https://github.com/facebookresearch/detectron2.git | Faster_Mask_RCNN_for_PyTorch/docs/conf.py | https://github.com/facebookresearch/detectron2/blob/master/ | 下载依赖 |
+| 开源代码引入 | https://github.com/facebookresearch/detectron2.git | Faster_Mask_RCNN_for_PyTorch/docs/conf.py | https://docs.python.org/3.6 | 下载依赖 |
+| 开源代码引入 | https://github.com/facebookresearch/detectron2.git | Faster_Mask_RCNN_for_PyTorch/docs/conf.py | https://docs.scipy.org/doc/numpy/ | 下载依赖 |
+| 开源代码引入 | https://github.com/facebookresearch/detectron2.git | Faster_Mask_RCNN_for_PyTorch/docs/conf.py | https://pytorch.org/docs/master/ | 下载依赖 |
+| 开源代码引入 | https://github.com/facebookresearch/detectron2.git | Faster_Mask_RCNN_for_PyTorch/docs/conf.py | https://arxiv.org/abs/ | 下载依赖 |
+| 开源代码引入 | https://github.com/facebookresearch/detectron2.git | Faster_Mask_RCNN_for_PyTorch/setup.py | https://github.com/facebookresearch/detectron2 | 下载依赖 |
+| 开源代码引入 | https://github.com/facebookresearch/detectron2.git | Faster_Mask_RCNN_for_PyTorch/setup.py | https://github.com/psf/black@673327449f86fce558adde153bb6cbe54bfebad2 | 下载依赖 |
+| 开源代码引入 | https://github.com/facebookresearch/detectron2.git | Faster_Mask_RCNN_for_PyTorch/tests/data/test_coco_evaluation.py | http://images.cocodataset.org/val2017/000000000139.jpg | 下载图片 |
+| 开源代码引入 | https://github.com/facebookresearch/detectron2.git | Faster_Mask_RCNN_for_PyTorch/tests/test_model_zoo.py | https://dl.fbaipublicfiles.com/detectron2/Misc/scratch_mask_rcnn_R_50_FPN_3x_gn/138602908/model_final_01ca85.pkl | 下载预训练权重 |
\ No newline at end of file
diff --git a/PyTorch/built-in/cv/detection/Faster_Mask_RCNN_for_PyTorch/setup.py b/PyTorch/built-in/cv/detection/Faster_Mask_RCNN_for_PyTorch/setup.py
index 89a7560322541dc20ed9b5dd3d35e5ef8400d042..2f9756f6b67c701cbace35feeef692c304cdd97b 100755
--- a/PyTorch/built-in/cv/detection/Faster_Mask_RCNN_for_PyTorch/setup.py
+++ b/PyTorch/built-in/cv/detection/Faster_Mask_RCNN_for_PyTorch/setup.py
@@ -176,11 +176,17 @@ def get_model_zoo_configs() -> List[str]:
return config_paths
+CURRENT_PATH = os.path.abspath(os.path.dirname(__file__))
+with open(os.path.join(CURRENT_PATH, './url.ini'), 'r') as _f:
+ _content = _f.read()
+ detectron2_url = _content.split('detectron2_url=')[1].split('\n')[0]
+ black_url = _content.split('black_url=')[1].split('\n')[0]
+
setup(
name="detectron2",
version=get_version(),
author="FAIR",
- url="https://github.com/facebookresearch/detectron2",
+ url=detectron2_url,
description="Detectron2 is FAIR's next-generation research "
"platform for object detection and segmentation.",
packages=find_packages(exclude=("configs", "tests*")),
@@ -206,7 +212,7 @@ setup(
"dev": [
"flake8==3.8.1",
"isort==4.3.21",
- "black @ git+https://github.com/psf/black@673327449f86fce558adde153bb6cbe54bfebad2",
+ "black @ git+%s" % black_url,
"flake8-bugbear",
"flake8-comprehensions",
],
diff --git a/PyTorch/built-in/cv/detection/Faster_Mask_RCNN_for_PyTorch/tests/data/test_coco_evaluation.py b/PyTorch/built-in/cv/detection/Faster_Mask_RCNN_for_PyTorch/tests/data/test_coco_evaluation.py
index 93bf47ba0514e3a16e650816edf16dd11755c97d..f3b331ecfad5db2ae6e3b00261b9cc884c8af448 100755
--- a/PyTorch/built-in/cv/detection/Faster_Mask_RCNN_for_PyTorch/tests/data/test_coco_evaluation.py
+++ b/PyTorch/built-in/cv/detection/Faster_Mask_RCNN_for_PyTorch/tests/data/test_coco_evaluation.py
@@ -31,8 +31,12 @@ class TestCOCOeval(unittest.TestCase):
def test(self):
# A small set of images/categories from COCO val
# fmt: off
+ CURRENT_PATH = os.path.abspath(os.path.dirname(__file__))
+ with open(os.path.join(CURRENT_PATH, '../../url.ini'), 'r') as _f:
+ _content = _f.read()
+ coco_img_url = _content.split('coco_img_url=')[1].split('\n')[0]
detections = [{"image_id": 139, "category_id": 1, "bbox": [417.3332824707031, 159.27003479003906, 47.66064453125, 143.00193786621094], "score": 0.9949821829795837, "segmentation": {"size": [426, 640], "counts": "Tc`52W=3N0N4aNN^E7]:4XE1g:8kDMT;U100000001O1gE[Nk8h1dFiNY9Z1aFkN]9g2J3NdN`FlN`9S1cFRN07]9g1bFoM6;X9c1cFoM=8R9g1bFQN>3U9Y30O01OO1O001N2O1N1O4L4L5UNoE3V:CVF6Q:@YF9l9@ZF