-
Notifications
You must be signed in to change notification settings - Fork 150
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
.rec must use the DPNs's Mxnet im2rec? #16
Comments
The provided MXNet in the DPN repo is a pretty old version which may not be compatible with You can either generate the *Note: I personally recommend you to move to the latest MXNet since it would provide you much faster training and testing speed. But be careful with the official MXNet's default data augmentations, since it uses different strategies and may lead to poorer accuracy. |
It always show this error . |
Have you followed my recommendations above? There are numerous mistakes that lead to |
@cypw Thanks your answer.I use the old mxnet to train. |
@cypw but I add the torch augmentations to the lastest MXNet,and make . There are some error as follows: |
@shipeng-uestc Step 1: Make sure your This can be verified by simply running the testing code on your Step 2: Check if you have used the iterator correctly. Here, I give you an example: # data iter
def get_data_iter(args, kv):
mean_r = 124
mean_g = 117
mean_b = 104
data_shape = (3, 224, 224)
train = mx.io.ImageRecordIter(
data_name = 'data',
label_name = 'softmax_label',
# ------------------------------------
path_imgrec = os.path.join(args.data_dir, "train.rec"),
aug_seq = 'aug_torch',
label_width = 1,
data_shape = data_shape,
force2color = True,
preprocess_threads = 15,
verbose = True,
num_parts = 1,
part_index = 0,
shuffle = True,
shuffle_chunk_size = 1024,
shuffle_chunk_seed = kv.rank,
# ------------------------------------
batch_size = args.batch_size,
# ------------------------------------
rand_mirror = True,
mean_r = mean_r,
mean_g = mean_g,
mean_b = mean_b,
scale = 0.0167,
seed = kv.rank,
# ------------------------------------
rand_crop = True,
min_aspect_ratio = 0.7500,
max_aspect_ratio = 1.3333,
min_random_area = 0.08,
max_random_area = 1.0,
random_h = 20,
random_s = 40,
random_l = 50,
fill_value = (mean_r, mean_g, mean_b),
inter_method = 2 # 1-bilinear 2-cubic 9-auto
)
val = mx.io.ImageRecordIter(
data_name = 'data',
label_name = 'softmax_label',
# ------------------------------------
path_imgrec = os.path.join(args.data_dir, "val.rec"),
aug_seq = 'aug_torch',
label_width = 1,
data_shape = data_shape,
force2color = True,
preprocess_threads = 4,
verbose = True,
num_parts = kv.num_workers,
part_index = kv.rank,
# ------------------------------------
batch_size = args.batch_size,
# ------------------------------------
rand_mirror = False,
mean_r = mean_r,
mean_g = mean_g,
mean_b = mean_b,
scale = 0.0167,
seed = 0,
# ------------------------------------
rand_crop = False,
min_random_area = 0.765625,
max_random_area = 0.765625,
fill_value = (mean_r, mean_g, mean_b),
inter_method = 2 # 1-bilinear 2-cubic 9-auto
)
return (train, val) As for moving to the latest MXNet, I haven't tried it yet. But it seems that the newer MXNet added another input argument (i.e. |
@cypw thank you very much.But,why min_random_area = 0.765625.if I set it as follows: |
I fix it to Yes, If you set |
Thank you very much.it help me a lot. |
I still have a question.Now ,I want use three DPNs-92 to ensemble.I have read some blogs, it says need different training data. Now,I use "unchanged = 1","resize = 395","resize =480"to produce three different train.rec.The input size is 320*320. Do you have a better suggestion? |
@shipeng-uestc Actually, I don't quite understand why do you need to use the training set with different scale to do the multi-model ensembling. Usually, the multi-model ensembling happens after the training phase and only involves validation and testing set. |
@cypw Thank you.I want to get three differernt DPNs-92 models,then I use three models to predict the same test, in order to get higher accuracy.I read the Resnet paper, when they test, they use 2 resnet152 to get a higher accuracy |
I use the new mxnet/tools/im2rec.py to produce .rec file,
when I run the mxnet in your DPNs, error"Segmentation fault(core dumped)" is showed.
The text was updated successfully, but these errors were encountered: