You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hello,I am learning to use this framework def train(): cfg = get_cfg() cfg.merge_from_file(model_zoo.get_config_file("COCO-Detection/faster_rcnn_R_50_FPN_3x.yaml")) cfg.MODEL.WEIGHTS = download_model() cfg.DATASETS.TRAIN = ("self_coco_train",) cfg.DATASETS.TEST = ("self_coco_test",) cfg.TEST.EVAL_PERIOD = 1000 cfg.DATALOADER.NUM_WORKERS = 4 cfg.INPUT.MIN_SIZE_TRAIN = WIDTH # cfg.INPUT.MAX_SIZE_TRAIN = WIDTH cfg.INPUT.MIN_SIZE_TEST = WIDTH # cfg.INPUT.MAX_SIZE_TEST = WIDTH cfg.SOLVER.WARMUP_ITERS = 1000 cfg.MODEL.ROI_HEADS.NUM_CLASSES = int(os.environ.get("CLASSES")) + 1 cfg.SOLVER.GAMMA = 0.05 cfg.INPUT.MIN_SIZE_TRAIN_SAMPLING = "choice" MAX = int(ITEMS / IMS_PER_BATCH) * 3000 cfg.SOLVER.MAX_ITER = MAX cfg.SOLVER.IMS_PER_BATCH = IMS_PER_BATCH cfg.SOLVER.STEPS = (MAX - 500, MAX) cfg.SOLVER.BASE_LR = LR cfg.MODEL.DEVICE = "cuda" cfg.OUTPUT_DIR = OUTPUT os.makedirs(OUTPUT, exist_ok=True) print("训练开始") trainer = CocoTrainer(cfg) best = BestCheckpointer(eval_period=cfg.TEST.EVAL_PERIOD, checkpointer=trainer.checkpointer, val_metric="bbox/AP75") trainer.register_hooks([CallbackHook(after_step=after_step), best]) trainer.resume_or_load(resume=False) print(trainer.train()) print("训练完毕")
I used this py file for training, and now I encountered a strange question graph.
If I set weights = model_zoo.get_checkpoint_url("COCO-Detection/faster_rcnn_R_50_FPN_3x.yaml")
| AP | AP50 | AP75 | APs | APm | APl |
| 77.344 | 94.826 | 91.785 | nan | 70.000 | 78.397 |
| category | AP | category | AP |
| lyf | nan | lyf | 77.344 |
Although the score is high, no objects can be detected
If I delete weights then everything is normal, so I want to know the meaning of setting weights during training
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
hello,I am learning to use this framework
def train(): cfg = get_cfg() cfg.merge_from_file(model_zoo.get_config_file("COCO-Detection/faster_rcnn_R_50_FPN_3x.yaml")) cfg.MODEL.WEIGHTS = download_model() cfg.DATASETS.TRAIN = ("self_coco_train",) cfg.DATASETS.TEST = ("self_coco_test",) cfg.TEST.EVAL_PERIOD = 1000 cfg.DATALOADER.NUM_WORKERS = 4 cfg.INPUT.MIN_SIZE_TRAIN = WIDTH # cfg.INPUT.MAX_SIZE_TRAIN = WIDTH cfg.INPUT.MIN_SIZE_TEST = WIDTH # cfg.INPUT.MAX_SIZE_TEST = WIDTH cfg.SOLVER.WARMUP_ITERS = 1000 cfg.MODEL.ROI_HEADS.NUM_CLASSES = int(os.environ.get("CLASSES")) + 1 cfg.SOLVER.GAMMA = 0.05 cfg.INPUT.MIN_SIZE_TRAIN_SAMPLING = "choice" MAX = int(ITEMS / IMS_PER_BATCH) * 3000 cfg.SOLVER.MAX_ITER = MAX cfg.SOLVER.IMS_PER_BATCH = IMS_PER_BATCH cfg.SOLVER.STEPS = (MAX - 500, MAX) cfg.SOLVER.BASE_LR = LR cfg.MODEL.DEVICE = "cuda" cfg.OUTPUT_DIR = OUTPUT os.makedirs(OUTPUT, exist_ok=True) print("训练开始") trainer = CocoTrainer(cfg) best = BestCheckpointer(eval_period=cfg.TEST.EVAL_PERIOD, checkpointer=trainer.checkpointer, val_metric="bbox/AP75") trainer.register_hooks([CallbackHook(after_step=after_step), best]) trainer.resume_or_load(resume=False) print(trainer.train()) print("训练完毕")
I used this py file for training, and now I encountered a strange question graph.
If I set weights = model_zoo.get_checkpoint_url("COCO-Detection/faster_rcnn_R_50_FPN_3x.yaml")
| AP | AP50 | AP75 | APs | APm | APl |
| 77.344 | 94.826 | 91.785 | nan | 70.000 | 78.397 |
| category | AP | category | AP |
| lyf | nan | lyf | 77.344 |
Although the score is high, no objects can be detected
If I delete weights then everything is normal, so I want to know the meaning of setting weights during training
Beta Was this translation helpful? Give feedback.
All reactions