Update DLA license, fix typos, and improve logs for FAQs
This commit is contained in:
parent
6f14f51cd3
commit
71eea7b815
34
NOTICE
34
NOTICE
|
@ -115,6 +115,40 @@ modification, are permitted provided that the following conditions are met:
|
|||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
==============================================================================
|
||||
DLA licence
|
||||
==============================================================================
|
||||
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2018, Fisher Yu
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
|
|
|
@ -18,10 +18,9 @@ If you want to reproduce the results in the paper for benchmark evaluation and t
|
|||
| |-- person_keypoints_train2017.json
|
||||
| |-- person_keypoints_val2017.json
|
||||
| |-- image_info_test-dev2017.json
|
||||
`-- images
|
||||
|-- train2017
|
||||
|-- val2017
|
||||
|-- test2017
|
||||
|---|-- train2017
|
||||
|---|-- val2017
|
||||
`---|-- test2017
|
||||
~~~
|
||||
|
||||
- [Optional] If you want to train ExtremeNet, generate extreme point annotation from segmentation:
|
||||
|
|
|
@ -64,7 +64,7 @@ After install Anaconda:
|
|||
cd $CenterNet_ROOT/src/lib/models/networks/DCNv2
|
||||
./make.sh
|
||||
~~~
|
||||
6. [Optional] Compile NMS if your want to use multi-scale testing or test ExtremeNet.
|
||||
6. [Optional, only required if you are using extremenet or multi-scale testing] Compile NMS if your want to use multi-scale testing or test ExtremeNet.
|
||||
|
||||
~~~
|
||||
cd $CenterNet_ROOT/src/lib/external
|
||||
|
|
|
@ -8,7 +8,11 @@ from progress.bar import Bar
|
|||
import time
|
||||
import torch
|
||||
|
||||
from external.nms import soft_nms
|
||||
try:
|
||||
from external.nms import soft_nms
|
||||
except:
|
||||
print('NMS not imported! If you need it,'
|
||||
' do \n cd $CenterNet_ROOT/src/lib/external \n make')
|
||||
from models.decode import ctdet_decode
|
||||
from models.utils import flip_tensor
|
||||
from utils.image import get_affine_transform
|
||||
|
|
|
@ -8,7 +8,7 @@ from progress.bar import Bar
|
|||
import time
|
||||
import torch
|
||||
|
||||
from external.nms import soft_nms
|
||||
|
||||
from models.decode import ddd_decode
|
||||
from models.utils import flip_tensor
|
||||
from utils.image import get_affine_transform
|
||||
|
|
|
@ -12,7 +12,6 @@ from progress.bar import Bar
|
|||
import time
|
||||
import torch
|
||||
|
||||
from external.nms import soft_nms
|
||||
from models.decode import exct_decode, agnex_ct_decode
|
||||
from models.utils import flip_tensor
|
||||
from utils.image import get_affine_transform, transform_preds
|
||||
|
|
|
@ -8,7 +8,11 @@ from progress.bar import Bar
|
|||
import time
|
||||
import torch
|
||||
|
||||
from external.nms import soft_nms_39
|
||||
try:
|
||||
from external.nms import soft_nms_39
|
||||
except:
|
||||
print('NMS not imported! If you need it,'
|
||||
' do \n cd $CenterNet_ROOT/src/lib/external \n make')
|
||||
from models.decode import multi_pose_decode
|
||||
from models.utils import flip_tensor, flip_lr_off, flip_lr
|
||||
from utils.image import get_affine_transform
|
||||
|
|
|
@ -45,18 +45,22 @@ def load_model(model, model_path, optimizer=None, resume=False,
|
|||
model_state_dict = model.state_dict()
|
||||
|
||||
# check loaded parameters and created model parameters
|
||||
msg = 'If you see this, your model does not fully load the ' + \
|
||||
'pre-trained weight. Please make sure ' + \
|
||||
'you have correctly specified --arch xxx ' + \
|
||||
'or set the correct --num_classes for your own dataset.'
|
||||
for k in state_dict:
|
||||
if k in model_state_dict:
|
||||
if state_dict[k].shape != model_state_dict[k].shape:
|
||||
print('Skip loading parameter {}, required shape{}, '\
|
||||
'loaded shape{}.'.format(
|
||||
k, model_state_dict[k].shape, state_dict[k].shape))
|
||||
'loaded shape{}. {}'.format(
|
||||
k, model_state_dict[k].shape, state_dict[k].shape) + msg)
|
||||
state_dict[k] = model_state_dict[k]
|
||||
else:
|
||||
print('Drop parameter {}.'.format(k))
|
||||
print('Drop parameter {}.'.format(k) + msg)
|
||||
for k in model_state_dict:
|
||||
if not (k in state_dict):
|
||||
print('No param {}.'.format(k))
|
||||
print('No param {}.'.format(k) + msg)
|
||||
state_dict[k] = model_state_dict[k]
|
||||
model.load_state_dict(state_dict, strict=False)
|
||||
|
||||
|
|
Loading…
Reference in New Issue