Open skylark-joe opened 7 months ago
It's hard to tell why your model is not learning based on the limited info you provided. A good sanity check would be using the same train set and validation set during your first training run. You can even use 2-10 images instead of 360.
http://karpathy.github.io/2019/04/25/recipe/ 'overfit one batch. Overfit a single batch of only a few examples (e.g. as little as two). To do so we increase the capacity of our model (e.g. add layers or filters) and verify that we can reach the lowest achievable loss (e.g. zero). I also like to visualize in the same plot both the label and the prediction and ensure that they end up aligning perfectly once we reach the minimum loss. If they do not, there is a bug somewhere and we cannot continue to the next stage.'
thanks for your advice, it is kind of u to provide an atricle here, which i would read. in fact, accidently, i guess i have solved the problem, through changeing the category_id in my json_file to [1, categories].
the waring we got is in detectron2\detectron2\data\datasets\coco.py line 104, saying that it will apply a mapping however, when i read the following codes, i find that there is no operation to category_id as it saied.
in addition, in line 437 in the same file, i see that the "id" field must start with 1 if we want to use the COCO API, and then, after changing, it works.
hi, i trian the model for 3000 ite, only to find the EVALU result to be zero. During the training time, there is no error, expcet a waring saying that Category ids in annotations are not in [1, #categories]! We'll apply a mapping for you. does it have something to do with the argu config.eval_only? i do not set the argument, so it should take the default any available hep would be appreciated.
Instructions To Reproduce the Issue:
BASE: "../Base-RCNN-FPN.yaml" MODEL: WEIGHTS: "" MASK_ON: True RESNETS: DEPTH: 50 ROI_HEADS: NUM_CLASSES: 6 DATASETS: TRAIN: ("steel_train",) #("coco_2017_train",) TEST: ("steel_val",) #("coco_2017_val",) DATALOADER: NUM_WORKERS: 8 SOLVER: STEPS: () #(210000, 250000) MAX_ITER: 270000 IMS_PER_BATCH: 16 BASE_LR: 0.001 #0.02 MAX_ITER: 90000
in command line, i run python plain_train_net.py --config-file ../configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml and it run successfully as it seems
[04/19 04:38:26] detectron2 INFO: Evaluation results for steel_val in csv format: [04/19 04:38:26] d2.evaluation.testing INFO: copypaste: Task: bbox [04/19 04:38:26] d2.evaluation.testing INFO: copypaste: AP,AP50,AP75,APs,APm,APl [04/19 04:38:26] d2.evaluation.testing INFO: copypaste: 0.0000,0.0000,0.0000,0.0000,0.0000,0.0000 [04/19 04:38:26] d2.evaluation.testing INFO: copypaste: Task: segm [04/19 04:38:26] d2.evaluation.testing INFO: copypaste: AP,AP50,AP75,APs,APm,APl [04/19 04:38:26] d2.evaluation.testing INFO: copypaste: 0.0000,0.0000,0.0000,0.0000,0.0000,0.0000
Expected behavior:
at least, there should be a result but zero, i don not know what cause the problem
Environment:
the environment is set up following the tutorial