(data)
| 42 | return y |
| 43 | |
| 44 | def plot_train(data): |
| 45 | plt.title(os.path.basename(sys.argv[1]) + ' Training Loss') |
| 46 | plt.xlabel('Iteration') |
| 47 | plt.ylabel('Loss') |
| 48 | |
| 49 | loss_names = ['BBox Loss', 'Conf Loss', 'Mask Loss'] |
| 50 | |
| 51 | x = [x['iteration'] for x in data] |
| 52 | plt.plot(x, smoother([y['b'] for y in data])) |
| 53 | plt.plot(x, smoother([y['c'] for y in data])) |
| 54 | plt.plot(x, smoother([y['m'] for y in data])) |
| 55 | |
| 56 | if data[0]['s'] is not None: |
| 57 | plt.plot(x, smoother([y['s'] for y in data])) |
| 58 | loss_names.append('Segmentation Loss') |
| 59 | |
| 60 | plt.legend(loss_names) |
| 61 | plt.show() |
| 62 | |
| 63 | def plot_val(data): |
| 64 | plt.title(os.path.basename(sys.argv[1]) + ' Validation mAP') |
no test coverage detected