Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhance] Migrate to MMCV DepthwiseSeparableConv #158

Merged
merged 12 commits into from
Sep 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 0 additions & 125 deletions .dev/clean_models.py

This file was deleted.

152 changes: 0 additions & 152 deletions .dev/generate_table.py

This file was deleted.

58 changes: 0 additions & 58 deletions .dev/modelzoo_json2md.py

This file was deleted.

44 changes: 44 additions & 0 deletions .dev/upload_modelzoo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import argparse
import os
import os.path as osp

import oss2

ACCESS_KEY_ID = os.getenv('OSS_ACCESS_KEY_ID', None)
ACCESS_KEY_SECRET = os.getenv('OSS_ACCESS_KEY_SECRET', None)
BUCKET_NAME = 'openmmlab'
ENDPOINT = 'https://oss-accelerate.aliyuncs.com'


def parse_args():
parser = argparse.ArgumentParser(description='Upload models to OSS')
parser.add_argument('model_zoo', type=str, help='model_zoo input')
parser.add_argument(
'--dst-folder',
type=str,
default='mmsegmentation/v0.5',
help='destination folder')
args = parser.parse_args()
return args


def main():
args = parse_args()
model_zoo = args.model_zoo
dst_folder = args.dst_folder
bucket = oss2.Bucket(
oss2.Auth(ACCESS_KEY_ID, ACCESS_KEY_SECRET), ENDPOINT, BUCKET_NAME)

for root, dirs, files in os.walk(model_zoo):
for file in files:
file_path = osp.relpath(osp.join(root, file), model_zoo)
print(f'Uploading {file_path}')

oss2.resumable_upload(bucket, osp.join(dst_folder, file_path),
osp.join(model_zoo, file_path))
bucket.put_object_acl(
osp.join(dst_folder, file_path), oss2.OBJECT_ACL_PUBLIC_READ)


if __name__ == '__main__':
main()
3 changes: 1 addition & 2 deletions mmseg/core/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from .dist_utils import allreduce_grads
from .misc import add_prefix

__all__ = ['add_prefix', 'allreduce_grads']
__all__ = ['add_prefix']
Loading