Plot loss and accuracy with fasterRCNN

Hello,

I followed this tutorial : TorchVision Object Detection Finetuning Tutorial — PyTorch Tutorials 1.8.1+cu102 documentation to implement a faster-RCNN object detector, however I am not satisfied with the way losses and accuracy are showed :

num_epochs = 10

for epoch in range(num_epochs):
    # train for one epoch, printing every 10 iterations
    train_one_epoch(model, optimizer, data_loader, device, epoch, print_freq=10)
    # update the learning rate
    lr_scheduler.step()
    # evaluate on the test dataset
    evaluate(model, data_loader_test, device=device)

The issue is that the “evaluate” function does not return the loss but only a coco evaluator. On top of that, I dont know how to extract the accuracy given by this item “coco evaluator” in order to be able to plot the accuracy over epochs.
So if you know how to access both the loss and the accuracy in eval mode it would help me a lot

Thanks

1 Like

Did you find out how to do it?