Closed lzcchl closed 4 years ago
why cannot use only one json for training?
In label_data_0313.json
, the maximum number of lanes in an image is 4. The model predicts this number of lanes. In the cfgs I provided, the number of outputs (num_outputs
in the .yaml
) is calculated for a maximum of 5 lanes. You have three options:
max_lanes: 5
in the training dataset settings (in the .yaml
).yaml
). To do this, set the parameter num_outputs: 28
.label_data_0601.json
), which has images with 5 lanes.I would go with option 3.
Thank you! That's help a lot, I will put some pics which only 3 lanes for training. so I change the number of outputs to 21, that works and begin training.
when I use “train.py”, set "tusimple.py" --> 'train': ['label_data_0313.json'], there are error as:
total annos 2858 Transforming annotations... Done. Loaded pretrained weights for efficientnet-b0 [2020-05-21 17:43:48,538] [INFO] Starting training. [2020-05-21 17:43:48,538] [INFO] Beginning epoch 1 [2020-05-21 17:43:50,452] [ERROR] Uncaught exception Traceback (most recent call last): File "train.py", line 237, in
train_state=train_state,
File "train.py", line 54, in train
loss, loss_dict_i = criterion(outputs, labels, **criterion_parameters)
File "/home/cuda/lzc/road/PolyLaneNet/lib/models.py", line 116, in loss
lower_loss = mse(target_lowers[valid_lanes_idx], pred_lowers[valid_lanes_idx])
IndexError: The shape of the mask [64, 1] at index 0does not match the shape of the indexed tensor [80, 1] at index 0
but when I set "tusimple.py" --> 'train': ['label_data_0601.json'], then begin training.