Unverified Commit 6f1a268e authored by ChaimZhu's avatar ChaimZhu Committed by GitHub
Browse files

[Enhancement] Upgrade isort in pre-commit hook (#1217)

* update isort

* update setuptools

* fix

* pre-commit run --all-files
parent 53488dad
...@@ -18,12 +18,13 @@ into it. ...@@ -18,12 +18,13 @@ into it.
import argparse import argparse
import glob import glob
import json import json
import mmcv
import shutil import shutil
import subprocess import subprocess
import torch
from os import path as osp from os import path as osp
import mmcv
import torch
# build schedule look-up table to automatically find the final model # build schedule look-up table to automatically find the final model
SCHEDULES_LUT = { SCHEDULES_LUT = {
'_1x_': 12, '_1x_': 12,
......
...@@ -3,12 +3,8 @@ repos: ...@@ -3,12 +3,8 @@ repos:
rev: 3.8.3 rev: 3.8.3
hooks: hooks:
- id: flake8 - id: flake8
- repo: https://github.com/asottile/seed-isort-config - repo: https://github.com/PyCQA/isort
rev: v2.2.0 rev: 5.10.1
hooks:
- id: seed-isort-config
- repo: https://github.com/timothycrosley/isort
rev: 5.0.2
hooks: hooks:
- id: isort - id: isort
- repo: https://github.com/pre-commit/mirrors-yapf - repo: https://github.com/pre-commit/mirrors-yapf
......
...@@ -27,7 +27,7 @@ Models: ...@@ -27,7 +27,7 @@ Models:
Metrics: Metrics:
mAP: 18.33 mAP: 18.33
Weights: https://download.openmmlab.com/mmdetection3d/v1.0.0_models/pgd/pgd_r101_caffe_fpn_gn-head_3x4_4x_kitti-mono3d/pgd_r101_caffe_fpn_gn-head_3x4_4x_kitti-mono3d_20211022_102608-8a97533b.pth Weights: https://download.openmmlab.com/mmdetection3d/v1.0.0_models/pgd/pgd_r101_caffe_fpn_gn-head_3x4_4x_kitti-mono3d/pgd_r101_caffe_fpn_gn-head_3x4_4x_kitti-mono3d_20211022_102608-8a97533b.pth
- Name: pgd_r101_caffe_fpn_gn-head_2x16_1x_nus-mono3d - Name: pgd_r101_caffe_fpn_gn-head_2x16_1x_nus-mono3d
In Collection: PGD In Collection: PGD
Config: configs/pgd/pgd_r101_caffe_fpn_gn-head_2x16_1x_nus-mono3d.py Config: configs/pgd/pgd_r101_caffe_fpn_gn-head_2x16_1x_nus-mono3d.py
......
import argparse import argparse
from os import path as osp
import mmcv import mmcv
from indoor3d_util import export from indoor3d_util import export
from os import path as osp
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument( parser.add_argument(
......
import glob import glob
import numpy as np
from os import path as osp from os import path as osp
import numpy as np
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# CONSTANTS # CONSTANTS
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
......
...@@ -11,11 +11,12 @@ Usage example: python ./batch_load_scannet_data.py ...@@ -11,11 +11,12 @@ Usage example: python ./batch_load_scannet_data.py
""" """
import argparse import argparse
import datetime import datetime
import numpy as np
import os import os
from load_scannet_data import export
from os import path as osp from os import path as osp
import numpy as np
from load_scannet_data import export
DONOTCARE_CLASS_IDS = np.array([]) DONOTCARE_CLASS_IDS = np.array([])
OBJ_CLASS_IDS = np.array( OBJ_CLASS_IDS = np.array(
[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 24, 28, 33, 34, 36, 39]) [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 24, 28, 33, 34, 36, 39])
......
# Modified from https://github.com/ScanNet/ScanNet/blob/master/SensReader/python/SensorData.py # noqa # Modified from https://github.com/ScanNet/ScanNet/blob/master/SensReader/python/SensorData.py # noqa
import imageio
import mmcv
import numpy as np
import os import os
import struct import struct
import zlib import zlib
from argparse import ArgumentParser from argparse import ArgumentParser
from functools import partial from functools import partial
import imageio
import mmcv
import numpy as np
COMPRESSION_TYPE_COLOR = {-1: 'unknown', 0: 'raw', 1: 'png', 2: 'jpeg'} COMPRESSION_TYPE_COLOR = {-1: 'unknown', 0: 'raw', 1: 'png', 2: 'jpeg'}
COMPRESSION_TYPE_DEPTH = { COMPRESSION_TYPE_DEPTH = {
......
...@@ -9,8 +9,9 @@ instance segmentations.""" ...@@ -9,8 +9,9 @@ instance segmentations."""
import argparse import argparse
import inspect import inspect
import json import json
import numpy as np
import os import os
import numpy as np
import scannet_utils import scannet_utils
currentdir = os.path.dirname( currentdir = os.path.dirname(
......
...@@ -8,8 +8,9 @@ ...@@ -8,8 +8,9 @@
""" """
import csv import csv
import numpy as np
import os import os
import numpy as np
from plyfile import PlyData from plyfile import PlyData
......
...@@ -11,9 +11,10 @@ ...@@ -11,9 +11,10 @@
# documentation root, use os.path.abspath to make it absolute, like shown here. # documentation root, use os.path.abspath to make it absolute, like shown here.
# #
import os import os
import pytorch_sphinx_theme
import subprocess import subprocess
import sys import sys
import pytorch_sphinx_theme
from m2r import MdInclude from m2r import MdInclude
from recommonmark.transform import AutoStructify from recommonmark.transform import AutoStructify
from sphinx.builders.html import StandaloneHTMLBuilder from sphinx.builders.html import StandaloneHTMLBuilder
......
#!/usr/bin/env python #!/usr/bin/env python
import functools as func import functools as func
import glob import glob
import numpy as np
import re import re
from os import path as osp from os import path as osp
import numpy as np
url_prefix = 'https://github.com/open-mmlab/mmdetection3d/blob/master/' url_prefix = 'https://github.com/open-mmlab/mmdetection3d/blob/master/'
files = sorted(glob.glob('../configs/*/README.md')) files = sorted(glob.glob('../configs/*/README.md'))
......
...@@ -11,9 +11,10 @@ ...@@ -11,9 +11,10 @@
# documentation root, use os.path.abspath to make it absolute, like shown here. # documentation root, use os.path.abspath to make it absolute, like shown here.
# #
import os import os
import pytorch_sphinx_theme
import subprocess import subprocess
import sys import sys
import pytorch_sphinx_theme
from m2r import MdInclude from m2r import MdInclude
from recommonmark.transform import AutoStructify from recommonmark.transform import AutoStructify
from sphinx.builders.html import StandaloneHTMLBuilder from sphinx.builders.html import StandaloneHTMLBuilder
......
#!/usr/bin/env python #!/usr/bin/env python
import functools as func import functools as func
import glob import glob
import numpy as np
import re import re
from os import path as osp from os import path as osp
import numpy as np
url_prefix = 'https://github.com/open-mmlab/mmdetection3d/blob/master/' url_prefix = 'https://github.com/open-mmlab/mmdetection3d/blob/master/'
files = sorted(glob.glob('../configs/*/README.md')) files = sorted(glob.glob('../configs/*/README.md'))
......
# Copyright (c) OpenMMLab. All rights reserved. # Copyright (c) OpenMMLab. All rights reserved.
import re
from copy import deepcopy
from os import path as osp
import mmcv import mmcv
import numpy as np import numpy as np
import re
import torch import torch
from copy import deepcopy
from mmcv.parallel import collate, scatter from mmcv.parallel import collate, scatter
from mmcv.runner import load_checkpoint from mmcv.runner import load_checkpoint
from os import path as osp
from mmdet3d.core import (Box3DMode, CameraInstance3DBoxes, Coord3DMode, from mmdet3d.core import (Box3DMode, CameraInstance3DBoxes, Coord3DMode,
DepthInstance3DBoxes, LiDARInstance3DBoxes, DepthInstance3DBoxes, LiDARInstance3DBoxes,
......
# Copyright (c) OpenMMLab. All rights reserved. # Copyright (c) OpenMMLab. All rights reserved.
from os import path as osp
import mmcv import mmcv
import torch import torch
from mmcv.image import tensor2imgs from mmcv.image import tensor2imgs
from os import path as osp
from mmdet3d.models import (Base3DDetector, Base3DSegmentor, from mmdet3d.models import (Base3DDetector, Base3DSegmentor,
SingleStageMono3DDetector) SingleStageMono3DDetector)
......
# Copyright (c) OpenMMLab. All rights reserved. # Copyright (c) OpenMMLab. All rights reserved.
import numpy as np
import torch
import warnings import warnings
from abc import abstractmethod from abc import abstractmethod
import numpy as np
import torch
from mmdet3d.ops import points_in_boxes_all, points_in_boxes_part from mmdet3d.ops import points_in_boxes_all, points_in_boxes_part
from mmdet3d.ops.iou3d import iou3d_cuda from mmdet3d.ops.iou3d import iou3d_cuda
from .utils import limit_period, xywhr2xyxyr from .utils import limit_period, xywhr2xyxyr
......
# Copyright (c) OpenMMLab. All rights reserved. # Copyright (c) OpenMMLab. All rights reserved.
from enum import IntEnum, unique
import numpy as np import numpy as np
import torch import torch
from enum import IntEnum, unique
from .base_box3d import BaseInstance3DBoxes from .base_box3d import BaseInstance3DBoxes
from .cam_box3d import CameraInstance3DBoxes from .cam_box3d import CameraInstance3DBoxes
......
# Copyright (c) OpenMMLab. All rights reserved. # Copyright (c) OpenMMLab. All rights reserved.
from enum import IntEnum, unique
import numpy as np import numpy as np
import torch import torch
from enum import IntEnum, unique
from ...points import BasePoints, CameraPoints, DepthPoints, LiDARPoints from ...points import BasePoints, CameraPoints, DepthPoints, LiDARPoints
from .base_box3d import BaseInstance3DBoxes from .base_box3d import BaseInstance3DBoxes
......
# Copyright (c) OpenMMLab. All rights reserved. # Copyright (c) OpenMMLab. All rights reserved.
from logging import warning
import numpy as np import numpy as np
import torch import torch
from logging import warning
from mmdet3d.core.utils import array_converter from mmdet3d.core.utils import array_converter
......
# Copyright (c) OpenMMLab. All rights reserved. # Copyright (c) OpenMMLab. All rights reserved.
import gc import gc
import io as sysio import io as sysio
import numba import numba
import numpy as np import numpy as np
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment