edit_or
January 16, 2023, 4:50am
#1
• Hardware (A30)
• Network Type (Mask_rcnn)
• TLT Version (/tao-toolkit-tf:v3.22.05-tf1.15.5-py3)
• Training spec file(If have, please share here)
maskrcnn_train_resnet50.txt (2.4 KB)
I’m training with attached config file.
Altogether 22 classes, so added background so total 23 classes in training.
The instance label file is as shown in below.
instance_label_singpilot.txt (406 Bytes)
single_broken_white_line is the dash line as shown in the following image.
That was in the training.
But in inference, it was never detected. What could be wrong?
edit_or
January 16, 2023, 8:58am
#2
How can I find clue why the first class in label file is not detected?
Morganh
January 16, 2023, 2:10pm
#3
How about other classes? Are they correct?
edit_or
January 16, 2023, 2:12pm
#4
Yes they are correctly detected. Only the first class is not detected.
edit_or
January 16, 2023, 2:13pm
#5
How can I find where is the issue?
Morganh
January 16, 2023, 2:14pm
#6
You are running “tao mask_rcnn inference” to test, right?
edit_or
January 16, 2023, 7:11pm
#7
Yes I’m using mask inference command.
Morganh
January 17, 2023, 2:32am
#8
In your shared image, I find several single_broken_white lines, for example, do you mean below can not be detected?
edit_or
January 17, 2023, 2:46am
#9
The green box is detection for solid line.
Our mask labelling for dash line is like below in red.
All images with those dash lines have no detection at all.
Is it because of mask config? Which one should I change?
maskrcnn_config {
nlayers: 50
arch: "resnet"
freeze_bn: False
#freeze_blocks: "[0,1]"
gt_mask_size: 112
# Region Proposal Network
rpn_positive_overlap: 0.7
rpn_negative_overlap: 0.3
rpn_batch_size_per_im: 256
rpn_fg_fraction: 0.5
rpn_min_size: 0.
# Proposal layer.
batch_size_per_im: 512
fg_fraction: 0.25
fg_thresh: 0.5
bg_thresh_hi: 0.5
bg_thresh_lo: 0.
# Faster-RCNN heads.
fast_rcnn_mlp_head_dim: 1024
bbox_reg_weights: "(10., 10., 5., 5.)"
# Mask-RCNN heads.
include_mask: True
mrcnn_resolution: 28
# training
train_rpn_pre_nms_topn: 2000
train_rpn_post_nms_topn: 1000
train_rpn_nms_threshold: 0.7
# evaluation
test_detections_per_image: 100
test_nms: 0.5
test_rpn_pre_nms_topn: 1000
test_rpn_post_nms_topn: 1000
test_rpn_nms_thresh: 0.7
# model architecture
min_level: 2
max_level: 6
num_scales: 1
aspect_ratios: "[(1.0, 1.0), (1.4, 0.7), (0.7, 1.4)]"
anchor_scale: 8
# localization loss
rpn_box_loss_weight: 1.0
fast_rcnn_box_loss_weight: 1.0
mrcnn_weight_loss_mask: 1.0
}
Morganh
January 17, 2023, 2:48am
#10
Got it. Could you set a lower threshold and retry?
See MaskRCNN — TAO Toolkit 4.0 documentation
-t, --threshold
: The threshold for drawing a bbox (default: 0.6)
edit_or
January 17, 2023, 2:50am
#11
This is the command used. threshold is 0.5
mask_rcnn inference -i /workspace/Nyan/cv_samples_v1.3.0/mask_rcnn/data/FishEyes_Training/val -o /workspace/Nyan/cv_samples_v1.3.0/mask_rcnn/maskrcnn_annotated_images -e /workspace/Nyan/cv_samples_v1.3.0/mask_rcnn/specs/maskrcnn_train_resnet50.txt -m /workspace/Nyan/cv_samples_v1.3.0/mask_rcnn/experiment_dir_unpruned/model.step-165000.tlt -l /workspace/Nyan/cv_samples_v1.3.0/mask_rcnn/specs/instance_label_singpilot.txt -t 0.5 -k nvidia_tlt --include_mask --gpu_index 2
Morganh
January 17, 2023, 2:51am
#12
Could you share instance_label_singpilot.txt?
And please set to a lower threshold and retry. For quick experiment, you can test against less images.
edit_or
January 17, 2023, 2:54am
#13
It was shared in the first post. I am testing now with 0.3.
edit_or
January 17, 2023, 2:57am
#14
Tested with threshold 0.3.
Still not detected.
Morganh
January 17, 2023, 2:57am
#15
The -l is the directory of predicted labels in COCO format. It is a json file. Could you double check?
edit_or
January 17, 2023, 2:59am
#16
That could be the reason for N/A class for those detected classes. But no detection means I am referring to no bounding box.
For training, i have json file.
Morganh
January 17, 2023, 3:08am
#19
OK, please change the “-i” argument to use some of the training images.
We just want to narrow down to check if it works via some training images.
edit_or
January 17, 2023, 3:12am
#20
Training image also not detected. Is it mask configuration? But mask size for dash line is similar to solid line.