This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"images": [{ | |
"file_name": "10.1.1.1.2006_3.bmp", | |
"height": 1123, | |
"width": 793, | |
"id": "10.1.1.1.2006_3" | |
}], | |
"type": "instances", | |
"annotations": [{ | |
"area": 4560, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
coco_file = r'/content/sample.json' | |
with open(coco_file) as json_file: | |
coco_data = json.load(json_file) | |
def assertions(key, values, required_keys, unique_key=None): | |
unique_key_id_mapper = {} | |
for value in values: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import xmltodict | |
import xml.etree.ElementTree as ET | |
dataset_file = r'/content/sample.xml' # The path to the XML file | |
xml_tree = ET.parse(dataset_file) # Parse the XML file | |
root = xml_tree.getroot() # Find the root element | |
assert root.tag == 'annotation' or root.attrib['verified'] == 'yes', "PASCAL VOC does not contain a root element" # Check if the root element is "annotation" | |
assert len(root.findtext('folder')) > 0, "XML file does not contain a 'folder' element" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<annotation verified="yes"> | |
<folder>MARMOT_ANNOTATION</folder> | |
<filename>10.1.1.1.2006_3.bmp</filename> | |
<path>MARMOT_ANNOTATION/10.1.1.1.2006_3.bmp</path> | |
<source> | |
<database>Unknown</database> | |
</source> | |
<size> | |
<width>793</width> | |
<height>1123</height> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import argparse | |
import json | |
import xml.etree.ElementTree as ET | |
from typing import Dict, List | |
from tqdm import tqdm | |
import re | |
import xmltodict | |
import numpy as np |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<?xml-stylesheet type="text/xsl" href="events_xsl.xsl"?> | |
<root> | |
<event> | |
<event_id>1</event_id> | |
<event_name>ICPC</event_name> | |
<event_desc>5 coding questions in 2 hrs</event_desc> | |
<event_type_participation>Team</event_type_participation> | |
<event_timing> | |
<event_start_datetime>2020-04-01T10:00:00</event_start_datetime> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* USE OF GOOGLE FONTS - GOOGLE STYLESHEET IMPORTED IN HTML FILE*/ | |
#table-title{ | |
color: rgb(88, 40, 49); | |
font-family: "Times New Roman"; | |
align-items: center; | |
} | |
/* EXAMPLE OF ELEMENT SELECTOR */ | |
/* BORDER PROPERTY APPLIED FOR TABLE */ | |
table { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:template match="/"> | |
<html> | |
<head> | |
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css" /> | |
<link rel="stylesheet" href="tablecss.css" /> | |
<!-- <link rel="stylesheet" href="../css/style.css" /> --> | |
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Sofia" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" /> | |
<xs:element name="root" type="rootType" /> | |
<xs:complexType name="rootType"> | |
<xs:sequence minOccurs="0" maxOccurs="unbounded"> | |
<xs:element name="event" type="eventType" /> | |
</xs:sequence> | |
</xs:complexType> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="validation_xsd.xsd"> | |
<event> | |
<event_id>1</event_id> | |
<event_name>ICPC</event_name> | |
<event_desc>5 coding questions in 2 hrs</event_desc> | |
<event_tags> | |
<tag id="1" displayName="coding">coding</tag> | |
</event_tags> | |
<event_type_participation>Team</event_type_participation> |
NewerOlder