Data augmentation on the problem from yesterday Multi-Agent BEhaviour Challenge
I am working with a small sample of the data saved with numpy.
sequence = np.load('data/MABe/example_sequence.npy')
FOr each frame (30fps video) the positions of keypoints on the mouse (nose, ears, neck, sides and tail) have been annotated. There is also a label for the behaviour happening at each time instant.
sequence[0] # Two mice, list of X and list of Y for each for one frame
imw, imh = 1024, 570 # The image dimensions in which the mice move about
sequence = np.load('data/MABe/example_sequence.npy')
surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, 256, 256) # Create the surface
ctx = cairo.Context(surface)
draw_instant(ctx, sequence, 256, 256, 200, n=80, step=5) # Original
draw_instant(ctx, augment_sequence(sequence), 256, 256, 200, n=80, step=5) # Overlay the augmented version
display_surface(surface)
I fed a few thousand of these images (varous augmentations but NOT overlaid like the above) to a resnet and trained it for a bit, but couldn't get more than ~66% accuracy so I gave up. The competition took the bulk of my coding time today so this is a short notebook. See you tomorrow.