Sketch-QL is a video database management system for retrieving video moments with a sketch-based query interface.This interface allows users to specify object trajectory events with simple mouse drag-and-drop operations. Using a pre-trained model that encodes trajectory similarity, Sketch-QL achieves zero-shot video moments retrieval by performing similarity searches over the video to identify clips that are the most similar to the visual query.
- git clone https://github.com/tldraw/tldraw-v1.git
- git clone this repository to get the sketch-ql-backend and core-example-advanced
- replace the core-example-advanced folder with the folder from here
-
cd sketchql-backend
-
Install requirements
pip install -r requirements.txt
Install ffmpeg MacOS: brew install ffmpeg
-
Download dataset
Please download the traffic dataset from https://www.dropbox.com/scl/fi/qormqlzuijb8133um0wa7/VIRAT_S_050300_01_000148_000396.mp4?rlkey=if1vmf14md7nynjuepv9s903j&dl=0 and put it in the data/videos/ folder -
Download model checkpoint
Download from https://www.dropbox.com/scl/fi/5jnqj57idzhpm68sjyfb8/model_cp.pt?rlkey=sbz0ix15ofbz0x12d6714v5wu&dl=0 and put it in the data/model_checkpoint folder -
Run server
Run the script server.py
python3 server.py
-
install yarn
npm install -g yarn -
Run code
cd tldraw-v1
yarn install
yarn start:core
open localhost://5421 in your browser
A video demonstrating how SketchQL works can be found in the video folder