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

config文件被自动重写格式 #11132

Open
DoctorDream opened this issue Nov 6, 2023 · 3 comments
Open

config文件被自动重写格式 #11132

DoctorDream opened this issue Nov 6, 2023 · 3 comments
Assignees

Comments

@DoctorDream
Copy link

因为有修改config文件做试验的需求,按照mmdet 2.x的习惯对config文件各个参数前后顺序进行了一定的调换,但是在经过test.py后,config文件的格式被重置了,请问是否有方式避免,因为这样实在太影响config配置文件的可阅读性了

@hhaAndroid
Copy link
Collaborator

格式被重置是指的啥样的?

@DoctorDream
Copy link
Author

DoctorDream commented Nov 7, 2023

例如我的配置文件前10行本来为:
auto_scale_lr = dict(base_batch_size=16)
backend_args = None
batch_augments = [
dict(pad_mask=True, size=(
1024,
1024,
), type='BatchFixedSizePad'),
]
custom_imports = dict(
allow_failed_imports=False, imports=[
'projects.CO-DETR.codetr',
])
......

我想将data_root等需要修改的参数放在配置文件的开头,因此修改为
data_root = '/xxx/xxx/'
dataset_type = 'CocoDataset'
load_from = '/xxx/xxx/'
pretrained = '/xxx/xxx/'
auto_scale_lr = dict(base_batch_size=16)
backend_args = None
...
但是经过test.py运行后,这个配置文件被重置为了一开始的格式,即前10行为:
auto_scale_lr = dict(base_batch_size=16)
backend_args = None
batch_augments = [
dict(pad_mask=True, size=(
1024,
1024,
), type='BatchFixedSizePad'),
]
custom_imports = dict(
allow_failed_imports=False, imports=[
'projects.CO-DETR.codetr',
])
......

于此同时,里面的括号也会被过度的分行,例如我希望的效果是:
image_size = [(600, 600), (800, 1333)]
但是经过test.py后变成了
image_size =[ (
600,
600,
),
(
800,
1333,
),
]
我真的很不适应这种配置文件,不知道是不是因为我的设置有不正确,因为我之前使用mmdet2.28的时候没有遇到过这种问题。
如果能帮忙解答的话,万分感谢!
PS. 同时想问一下使用mmdet2.28的时候使用test.py时进度条显示为
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 7800/7800, 22.5 task/s, elapsed: 347s, ETA: 0s
我很喜欢这种形式,请问有什么参数可以在mmdet 3.x中调出这种进度显示方式吗

@DoctorDream
Copy link
Author

格式被重置是指的啥样的?

例如我的配置文件前10行本来为:
auto_scale_lr = dict(base_batch_size=16)
backend_args = None
batch_augments = [
dict(pad_mask=True, size=(
1024,
1024,
), type='BatchFixedSizePad'),
]
custom_imports = dict(
allow_failed_imports=False, imports=[
'projects.CO-DETR.codetr',
])
......

我想将data_root等需要修改的参数放在配置文件的开头,因此修改为
data_root = '/xxx/xxx/'
dataset_type = 'CocoDataset'
load_from = '/xxx/xxx/'
pretrained = '/xxx/xxx/'
auto_scale_lr = dict(base_batch_size=16)
backend_args = None
...
但是经过test.py运行后,这个配置文件被重置为了一开始的格式,即前10行为:
auto_scale_lr = dict(base_batch_size=16)
backend_args = None
batch_augments = [
dict(pad_mask=True, size=(
1024,
1024,
), type='BatchFixedSizePad'),
]
custom_imports = dict(
allow_failed_imports=False, imports=[
'projects.CO-DETR.codetr',
])
......

于此同时,里面的括号也会被过度的分行,例如我希望的效果是:
image_size = [(600, 600), (800, 1333)]
但是经过test.py后变成了
image_size =[ (
600,
600,
),
(
800,
1333,
),
]
我真的很不适应这种配置文件,不知道是不是因为我的设置有不正确,因为我之前使用mmdet2.28的时候没有遇到过这种问题。
如果能帮忙解答的话,万分感谢!
PS. 同时想问一下使用mmdet2.28的时候使用test.py时进度条显示为
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 7800/7800, 22.5 task/s, elapsed: 347s, ETA: 0s
我很喜欢这种形式,请问有什么参数可以在mmdet 3.x中调出这种进度显示方式吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants