Skip to content

Instantly share code, notes, and snippets.

View ahmedbilal's full-sized avatar

Ahmed Bilal Khalid ahmedbilal

  • 40grid
  • Lahore, Pakistan
View GitHub Profile
@ahmedbilal
ahmedbilal / cvat_xml_to_txt.py
Last active March 12, 2019 18:54
CVAT XML To TXT - It only works for interpolation mode
import os
import argparse
from math import floor
import xml.etree.ElementTree as ET
# Parse Arguments
arg_parser = argparse.ArgumentParser()
arg_parser.add_argument("--input", type=str, help="Input XML file", required=True,
dest="input_xml")
arg_parser.add_argument("--output", type=str, help="Output .txt filename", required=True,
import pickle
import sys
"""
|------------------------------------------------------|
|Grammar notation | Code representation |
|------------------|-----------------------------------|
|Terminal | Code to match and consume a token|
|Nonterminal | Call to that rule’s function |
| | | If or switch statement |