Conversion of MOVi tfrecord datasets to PyTorch-friendly format, and FG-ARI & mIoU evaluation code.
git clone https://github.com/Interpause/MOVi-PyTorch.git
cd MOVi-PyTorch
pip install -r requirements.txtrgb: Folder containing JPEG-encoded video frames per video.seg: Folder containing PNG-encoded instance segmentations (using color palette) per video.
python convert.py movi_a- Use
--helpto see all options. --data-dirdefaults togs://kubric-public/tfds, meaning files will be downloaded at runtime.- Optionally, they can be downloaded beforehand, see below.
- Afterwards, set
--data-dirto./data.
- Afterwards, set
python evaluate.py movi_a validation <pred_dir>- Use
--helpto see all options. pred_dirshould have the same format and structure assegfolder.per-video.csvandresults.csvcontaining FG-ARI & mIoU scores will be written topred_dir.
See https://cloud.google.com/storage/docs/gsutil_install for how to install gsutil.
- Determine dataset and image size wanted:
DATASET=movi_a
SIZE=256x256
mkdir -p data/${DATASET}/${SIZE}- Download entire dataset:
gsutil -m cp -nr gs://kubric-public/tfds/${DATASET}/.config data/${DATASET}/
gsutil -m cp -nr gs://kubric-public/tfds/${DATASET}/${SIZE}/1.0.0 data/${DATASET}/${SIZE}/- Or copy specific split:
SPLIT=validation
mkdir -p data/${DATASET}/${SIZE}/1.0.0
gsutil -m cp -nr gs://kubric-public/tfds/${DATASET}/.config data/${DATASET}/
gsutil -m cp -nr \
gs://kubric-public/tfds/${DATASET}/${SIZE}/1.0.0/dataset_info.json \
gs://kubric-public/tfds/${DATASET}/${SIZE}/1.0.0/features.json \
gs://kubric-public/tfds/${DATASET}/${SIZE}/1.0.0/*.labels.txt \
data/${DATASET}/${SIZE}/1.0.0/
gsutil -m cp -nr gs://kubric-public/tfds/${DATASET}/${SIZE}/1.0.0/${DATASET}-${SPLIT}* data/${DATASET}/${SIZE}/1.0.0/