Research statement · 2021

What a single frame leaves out

If you stop a video when someone has a hand inside a mailbox, it’s surprisingly hard to say what they’re doing. The envelope, the hand and the open door are all in plain sight. What I’d like to see is the second before the hand went in. If it was empty then and comes out holding a letter, I’d call that collecting the mail. Play the same few seconds backwards and I’d call it a delivery.

Around 2016 I was working on action recognition for public safety, where we had to pay to process all the footage a camera produced, including the hours in which very little happened. Computing optical flow across all those frames was an expensive way to find the few seconds we cared about. Meanwhile, on a standard action benchmark, a system could get the swimming question right just by recognizing a pool. I wanted to know which actions we could recognize from a few well-chosen RGB frames, and which ones would become impossible to tell apart once we threw the intervening frames away.

One of our examples was a video of someone cracking an egg into a pan over a campfire. There are at least two good descriptions of the clip, and each draws on a different part of the picture. You can tell that someone is cooking an egg in a close-up that cuts off the fire altogether. To say they’re cooking over a campfire, you have to see where the pan is. There could be a fire on the next grate over and you’d have almost the same inventory of things in the scene.

Two frames of eggs cooking over a fire, shown alongside candidate regions and the regions weighted by SINet.
The top frame gives the clearest view of the egg, while the lower frame shows the fire beneath the pan. The right column shows which regions received weight in this example. Ma et al., figure 1. [1]

In SINet we gave the model small regions of the image to work with and let it learn which ones belonged together. A region could contain a hand and half an eggshell, even if the detector had no good name for the combination. We had a useful comparison on Kinetics because we could give two models the same whole frames and the same regions, sampled once a second. Averaging the region features gave 73.1% top-1 accuracy on the validation set. Learning how the regions interacted raised that to 74.2%. I’d take the extra point, though I’d still like to move the pan to the other grate and see whether the prediction changes. The bright patch over the fire tells us where the model looked on this occasion. Moving the pan would tell us whether it mattered. [1, table 1]

The pan stays over the fire for several seconds, which makes once a second a fairly generous sampling rate. If the question is whether a basketball grazed the rim, the ball can arrive and leave between samples. One way to keep the cost down is to run a small network often enough to catch the motion and a larger one occasionally to get a good look at the scene. That’s the division of labor in SlowFast. To choose between the two approaches, I’d want examples like those in Something-Something, where the same object can be pushed to the left or to the right and recognizing the object earns you very little. [2] [3]

There’s a complication in designing a test like this. You can go to considerable trouble to make the pictures hard and accidentally leave the answer in the question. We ran into this with SNLI-VE. We gave a model a photograph and a sentence and asked whether the photograph supported the sentence, contradicted it, or left the matter open. A picture of two people beside a yellow cab supports the claim that they’re standing near a car. Whether they’ve paid the driver is open, and getting a better picture of the yellow paint is unlikely to settle it. We paired each photograph with several claims, so there was no single answer a model could give every time it saw the cab. [4]

Then there was the model we trained and tested with no photographs at all. It got 66.71% right on a three-way decision. The people who wrote the hypotheses had left enough regularities in their wording for the model to guess the label surprisingly often, a problem others found in the underlying language dataset too. I like the device the VQA v2 authors used here. They kept the question word for word and found a second, similar picture for which the answer was different. Whatever a model could infer from the phrasing, it had to look at something to get both right. [4, table 3] [5] [6]

Sometimes we were the ones throwing away the clue. Consider two dancers rehearsing the same step in the same clothes. To follow each dancer, our KeyTrack system used images to detect people and estimate 15 joint locations per person. Once we had the joints, we could compare a skeleton in one frame with each candidate in the next. This made it possible to match people without running another image network on every pair. [7]

Two dancers in similar outfits across two frames, with four candidate skeleton pairings underneath and the two matching pairs identified.
Two dancers yield four candidate pairings across the frames. KeyTrack scores each pair before assigning track identities. Snower et al., figure 1. [7]

It seemed reasonable to measure each joint relative to the center of the dancer’s body. You can move across the floor without changing your pose, and we wanted a description of your pose. When we tried it, matching got worse. Two people doing the same step have much the same arrangement of elbows and knees. A moment ago one of them was on the left of the stage, and the other was on the right. Centering both skeletons had carefully removed the easiest way to tell them apart. I’d happily use that centered representation to search for everyone doing a particular step. I’d want the coordinates back if you asked which dancer missed it. [7, §5.1]

The word that changes what you have to look at can be quite small. One query in our work on video search asks for the first time a climber adjusts his feet. Finding a convincing shot of the adjustment gets you only part of the way, because an equally convincing shot two minutes earlier changes the answer. With TripNet we let a model inspect a window, move forwards or backwards in the recording, and decide when it had seen enough to return a start and end time. On Charades-STA it examined about a third of the frames. On 38.29% of queries, the overlap between its first choice and the annotated interval covered at least half their union. [8] [9, tables 1–2]

Whether I’d want that system depends on who pays for the first pass. A researcher comparing search methods can quite reasonably compute visual features once and hand every method the same file. Someone receiving a new recording would have to make that file before answering a single question, which is the expense that got me interested in skipping frames. If I ran a film library where the same footage might turn up in a hundred searches, I’d pay for the file and keep it.

The video question I like best came from CATER. There’s a little gold object called the snitch, and you have to say which square of a six-by-six grid it ends up in. A cone can cover the snitch and slide away with it underneath. From then on, the thing you need to watch is the cone. In Hopper we tried to give a model a way to make that switch by letting it revisit the object tracks in a clip. Having located the last glimpse of gold, it could follow the object that covered it and use that object’s later position to answer the question. [10] [11]

Three sampled CATER frames show the gold snitch becoming hidden. The last panel marks its final position on a six-by-six grid.
The arrow in frame 11 identifies the target while it is visible. By frame 13 the required answer is a grid cell, even though the target itself is hidden. Zhou et al., figure 1. [11]

What surprised me about that task was how often you could turn up late and still do well. In 58% of the original examples the snitch was fully visible in the last frame. We made a version called CATER-h in which its last appearance was spread roughly evenly across the clip. On the original test set our last-frame baseline got the right square 61.1% of the time, compared with 73.2% for multi-hop Hopper. On CATER-h those numbers were 41.8% and 68.4%. The larger gap on the second test tells me more about the value of the earlier frames than the higher score on the first. [11, §6]

Since we can render these scenes ourselves, we could borrow the trick from VQA and make two movies with the same ending. Put the gold object under one cone and a gray object under another. For the second movie, swap the objects before the cones come down, then replay the cones’ movements exactly. Arrange for them to finish on different squares. Now somebody who walks in after the cones come down sees precisely the same movie in both cases, all the way to the end.

I’d be curious how a representation learned from two crops of the same video would handle that pair. Treating two crops as examples of the same thing makes sense for learning to recognize a tabletop, even when one crop happens to miss the gold object going under the cone. For this question, that crop has missed the one moment our latecomer would have wanted to see. [12]

I’d count the pair as one question, with credit for getting both squares right. Then I’d lengthen the stretch of identical footage between the moment the cones come down and the moment we ask where the gold is. If a model gets the pair right after two seconds and starts guessing after ten, we can stop the clips in between and ask for the square again. I’d like to know whether it loses the cone when the two paths cross, or whether it has already forgotten which one to follow while they’re both standing still.

References

  1. Chih-Yao Ma, Asim Kadav, Iain Melvin, Zsolt Kira, Ghassan AlRegib and Hans Peter Graf. Attend and Interact: Higher-Order Object Interactions for Video Understanding. CVPR, 2018.
  2. Christoph Feichtenhofer, Haoqi Fan, Jitendra Malik and Kaiming He. SlowFast Networks for Video Recognition. ICCV, 2019.
  3. Raghav Goyal et al. The “Something Something” Video Database for Learning and Evaluating Visual Common Sense. ICCV, 2017.
  4. Ning Xie, Farley Lai, Derek Doran and Asim Kadav. Visual Entailment: A Novel Task for Fine-Grained Image Understanding. 2019.
  5. Suchin Gururangan et al. Annotation Artifacts in Natural Language Inference Data. NAACL, 2018.
  6. Yash Goyal, Tejas Khot, Douglas Summers-Stay, Dhruv Batra and Devi Parikh. Making the V in VQA Matter. CVPR, 2017.
  7. Michael Snower, Asim Kadav, Farley Lai and Hans Peter Graf. 15 Keypoints Is All You Need. CVPR, 2020.
  8. Jiyang Gao, Chen Sun, Zhenheng Yang and Ram Nevatia. TALL: Temporal Activity Localization via Language Query. ICCV, 2017.
  9. Meera Hahn, Asim Kadav, James M. Rehg and Hans Peter Graf. Tripping Through Time: Efficient Localization of Activities in Videos. BMVC, 2020.
  10. Rohit Girdhar and Deva Ramanan. CATER: A Diagnostic Dataset for Compositional Actions and Temporal Reasoning. ICLR, 2020.
  11. Honglu Zhou, Asim Kadav, Farley Lai, Alexandru Niculescu-Mizil, Martin Renqiang Min, Mubbasir Kapadia and Hans Peter Graf. Hopper: Multi-hop Transformer for Spatiotemporal Reasoning. ICLR, 2021.
  12. Rui Qian et al. Spatiotemporal Contrastive Video Representation Learning. CVPR, 2021.