Why mAp is 0, even after so many iterations ?
See original GitHub issuePlease help I am new to this, mAp is 0 even after this much iterations 92600 !! ,
[342] 92600 || B: 0.130 | C: 0.274 | M: 0.520 | S: 0.041 | T: 0.965 || ETA: 27 days, 23:08:49 || timer: 0.182
Computing validation mAP (this may take a while)...
Calculating mAP...
| all | .50 | .55 | .60 | .65 | .70 | .75 | .80 | .85 | .90 | .95 |
-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+
box | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 |
mask | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 |
-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+
settings
– batch_size=1 If i set batch_size=5, getting an error “GPU out of memory”
My dataset:
Training: 480 images (4302 * 2140) Validate: 6 images (4302 * 2140) Clases: 5
config.py
# ----------------------- DATASETS ----------------------- #
CIRCUIT_CLASSES = ("circuitA1", "circuitA2", "circuitB1", "circuitB2", "circuitC1")
my_custom_dataset = dataset_base.copy({
'name': 'Circuit Dataset',
'train_images': './data/coco/images/train',
'train_info': './data/coco/annotations/train/instances_train.json',
'valid_images': './data/coco/images/val',
'valid_info': './data/coco/annotations/val/instances_val.json',
# Whether or not to load GT. If this is False, eval.py quantitative evaluation won't work.
'has_gt': False,
'class_names': CIRCUIT_CLASSES,
# COCO class ids aren't sequential, so this is a bandage fix. If your ids aren't sequential,
# provide a map from category_id -> index in class_names + 1 (the +1 is there because it's 1-indexed).
# If not specified, this just assumes category ids start at 1 and increase sequentially.
'label_map': { 1: 1, 2: 2, 3: 3, 4: 4, 5: 5 }
})
# ----------------------- YOLACT v1.0 CONFIGS ----------------------- #
yolact_base_config = coco_base_config.copy({
'name': 'yolact_base',
# Dataset stuff
# 'dataset': coco2017_dataset,
'dataset': my_custom_dataset,
'num_classes': len(my_custom_dataset.class_names) + 1,
# Image Size
'max_size': 550,
# Training params
'lr_steps': (280000, 600000, 700000, 750000),
'max_iter': 800000,
# Backbone Settings
'backbone': resnet101_backbone.copy({
'selected_layers': list(range(1, 4)),
'use_pixel_scales': True,
'preapply_sqrt': False,
'use_square_anchors': True, # This is for backward compatability with a bug
'pred_aspect_ratios': [ [[1, 1/2, 2]] ]*5,
'pred_scales': [[24], [48], [96], [192], [384]],
}),
# FPN Settings
'fpn': fpn_base.copy({
'use_conv_downsample': True,
'num_downsample': 2,
}),
# Mask Settings
'mask_type': mask_type.lincomb,
'mask_alpha': 6.125,
'mask_proto_src': 0,
'mask_proto_net': [(256, 3, {'padding': 1})] * 3 + [(None, -2, {}), (256, 3, {'padding': 1})] + [(32, 1, {})],
'mask_proto_normalize_emulate_roi_pooling': True,
# Other stuff
'share_prediction_module': True,
'extra_head_net': [(256, 3, {'padding': 1})],
'positive_iou_threshold': 0.5,
'negative_iou_threshold': 0.4,
'crowd_iou_threshold': 0.7,
'use_semantic_segmentation_loss': True,
})
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8
Top Results From Across the Web
Why are iterations over maps random? - Stack Overflow
When iterating over a map with a range loop, the iteration order is not specified and is not guaranteed to be the same...
Read more >map vs. for loop - Medium
True iteration — you know that your code is going to run on each element of the array in the right order. Immutability...
Read more >Searching with iterated maps - PNAS
When n is <10, the algorithm finds a coloring in few iterations, with the displacement Δ making systematic progress toward zero. For the...
Read more >Python's map(): Processing Iterables Without a Loop
This first argument to map() is a transformation function. In other words, it's the function that transforms each original item into a new...
Read more >Array.prototype.map() - JavaScript - MDN Web Docs
The map() method creates a new array populated with the results of calling a provided function on every element in the calling array....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was having the same issue with a smaller dataset, I don’t think the model can learn that easily once gradient pathways to the backbone are too deep.
My workaround to it was to download pre-trained coco weights and use them to initialize the model. Modify this method in yolact.Yolact:
Then just add this to line 214 of train.py
The definition is calc_map in eval.py
Did you also have this problem during training?