Commit 5a372d05 authored by Kai Chen's avatar Kai Chen
Browse files

bug fix and update examples

parent 6e8d925e
......@@ -8,7 +8,7 @@ before_install:
- sudo apt-get install -y ffmpeg
install:
- pip install opencv-python pyyaml codecov
- pip install opencv-python pyyaml codecov flake8
cache:
pip: true
......@@ -23,6 +23,8 @@ python:
- "3.5"
- "3.6"
before_script: flake8
script: coverage run --source=mmcv setup.py test
after_success: codecov
\ No newline at end of file
# copied from https://github.com/kuangliu/pytorch-cifar/blob/master/models/resnet.py
# copied from
# https://github.com/kuangliu/pytorch-cifar/blob/master/models/resnet.py
import torch.nn as nn
import torch.nn.functional as F
......
......@@ -8,7 +8,7 @@ import torch.distributed as dist
import torch.multiprocessing as mp
import torch.nn.functional as F
from mmcv import Config
from mmcv.torchpack import Runner, DistSamplerSeedHook
from mmcv.runner import Runner, DistSamplerSeedHook
from torch.nn.parallel import DataParallel, DistributedDataParallel
from torch.utils.data import DataLoader
from torch.utils.data.distributed import DistributedSampler
......
import functools
from .handlers import BaseFileHandler, JsonHandler, PickleHandler, YamlHandler
from ..utils import is_str, is_list_of
......
......@@ -8,8 +8,8 @@ import torch
from . import hooks
from .log_buffer import LogBuffer
from .hooks import (Hook, LrUpdaterHook, CheckpointHook, IterTimerHook,
OptimizerHook)
from .io import load_checkpoint, save_checkpoint
OptimizerHook, lr_updater)
from .checkpoint import load_checkpoint, save_checkpoint
from .utils import get_dist_info, get_host_info, get_time_str, obj_from_dict
......@@ -331,7 +331,7 @@ class Runner(object):
self.register_hook(lr_config)
elif isinstance(lr_config, dict):
assert 'policy' in lr_config
from ..hooks import lr_updater
# from .hooks import lr_updater
hook_name = lr_config['policy'].title() + 'LrUpdaterHook'
if not hasattr(lr_updater, hook_name):
raise ValueError('"{}" does not exist'.format(hook_name))
......
import functools
import logging
import sys
import time
from getpass import getuser
......
......@@ -83,7 +83,8 @@ def imshow_det_bboxes(img,
Args:
img (str or ndarray): The image to be displayed.
bboxes (ndarray): Bounding boxes (with scores), shaped (n, 4) or (n, 5).
bboxes (ndarray): Bounding boxes (with scores), shaped (n, 4) or
(n, 5).
labels (ndarray): Labels of bboxes.
class_names (list[str]): Names of each classes.
score_thr (float): Minimum score of bboxes to be shown.
......
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