diff --git a/.vscode/PythonImportHelper-v2-Completion.json b/.vscode/PythonImportHelper-v2-Completion.json new file mode 100644 index 0000000..7bab5a5 --- /dev/null +++ b/.vscode/PythonImportHelper-v2-Completion.json @@ -0,0 +1,1205 @@ +[ + { + "label": "json", + "kind": 6, + "isExtraImport": true, + "importPath": "json", + "description": "json", + "detail": "json", + "documentation": {} + }, + { + "label": "stringify", + "importPath": "flatted", + "description": "flatted", + "isExtraImport": true, + "detail": "flatted", + "documentation": {} + }, + { + "label": "parse", + "importPath": "flatted", + "description": "flatted", + "isExtraImport": true, + "detail": "flatted", + "documentation": {} + }, + { + "label": "stringify", + "importPath": "flatted", + "description": "flatted", + "isExtraImport": true, + "detail": "flatted", + "documentation": {} + }, + { + "label": "parse", + "importPath": "flatted", + "description": "flatted", + "isExtraImport": true, + "detail": "flatted", + "documentation": {} + }, + { + "label": "time", + "kind": 6, + "isExtraImport": true, + "importPath": "time", + "description": "time", + "detail": "time", + "documentation": {} + }, + { + "label": "argparse", + "kind": 6, + "isExtraImport": true, + "importPath": "argparse", + "description": "argparse", + "detail": "argparse", + "documentation": {} + }, + { + "label": "os", + "kind": 6, + "isExtraImport": true, + "importPath": "os", + "description": "os", + "detail": "os", + "documentation": {} + }, + { + "label": "subprocess", + "kind": 6, + "isExtraImport": true, + "importPath": "subprocess", + "description": "subprocess", + "detail": "subprocess", + "documentation": {} + }, + { + "label": "signal", + "kind": 6, + "isExtraImport": true, + "importPath": "signal", + "description": "signal", + "detail": "signal", + "documentation": {} + }, + { + "label": "NodeStrategy", + "importPath": "ros2cli.node.strategy", + "description": "ros2cli.node.strategy", + "isExtraImport": true, + "detail": "ros2cli.node.strategy", + "documentation": {} + }, + { + "label": "get_topic_names_and_types", + "importPath": "ros2topic.api", + "description": "ros2topic.api", + "isExtraImport": true, + "detail": "ros2topic.api", + "documentation": {} + }, + { + "label": "shutil", + "kind": 6, + "isExtraImport": true, + "importPath": "shutil", + "description": "shutil", + "detail": "shutil", + "documentation": {} + }, + { + "label": "os.path", + "kind": 6, + "isExtraImport": true, + "importPath": "os.path", + "description": "os.path", + "detail": "os.path", + "documentation": {} + }, + { + "label": "Path", + "importPath": "pathlib", + "description": "pathlib", + "isExtraImport": true, + "detail": "pathlib", + "documentation": {} + }, + { + "label": "Path", + "importPath": "pathlib", + "description": "pathlib", + "isExtraImport": true, + "detail": "pathlib", + "documentation": {} + }, + { + "label": "Path", + "importPath": "pathlib", + "description": "pathlib", + "isExtraImport": true, + "detail": "pathlib", + "documentation": {} + }, + { + "label": "train_YoloV8", + "importPath": "train_Yolo", + "description": "train_Yolo", + "isExtraImport": true, + "detail": "train_Yolo", + "documentation": {} + }, + { + "label": "train_Dope_i", + "importPath": "train_Dope", + "description": "train_Dope", + "isExtraImport": true, + "detail": "train_Dope", + "documentation": {} + }, + { + "label": "blenderproc", + "kind": 6, + "isExtraImport": true, + "importPath": "blenderproc", + "description": "blenderproc", + "detail": "blenderproc", + "documentation": {} + }, + { + "label": "numpy", + "kind": 6, + "isExtraImport": true, + "importPath": "numpy", + "description": "numpy", + "detail": "numpy", + "documentation": {} + }, + { + "label": "random", + "kind": 6, + "isExtraImport": true, + "importPath": "random", + "description": "random", + "detail": "random", + "documentation": {} + }, + { + "label": "bpy", + "kind": 6, + "isExtraImport": true, + "importPath": "bpy", + "description": "bpy", + "detail": "bpy", + "documentation": {} + }, + { + "label": "transforms3d", + "kind": 6, + "isExtraImport": true, + "importPath": "transforms3d", + "description": "transforms3d", + "detail": "transforms3d", + "documentation": {} + }, + { + "label": "yaml", + "kind": 6, + "isExtraImport": true, + "importPath": "yaml", + "description": "yaml", + "detail": "yaml", + "documentation": {} + }, + { + "label": "YOLO", + "importPath": "ultralytics", + "description": "ultralytics", + "isExtraImport": true, + "detail": "ultralytics", + "documentation": {} + }, + { + "label": "_Known", + "kind": 6, + "importPath": "server.node_modules.flatted.python.flatted", + "description": "server.node_modules.flatted.python.flatted", + "peekOfCode": "class _Known:\n def __init__(self):\n self.key = []\n self.value = []\nclass _String:\n def __init__(self, value):\n self.value = value\ndef _array_keys(value):\n keys = []\n i = 0", + "detail": "server.node_modules.flatted.python.flatted", + "documentation": {} + }, + { + "label": "_String", + "kind": 6, + "importPath": "server.node_modules.flatted.python.flatted", + "description": "server.node_modules.flatted.python.flatted", + "peekOfCode": "class _String:\n def __init__(self, value):\n self.value = value\ndef _array_keys(value):\n keys = []\n i = 0\n for _ in value:\n keys.append(i)\n i += 1\n return keys", + "detail": "server.node_modules.flatted.python.flatted", + "documentation": {} + }, + { + "label": "parse", + "kind": 2, + "importPath": "server.node_modules.flatted.python.flatted", + "description": "server.node_modules.flatted.python.flatted", + "peekOfCode": "def parse(value, *args, **kwargs):\n json = _json.loads(value, *args, **kwargs)\n wrapped = []\n for value in json:\n wrapped.append(_wrap(value))\n input = []\n for value in wrapped:\n if isinstance(value, _String):\n input.append(value.value)\n else:", + "detail": "server.node_modules.flatted.python.flatted", + "documentation": {} + }, + { + "label": "stringify", + "kind": 2, + "importPath": "server.node_modules.flatted.python.flatted", + "description": "server.node_modules.flatted.python.flatted", + "peekOfCode": "def stringify(value, *args, **kwargs):\n known = _Known()\n input = []\n output = []\n i = int(_index(known, input, value))\n while i < len(input):\n output.append(_transform(known, input, input[i]))\n i += 1\n return _json.dumps(output, *args, **kwargs)", + "detail": "server.node_modules.flatted.python.flatted", + "documentation": {} + }, + { + "label": "stringify", + "kind": 2, + "importPath": "server.node_modules.flatted.python.test", + "description": "server.node_modules.flatted.python.test", + "peekOfCode": "def stringify(value):\n return _stringify(value, separators=(',', ':'))\nassert stringify([None, None]) == '[[null,null]]'\na = []\no = {}\nassert stringify(a) == '[[]]'\nassert stringify(o) == '[{}]'\na.append(a)\no['o'] = o\nassert stringify(a) == '[[\"0\"]]'", + "detail": "server.node_modules.flatted.python.test", + "documentation": {} + }, + { + "label": "a", + "kind": 5, + "importPath": "server.node_modules.flatted.python.test", + "description": "server.node_modules.flatted.python.test", + "peekOfCode": "a = []\no = {}\nassert stringify(a) == '[[]]'\nassert stringify(o) == '[{}]'\na.append(a)\no['o'] = o\nassert stringify(a) == '[[\"0\"]]'\nassert stringify(o) == '[{\"o\":\"0\"}]'\nb = parse(stringify(a))\nassert isinstance(b, list) and b[0] == b", + "detail": "server.node_modules.flatted.python.test", + "documentation": {} + }, + { + "label": "o", + "kind": 5, + "importPath": "server.node_modules.flatted.python.test", + "description": "server.node_modules.flatted.python.test", + "peekOfCode": "o = {}\nassert stringify(a) == '[[]]'\nassert stringify(o) == '[{}]'\na.append(a)\no['o'] = o\nassert stringify(a) == '[[\"0\"]]'\nassert stringify(o) == '[{\"o\":\"0\"}]'\nb = parse(stringify(a))\nassert isinstance(b, list) and b[0] == b\na.append(1)", + "detail": "server.node_modules.flatted.python.test", + "documentation": {} + }, + { + "label": "o['o']", + "kind": 5, + "importPath": "server.node_modules.flatted.python.test", + "description": "server.node_modules.flatted.python.test", + "peekOfCode": "o['o'] = o\nassert stringify(a) == '[[\"0\"]]'\nassert stringify(o) == '[{\"o\":\"0\"}]'\nb = parse(stringify(a))\nassert isinstance(b, list) and b[0] == b\na.append(1)\na.append('two')\na.append(True)\no['one'] = 1\no['two'] = 'two'", + "detail": "server.node_modules.flatted.python.test", + "documentation": {} + }, + { + "label": "b", + "kind": 5, + "importPath": "server.node_modules.flatted.python.test", + "description": "server.node_modules.flatted.python.test", + "peekOfCode": "b = parse(stringify(a))\nassert isinstance(b, list) and b[0] == b\na.append(1)\na.append('two')\na.append(True)\no['one'] = 1\no['two'] = 'two'\no['three'] = True\nassert stringify(a) == '[[\"0\",1,\"1\",true],\"two\"]'\nassert stringify(o) == '[{\"o\":\"0\",\"one\":1,\"two\":\"1\",\"three\":true},\"two\"]'", + "detail": "server.node_modules.flatted.python.test", + "documentation": {} + }, + { + "label": "o['one']", + "kind": 5, + "importPath": "server.node_modules.flatted.python.test", + "description": "server.node_modules.flatted.python.test", + "peekOfCode": "o['one'] = 1\no['two'] = 'two'\no['three'] = True\nassert stringify(a) == '[[\"0\",1,\"1\",true],\"two\"]'\nassert stringify(o) == '[{\"o\":\"0\",\"one\":1,\"two\":\"1\",\"three\":true},\"two\"]'\na.append(o)\no['a'] = a\nassert stringify(a) == '[[\"0\",1,\"1\",true,\"2\"],\"two\",{\"o\":\"2\",\"one\":1,\"two\":\"1\",\"three\":true,\"a\":\"0\"}]'\nassert stringify(o) == '[{\"o\":\"0\",\"one\":1,\"two\":\"1\",\"three\":true,\"a\":\"2\"},\"two\",[\"2\",1,\"1\",true,\"0\"]]'\na.append({'test': 'OK'})", + "detail": "server.node_modules.flatted.python.test", + "documentation": {} + }, + { + "label": "o['two']", + "kind": 5, + "importPath": "server.node_modules.flatted.python.test", + "description": "server.node_modules.flatted.python.test", + "peekOfCode": "o['two'] = 'two'\no['three'] = True\nassert stringify(a) == '[[\"0\",1,\"1\",true],\"two\"]'\nassert stringify(o) == '[{\"o\":\"0\",\"one\":1,\"two\":\"1\",\"three\":true},\"two\"]'\na.append(o)\no['a'] = a\nassert stringify(a) == '[[\"0\",1,\"1\",true,\"2\"],\"two\",{\"o\":\"2\",\"one\":1,\"two\":\"1\",\"three\":true,\"a\":\"0\"}]'\nassert stringify(o) == '[{\"o\":\"0\",\"one\":1,\"two\":\"1\",\"three\":true,\"a\":\"2\"},\"two\",[\"2\",1,\"1\",true,\"0\"]]'\na.append({'test': 'OK'})\na.append([1, 2, 3])", + "detail": "server.node_modules.flatted.python.test", + "documentation": {} + }, + { + "label": "o['three']", + "kind": 5, + "importPath": "server.node_modules.flatted.python.test", + "description": "server.node_modules.flatted.python.test", + "peekOfCode": "o['three'] = True\nassert stringify(a) == '[[\"0\",1,\"1\",true],\"two\"]'\nassert stringify(o) == '[{\"o\":\"0\",\"one\":1,\"two\":\"1\",\"three\":true},\"two\"]'\na.append(o)\no['a'] = a\nassert stringify(a) == '[[\"0\",1,\"1\",true,\"2\"],\"two\",{\"o\":\"2\",\"one\":1,\"two\":\"1\",\"three\":true,\"a\":\"0\"}]'\nassert stringify(o) == '[{\"o\":\"0\",\"one\":1,\"two\":\"1\",\"three\":true,\"a\":\"2\"},\"two\",[\"2\",1,\"1\",true,\"0\"]]'\na.append({'test': 'OK'})\na.append([1, 2, 3])\no['test'] = {'test': 'OK'}", + "detail": "server.node_modules.flatted.python.test", + "documentation": {} + }, + { + "label": "o['a']", + "kind": 5, + "importPath": "server.node_modules.flatted.python.test", + "description": "server.node_modules.flatted.python.test", + "peekOfCode": "o['a'] = a\nassert stringify(a) == '[[\"0\",1,\"1\",true,\"2\"],\"two\",{\"o\":\"2\",\"one\":1,\"two\":\"1\",\"three\":true,\"a\":\"0\"}]'\nassert stringify(o) == '[{\"o\":\"0\",\"one\":1,\"two\":\"1\",\"three\":true,\"a\":\"2\"},\"two\",[\"2\",1,\"1\",true,\"0\"]]'\na.append({'test': 'OK'})\na.append([1, 2, 3])\no['test'] = {'test': 'OK'}\no['array'] = [1, 2, 3]\nassert stringify(a) == '[[\"0\",1,\"1\",true,\"2\",\"3\",\"4\"],\"two\",{\"o\":\"2\",\"one\":1,\"two\":\"1\",\"three\":true,\"a\":\"0\",\"test\":\"3\",\"array\":\"4\"},{\"test\":\"5\"},[1,2,3],\"OK\"]'\nassert stringify(o) == '[{\"o\":\"0\",\"one\":1,\"two\":\"1\",\"three\":true,\"a\":\"2\",\"test\":\"3\",\"array\":\"4\"},\"two\",[\"2\",1,\"1\",true,\"0\",\"3\",\"4\"],{\"test\":\"5\"},[1,2,3],\"OK\"]'\na2 = parse(stringify(a));", + "detail": "server.node_modules.flatted.python.test", + "documentation": {} + }, + { + "label": "o['test']", + "kind": 5, + "importPath": "server.node_modules.flatted.python.test", + "description": "server.node_modules.flatted.python.test", + "peekOfCode": "o['test'] = {'test': 'OK'}\no['array'] = [1, 2, 3]\nassert stringify(a) == '[[\"0\",1,\"1\",true,\"2\",\"3\",\"4\"],\"two\",{\"o\":\"2\",\"one\":1,\"two\":\"1\",\"three\":true,\"a\":\"0\",\"test\":\"3\",\"array\":\"4\"},{\"test\":\"5\"},[1,2,3],\"OK\"]'\nassert stringify(o) == '[{\"o\":\"0\",\"one\":1,\"two\":\"1\",\"three\":true,\"a\":\"2\",\"test\":\"3\",\"array\":\"4\"},\"two\",[\"2\",1,\"1\",true,\"0\",\"3\",\"4\"],{\"test\":\"5\"},[1,2,3],\"OK\"]'\na2 = parse(stringify(a));\no2 = parse(stringify(o));\nassert a2[0] == a2\nassert o2['o'] == o2\nassert a2[1] == 1 and a2[2] == 'two' and a2[3] == True and isinstance(a2[4], dict)\nassert a2[4] == a2[4]['o'] and a2 == a2[4]['o']['a']", + "detail": "server.node_modules.flatted.python.test", + "documentation": {} + }, + { + "label": "o['array']", + "kind": 5, + "importPath": "server.node_modules.flatted.python.test", + "description": "server.node_modules.flatted.python.test", + "peekOfCode": "o['array'] = [1, 2, 3]\nassert stringify(a) == '[[\"0\",1,\"1\",true,\"2\",\"3\",\"4\"],\"two\",{\"o\":\"2\",\"one\":1,\"two\":\"1\",\"three\":true,\"a\":\"0\",\"test\":\"3\",\"array\":\"4\"},{\"test\":\"5\"},[1,2,3],\"OK\"]'\nassert stringify(o) == '[{\"o\":\"0\",\"one\":1,\"two\":\"1\",\"three\":true,\"a\":\"2\",\"test\":\"3\",\"array\":\"4\"},\"two\",[\"2\",1,\"1\",true,\"0\",\"3\",\"4\"],{\"test\":\"5\"},[1,2,3],\"OK\"]'\na2 = parse(stringify(a));\no2 = parse(stringify(o));\nassert a2[0] == a2\nassert o2['o'] == o2\nassert a2[1] == 1 and a2[2] == 'two' and a2[3] == True and isinstance(a2[4], dict)\nassert a2[4] == a2[4]['o'] and a2 == a2[4]['o']['a']\nstr = parse('[{\"prop\":\"1\",\"a\":\"2\",\"b\":\"3\"},{\"value\":123},[\"4\",\"5\"],{\"e\":\"6\",\"t\":\"7\",\"p\":4},{},{\"b\":\"8\"},\"f\",{\"a\":\"9\"},[\"10\"],\"sup\",{\"a\":1,\"d\":2,\"c\":\"7\",\"z\":\"11\",\"h\":1},{\"g\":2,\"a\":\"7\",\"b\":\"12\",\"f\":6},{\"r\":4,\"u\":\"7\",\"c\":5}]')", + "detail": "server.node_modules.flatted.python.test", + "documentation": {} + }, + { + "label": "a2", + "kind": 5, + "importPath": "server.node_modules.flatted.python.test", + "description": "server.node_modules.flatted.python.test", + "peekOfCode": "a2 = parse(stringify(a));\no2 = parse(stringify(o));\nassert a2[0] == a2\nassert o2['o'] == o2\nassert a2[1] == 1 and a2[2] == 'two' and a2[3] == True and isinstance(a2[4], dict)\nassert a2[4] == a2[4]['o'] and a2 == a2[4]['o']['a']\nstr = parse('[{\"prop\":\"1\",\"a\":\"2\",\"b\":\"3\"},{\"value\":123},[\"4\",\"5\"],{\"e\":\"6\",\"t\":\"7\",\"p\":4},{},{\"b\":\"8\"},\"f\",{\"a\":\"9\"},[\"10\"],\"sup\",{\"a\":1,\"d\":2,\"c\":\"7\",\"z\":\"11\",\"h\":1},{\"g\":2,\"a\":\"7\",\"b\":\"12\",\"f\":6},{\"r\":4,\"u\":\"7\",\"c\":5}]')\nassert str['b']['t']['a'] == 'sup' and str['a'][1]['b'][0]['c'] == str['b']['t']\noo = parse('[{\"a\":\"1\",\"b\":\"0\",\"c\":\"2\"},{\"aa\":\"3\"},{\"ca\":\"4\",\"cb\":\"5\",\"cc\":\"6\",\"cd\":\"7\",\"ce\":\"8\",\"cf\":\"9\"},{\"aaa\":\"10\"},{\"caa\":\"4\"},{\"cba\":\"5\"},{\"cca\":\"2\"},{\"cda\":\"4\"},\"value2\",\"value3\",\"value1\"]');\nassert oo['a']['aa']['aaa'] == 'value1' and oo == oo['b'] and oo['c']['ca']['caa'] == oo['c']['ca']", + "detail": "server.node_modules.flatted.python.test", + "documentation": {} + }, + { + "label": "o2", + "kind": 5, + "importPath": "server.node_modules.flatted.python.test", + "description": "server.node_modules.flatted.python.test", + "peekOfCode": "o2 = parse(stringify(o));\nassert a2[0] == a2\nassert o2['o'] == o2\nassert a2[1] == 1 and a2[2] == 'two' and a2[3] == True and isinstance(a2[4], dict)\nassert a2[4] == a2[4]['o'] and a2 == a2[4]['o']['a']\nstr = parse('[{\"prop\":\"1\",\"a\":\"2\",\"b\":\"3\"},{\"value\":123},[\"4\",\"5\"],{\"e\":\"6\",\"t\":\"7\",\"p\":4},{},{\"b\":\"8\"},\"f\",{\"a\":\"9\"},[\"10\"],\"sup\",{\"a\":1,\"d\":2,\"c\":\"7\",\"z\":\"11\",\"h\":1},{\"g\":2,\"a\":\"7\",\"b\":\"12\",\"f\":6},{\"r\":4,\"u\":\"7\",\"c\":5}]')\nassert str['b']['t']['a'] == 'sup' and str['a'][1]['b'][0]['c'] == str['b']['t']\noo = parse('[{\"a\":\"1\",\"b\":\"0\",\"c\":\"2\"},{\"aa\":\"3\"},{\"ca\":\"4\",\"cb\":\"5\",\"cc\":\"6\",\"cd\":\"7\",\"ce\":\"8\",\"cf\":\"9\"},{\"aaa\":\"10\"},{\"caa\":\"4\"},{\"cba\":\"5\"},{\"cca\":\"2\"},{\"cda\":\"4\"},\"value2\",\"value3\",\"value1\"]');\nassert oo['a']['aa']['aaa'] == 'value1' and oo == oo['b'] and oo['c']['ca']['caa'] == oo['c']['ca']\nprint('OK')", + "detail": "server.node_modules.flatted.python.test", + "documentation": {} + }, + { + "label": "str", + "kind": 5, + "importPath": "server.node_modules.flatted.python.test", + "description": "server.node_modules.flatted.python.test", + "peekOfCode": "str = parse('[{\"prop\":\"1\",\"a\":\"2\",\"b\":\"3\"},{\"value\":123},[\"4\",\"5\"],{\"e\":\"6\",\"t\":\"7\",\"p\":4},{},{\"b\":\"8\"},\"f\",{\"a\":\"9\"},[\"10\"],\"sup\",{\"a\":1,\"d\":2,\"c\":\"7\",\"z\":\"11\",\"h\":1},{\"g\":2,\"a\":\"7\",\"b\":\"12\",\"f\":6},{\"r\":4,\"u\":\"7\",\"c\":5}]')\nassert str['b']['t']['a'] == 'sup' and str['a'][1]['b'][0]['c'] == str['b']['t']\noo = parse('[{\"a\":\"1\",\"b\":\"0\",\"c\":\"2\"},{\"aa\":\"3\"},{\"ca\":\"4\",\"cb\":\"5\",\"cc\":\"6\",\"cd\":\"7\",\"ce\":\"8\",\"cf\":\"9\"},{\"aaa\":\"10\"},{\"caa\":\"4\"},{\"cba\":\"5\"},{\"cca\":\"2\"},{\"cda\":\"4\"},\"value2\",\"value3\",\"value1\"]');\nassert oo['a']['aa']['aaa'] == 'value1' and oo == oo['b'] and oo['c']['ca']['caa'] == oo['c']['ca']\nprint('OK')", + "detail": "server.node_modules.flatted.python.test", + "documentation": {} + }, + { + "label": "oo", + "kind": 5, + "importPath": "server.node_modules.flatted.python.test", + "description": "server.node_modules.flatted.python.test", + "peekOfCode": "oo = parse('[{\"a\":\"1\",\"b\":\"0\",\"c\":\"2\"},{\"aa\":\"3\"},{\"ca\":\"4\",\"cb\":\"5\",\"cc\":\"6\",\"cd\":\"7\",\"ce\":\"8\",\"cf\":\"9\"},{\"aaa\":\"10\"},{\"caa\":\"4\"},{\"cba\":\"5\"},{\"cca\":\"2\"},{\"cda\":\"4\"},\"value2\",\"value3\",\"value1\"]');\nassert oo['a']['aa']['aaa'] == 'value1' and oo == oo['b'] and oo['c']['ca']['caa'] == oo['c']['ca']\nprint('OK')", + "detail": "server.node_modules.flatted.python.test", + "documentation": {} + }, + { + "label": "_Known", + "kind": 6, + "importPath": "ui.node_modules.flatted.python.flatted", + "description": "ui.node_modules.flatted.python.flatted", + "peekOfCode": "class _Known:\n def __init__(self):\n self.key = []\n self.value = []\nclass _String:\n def __init__(self, value):\n self.value = value\ndef _array_keys(value):\n keys = []\n i = 0", + "detail": "ui.node_modules.flatted.python.flatted", + "documentation": {} + }, + { + "label": "_String", + "kind": 6, + "importPath": "ui.node_modules.flatted.python.flatted", + "description": "ui.node_modules.flatted.python.flatted", + "peekOfCode": "class _String:\n def __init__(self, value):\n self.value = value\ndef _array_keys(value):\n keys = []\n i = 0\n for _ in value:\n keys.append(i)\n i += 1\n return keys", + "detail": "ui.node_modules.flatted.python.flatted", + "documentation": {} + }, + { + "label": "parse", + "kind": 2, + "importPath": "ui.node_modules.flatted.python.flatted", + "description": "ui.node_modules.flatted.python.flatted", + "peekOfCode": "def parse(value, *args, **kwargs):\n json = _json.loads(value, *args, **kwargs)\n wrapped = []\n for value in json:\n wrapped.append(_wrap(value))\n input = []\n for value in wrapped:\n if isinstance(value, _String):\n input.append(value.value)\n else:", + "detail": "ui.node_modules.flatted.python.flatted", + "documentation": {} + }, + { + "label": "stringify", + "kind": 2, + "importPath": "ui.node_modules.flatted.python.flatted", + "description": "ui.node_modules.flatted.python.flatted", + "peekOfCode": "def stringify(value, *args, **kwargs):\n known = _Known()\n input = []\n output = []\n i = int(_index(known, input, value))\n while i < len(input):\n output.append(_transform(known, input, input[i]))\n i += 1\n return _json.dumps(output, *args, **kwargs)", + "detail": "ui.node_modules.flatted.python.flatted", + "documentation": {} + }, + { + "label": "stringify", + "kind": 2, + "importPath": "ui.node_modules.flatted.python.test", + "description": "ui.node_modules.flatted.python.test", + "peekOfCode": "def stringify(value):\n return _stringify(value, separators=(',', ':'))\nassert stringify([None, None]) == '[[null,null]]'\na = []\no = {}\nassert stringify(a) == '[[]]'\nassert stringify(o) == '[{}]'\na.append(a)\no['o'] = o\nassert stringify(a) == '[[\"0\"]]'", + "detail": "ui.node_modules.flatted.python.test", + "documentation": {} + }, + { + "label": "a", + "kind": 5, + "importPath": "ui.node_modules.flatted.python.test", + "description": "ui.node_modules.flatted.python.test", + "peekOfCode": "a = []\no = {}\nassert stringify(a) == '[[]]'\nassert stringify(o) == '[{}]'\na.append(a)\no['o'] = o\nassert stringify(a) == '[[\"0\"]]'\nassert stringify(o) == '[{\"o\":\"0\"}]'\nb = parse(stringify(a))\nassert isinstance(b, list) and b[0] == b", + "detail": "ui.node_modules.flatted.python.test", + "documentation": {} + }, + { + "label": "o", + "kind": 5, + "importPath": "ui.node_modules.flatted.python.test", + "description": "ui.node_modules.flatted.python.test", + "peekOfCode": "o = {}\nassert stringify(a) == '[[]]'\nassert stringify(o) == '[{}]'\na.append(a)\no['o'] = o\nassert stringify(a) == '[[\"0\"]]'\nassert stringify(o) == '[{\"o\":\"0\"}]'\nb = parse(stringify(a))\nassert isinstance(b, list) and b[0] == b\na.append(1)", + "detail": "ui.node_modules.flatted.python.test", + "documentation": {} + }, + { + "label": "o['o']", + "kind": 5, + "importPath": "ui.node_modules.flatted.python.test", + "description": "ui.node_modules.flatted.python.test", + "peekOfCode": "o['o'] = o\nassert stringify(a) == '[[\"0\"]]'\nassert stringify(o) == '[{\"o\":\"0\"}]'\nb = parse(stringify(a))\nassert isinstance(b, list) and b[0] == b\na.append(1)\na.append('two')\na.append(True)\no['one'] = 1\no['two'] = 'two'", + "detail": "ui.node_modules.flatted.python.test", + "documentation": {} + }, + { + "label": "b", + "kind": 5, + "importPath": "ui.node_modules.flatted.python.test", + "description": "ui.node_modules.flatted.python.test", + "peekOfCode": "b = parse(stringify(a))\nassert isinstance(b, list) and b[0] == b\na.append(1)\na.append('two')\na.append(True)\no['one'] = 1\no['two'] = 'two'\no['three'] = True\nassert stringify(a) == '[[\"0\",1,\"1\",true],\"two\"]'\nassert stringify(o) == '[{\"o\":\"0\",\"one\":1,\"two\":\"1\",\"three\":true},\"two\"]'", + "detail": "ui.node_modules.flatted.python.test", + "documentation": {} + }, + { + "label": "o['one']", + "kind": 5, + "importPath": "ui.node_modules.flatted.python.test", + "description": "ui.node_modules.flatted.python.test", + "peekOfCode": "o['one'] = 1\no['two'] = 'two'\no['three'] = True\nassert stringify(a) == '[[\"0\",1,\"1\",true],\"two\"]'\nassert stringify(o) == '[{\"o\":\"0\",\"one\":1,\"two\":\"1\",\"three\":true},\"two\"]'\na.append(o)\no['a'] = a\nassert stringify(a) == '[[\"0\",1,\"1\",true,\"2\"],\"two\",{\"o\":\"2\",\"one\":1,\"two\":\"1\",\"three\":true,\"a\":\"0\"}]'\nassert stringify(o) == '[{\"o\":\"0\",\"one\":1,\"two\":\"1\",\"three\":true,\"a\":\"2\"},\"two\",[\"2\",1,\"1\",true,\"0\"]]'\na.append({'test': 'OK'})", + "detail": "ui.node_modules.flatted.python.test", + "documentation": {} + }, + { + "label": "o['two']", + "kind": 5, + "importPath": "ui.node_modules.flatted.python.test", + "description": "ui.node_modules.flatted.python.test", + "peekOfCode": "o['two'] = 'two'\no['three'] = True\nassert stringify(a) == '[[\"0\",1,\"1\",true],\"two\"]'\nassert stringify(o) == '[{\"o\":\"0\",\"one\":1,\"two\":\"1\",\"three\":true},\"two\"]'\na.append(o)\no['a'] = a\nassert stringify(a) == '[[\"0\",1,\"1\",true,\"2\"],\"two\",{\"o\":\"2\",\"one\":1,\"two\":\"1\",\"three\":true,\"a\":\"0\"}]'\nassert stringify(o) == '[{\"o\":\"0\",\"one\":1,\"two\":\"1\",\"three\":true,\"a\":\"2\"},\"two\",[\"2\",1,\"1\",true,\"0\"]]'\na.append({'test': 'OK'})\na.append([1, 2, 3])", + "detail": "ui.node_modules.flatted.python.test", + "documentation": {} + }, + { + "label": "o['three']", + "kind": 5, + "importPath": "ui.node_modules.flatted.python.test", + "description": "ui.node_modules.flatted.python.test", + "peekOfCode": "o['three'] = True\nassert stringify(a) == '[[\"0\",1,\"1\",true],\"two\"]'\nassert stringify(o) == '[{\"o\":\"0\",\"one\":1,\"two\":\"1\",\"three\":true},\"two\"]'\na.append(o)\no['a'] = a\nassert stringify(a) == '[[\"0\",1,\"1\",true,\"2\"],\"two\",{\"o\":\"2\",\"one\":1,\"two\":\"1\",\"three\":true,\"a\":\"0\"}]'\nassert stringify(o) == '[{\"o\":\"0\",\"one\":1,\"two\":\"1\",\"three\":true,\"a\":\"2\"},\"two\",[\"2\",1,\"1\",true,\"0\"]]'\na.append({'test': 'OK'})\na.append([1, 2, 3])\no['test'] = {'test': 'OK'}", + "detail": "ui.node_modules.flatted.python.test", + "documentation": {} + }, + { + "label": "o['a']", + "kind": 5, + "importPath": "ui.node_modules.flatted.python.test", + "description": "ui.node_modules.flatted.python.test", + "peekOfCode": "o['a'] = a\nassert stringify(a) == '[[\"0\",1,\"1\",true,\"2\"],\"two\",{\"o\":\"2\",\"one\":1,\"two\":\"1\",\"three\":true,\"a\":\"0\"}]'\nassert stringify(o) == '[{\"o\":\"0\",\"one\":1,\"two\":\"1\",\"three\":true,\"a\":\"2\"},\"two\",[\"2\",1,\"1\",true,\"0\"]]'\na.append({'test': 'OK'})\na.append([1, 2, 3])\no['test'] = {'test': 'OK'}\no['array'] = [1, 2, 3]\nassert stringify(a) == '[[\"0\",1,\"1\",true,\"2\",\"3\",\"4\"],\"two\",{\"o\":\"2\",\"one\":1,\"two\":\"1\",\"three\":true,\"a\":\"0\",\"test\":\"3\",\"array\":\"4\"},{\"test\":\"5\"},[1,2,3],\"OK\"]'\nassert stringify(o) == '[{\"o\":\"0\",\"one\":1,\"two\":\"1\",\"three\":true,\"a\":\"2\",\"test\":\"3\",\"array\":\"4\"},\"two\",[\"2\",1,\"1\",true,\"0\",\"3\",\"4\"],{\"test\":\"5\"},[1,2,3],\"OK\"]'\na2 = parse(stringify(a));", + "detail": "ui.node_modules.flatted.python.test", + "documentation": {} + }, + { + "label": "o['test']", + "kind": 5, + "importPath": "ui.node_modules.flatted.python.test", + "description": "ui.node_modules.flatted.python.test", + "peekOfCode": "o['test'] = {'test': 'OK'}\no['array'] = [1, 2, 3]\nassert stringify(a) == '[[\"0\",1,\"1\",true,\"2\",\"3\",\"4\"],\"two\",{\"o\":\"2\",\"one\":1,\"two\":\"1\",\"three\":true,\"a\":\"0\",\"test\":\"3\",\"array\":\"4\"},{\"test\":\"5\"},[1,2,3],\"OK\"]'\nassert stringify(o) == '[{\"o\":\"0\",\"one\":1,\"two\":\"1\",\"three\":true,\"a\":\"2\",\"test\":\"3\",\"array\":\"4\"},\"two\",[\"2\",1,\"1\",true,\"0\",\"3\",\"4\"],{\"test\":\"5\"},[1,2,3],\"OK\"]'\na2 = parse(stringify(a));\no2 = parse(stringify(o));\nassert a2[0] == a2\nassert o2['o'] == o2\nassert a2[1] == 1 and a2[2] == 'two' and a2[3] == True and isinstance(a2[4], dict)\nassert a2[4] == a2[4]['o'] and a2 == a2[4]['o']['a']", + "detail": "ui.node_modules.flatted.python.test", + "documentation": {} + }, + { + "label": "o['array']", + "kind": 5, + "importPath": "ui.node_modules.flatted.python.test", + "description": "ui.node_modules.flatted.python.test", + "peekOfCode": "o['array'] = [1, 2, 3]\nassert stringify(a) == '[[\"0\",1,\"1\",true,\"2\",\"3\",\"4\"],\"two\",{\"o\":\"2\",\"one\":1,\"two\":\"1\",\"three\":true,\"a\":\"0\",\"test\":\"3\",\"array\":\"4\"},{\"test\":\"5\"},[1,2,3],\"OK\"]'\nassert stringify(o) == '[{\"o\":\"0\",\"one\":1,\"two\":\"1\",\"three\":true,\"a\":\"2\",\"test\":\"3\",\"array\":\"4\"},\"two\",[\"2\",1,\"1\",true,\"0\",\"3\",\"4\"],{\"test\":\"5\"},[1,2,3],\"OK\"]'\na2 = parse(stringify(a));\no2 = parse(stringify(o));\nassert a2[0] == a2\nassert o2['o'] == o2\nassert a2[1] == 1 and a2[2] == 'two' and a2[3] == True and isinstance(a2[4], dict)\nassert a2[4] == a2[4]['o'] and a2 == a2[4]['o']['a']\nstr = parse('[{\"prop\":\"1\",\"a\":\"2\",\"b\":\"3\"},{\"value\":123},[\"4\",\"5\"],{\"e\":\"6\",\"t\":\"7\",\"p\":4},{},{\"b\":\"8\"},\"f\",{\"a\":\"9\"},[\"10\"],\"sup\",{\"a\":1,\"d\":2,\"c\":\"7\",\"z\":\"11\",\"h\":1},{\"g\":2,\"a\":\"7\",\"b\":\"12\",\"f\":6},{\"r\":4,\"u\":\"7\",\"c\":5}]')", + "detail": "ui.node_modules.flatted.python.test", + "documentation": {} + }, + { + "label": "a2", + "kind": 5, + "importPath": "ui.node_modules.flatted.python.test", + "description": "ui.node_modules.flatted.python.test", + "peekOfCode": "a2 = parse(stringify(a));\no2 = parse(stringify(o));\nassert a2[0] == a2\nassert o2['o'] == o2\nassert a2[1] == 1 and a2[2] == 'two' and a2[3] == True and isinstance(a2[4], dict)\nassert a2[4] == a2[4]['o'] and a2 == a2[4]['o']['a']\nstr = parse('[{\"prop\":\"1\",\"a\":\"2\",\"b\":\"3\"},{\"value\":123},[\"4\",\"5\"],{\"e\":\"6\",\"t\":\"7\",\"p\":4},{},{\"b\":\"8\"},\"f\",{\"a\":\"9\"},[\"10\"],\"sup\",{\"a\":1,\"d\":2,\"c\":\"7\",\"z\":\"11\",\"h\":1},{\"g\":2,\"a\":\"7\",\"b\":\"12\",\"f\":6},{\"r\":4,\"u\":\"7\",\"c\":5}]')\nassert str['b']['t']['a'] == 'sup' and str['a'][1]['b'][0]['c'] == str['b']['t']\noo = parse('[{\"a\":\"1\",\"b\":\"0\",\"c\":\"2\"},{\"aa\":\"3\"},{\"ca\":\"4\",\"cb\":\"5\",\"cc\":\"6\",\"cd\":\"7\",\"ce\":\"8\",\"cf\":\"9\"},{\"aaa\":\"10\"},{\"caa\":\"4\"},{\"cba\":\"5\"},{\"cca\":\"2\"},{\"cda\":\"4\"},\"value2\",\"value3\",\"value1\"]');\nassert oo['a']['aa']['aaa'] == 'value1' and oo == oo['b'] and oo['c']['ca']['caa'] == oo['c']['ca']", + "detail": "ui.node_modules.flatted.python.test", + "documentation": {} + }, + { + "label": "o2", + "kind": 5, + "importPath": "ui.node_modules.flatted.python.test", + "description": "ui.node_modules.flatted.python.test", + "peekOfCode": "o2 = parse(stringify(o));\nassert a2[0] == a2\nassert o2['o'] == o2\nassert a2[1] == 1 and a2[2] == 'two' and a2[3] == True and isinstance(a2[4], dict)\nassert a2[4] == a2[4]['o'] and a2 == a2[4]['o']['a']\nstr = parse('[{\"prop\":\"1\",\"a\":\"2\",\"b\":\"3\"},{\"value\":123},[\"4\",\"5\"],{\"e\":\"6\",\"t\":\"7\",\"p\":4},{},{\"b\":\"8\"},\"f\",{\"a\":\"9\"},[\"10\"],\"sup\",{\"a\":1,\"d\":2,\"c\":\"7\",\"z\":\"11\",\"h\":1},{\"g\":2,\"a\":\"7\",\"b\":\"12\",\"f\":6},{\"r\":4,\"u\":\"7\",\"c\":5}]')\nassert str['b']['t']['a'] == 'sup' and str['a'][1]['b'][0]['c'] == str['b']['t']\noo = parse('[{\"a\":\"1\",\"b\":\"0\",\"c\":\"2\"},{\"aa\":\"3\"},{\"ca\":\"4\",\"cb\":\"5\",\"cc\":\"6\",\"cd\":\"7\",\"ce\":\"8\",\"cf\":\"9\"},{\"aaa\":\"10\"},{\"caa\":\"4\"},{\"cba\":\"5\"},{\"cca\":\"2\"},{\"cda\":\"4\"},\"value2\",\"value3\",\"value1\"]');\nassert oo['a']['aa']['aaa'] == 'value1' and oo == oo['b'] and oo['c']['ca']['caa'] == oo['c']['ca']\nprint('OK')", + "detail": "ui.node_modules.flatted.python.test", + "documentation": {} + }, + { + "label": "str", + "kind": 5, + "importPath": "ui.node_modules.flatted.python.test", + "description": "ui.node_modules.flatted.python.test", + "peekOfCode": "str = parse('[{\"prop\":\"1\",\"a\":\"2\",\"b\":\"3\"},{\"value\":123},[\"4\",\"5\"],{\"e\":\"6\",\"t\":\"7\",\"p\":4},{},{\"b\":\"8\"},\"f\",{\"a\":\"9\"},[\"10\"],\"sup\",{\"a\":1,\"d\":2,\"c\":\"7\",\"z\":\"11\",\"h\":1},{\"g\":2,\"a\":\"7\",\"b\":\"12\",\"f\":6},{\"r\":4,\"u\":\"7\",\"c\":5}]')\nassert str['b']['t']['a'] == 'sup' and str['a'][1]['b'][0]['c'] == str['b']['t']\noo = parse('[{\"a\":\"1\",\"b\":\"0\",\"c\":\"2\"},{\"aa\":\"3\"},{\"ca\":\"4\",\"cb\":\"5\",\"cc\":\"6\",\"cd\":\"7\",\"ce\":\"8\",\"cf\":\"9\"},{\"aaa\":\"10\"},{\"caa\":\"4\"},{\"cba\":\"5\"},{\"cca\":\"2\"},{\"cda\":\"4\"},\"value2\",\"value3\",\"value1\"]');\nassert oo['a']['aa']['aaa'] == 'value1' and oo == oo['b'] and oo['c']['ca']['caa'] == oo['c']['ca']\nprint('OK')", + "detail": "ui.node_modules.flatted.python.test", + "documentation": {} + }, + { + "label": "oo", + "kind": 5, + "importPath": "ui.node_modules.flatted.python.test", + "description": "ui.node_modules.flatted.python.test", + "peekOfCode": "oo = parse('[{\"a\":\"1\",\"b\":\"0\",\"c\":\"2\"},{\"aa\":\"3\"},{\"ca\":\"4\",\"cb\":\"5\",\"cc\":\"6\",\"cd\":\"7\",\"ce\":\"8\",\"cf\":\"9\"},{\"aaa\":\"10\"},{\"caa\":\"4\"},{\"cba\":\"5\"},{\"cca\":\"2\"},{\"cda\":\"4\"},\"value2\",\"value3\",\"value1\"]');\nassert oo['a']['aa']['aaa'] == 'value1' and oo == oo['b'] and oo['c']['ca']['caa'] == oo['c']['ca']\nprint('OK')", + "detail": "ui.node_modules.flatted.python.test", + "documentation": {} + }, + { + "label": "get_script_args", + "kind": 2, + "importPath": "web_p.GetInterfaces.get_interfaces", + "description": "web_p.GetInterfaces.get_interfaces", + "peekOfCode": "def get_script_args(cfg):\n args = cfg[\"command\"].split()\n args.append(cfg[\"package\"])\n args.append(cfg[\"executable\"])\n return args\ndef get_topics(filename, path):\n jsonpath = os.path.join(path, filename)\n with NodeStrategy({}) as node:\n topic_names_and_types = get_topic_names_and_types(node=node, include_hidden_topics=False)\n topic_info = []", + "detail": "web_p.GetInterfaces.get_interfaces", + "documentation": {} + }, + { + "label": "get_topics", + "kind": 2, + "importPath": "web_p.GetInterfaces.get_interfaces", + "description": "web_p.GetInterfaces.get_interfaces", + "peekOfCode": "def get_topics(filename, path):\n jsonpath = os.path.join(path, filename)\n with NodeStrategy({}) as node:\n topic_names_and_types = get_topic_names_and_types(node=node, include_hidden_topics=False)\n topic_info = []\n for (topic_name, topic_types) in topic_names_and_types:\n if not topic_name in TOPICS_FILTER:\n topic_info.append({\"name\": topic_name, \"type\": topic_types[0]})\n print(f\"---> number of topics: {len(topic_info)}\")\n j_data = {\"topics\": topic_info}", + "detail": "web_p.GetInterfaces.get_interfaces", + "documentation": {} + }, + { + "label": "OUTPUT_FILE", + "kind": 5, + "importPath": "web_p.GetInterfaces.get_interfaces", + "description": "web_p.GetInterfaces.get_interfaces", + "peekOfCode": "OUTPUT_FILE = \"topics.json\"\nTOPICS_FILTER = [\"/parameter_events\", \"/rosout\"]\ndef get_script_args(cfg):\n args = cfg[\"command\"].split()\n args.append(cfg[\"package\"])\n args.append(cfg[\"executable\"])\n return args\ndef get_topics(filename, path):\n jsonpath = os.path.join(path, filename)\n with NodeStrategy({}) as node:", + "detail": "web_p.GetInterfaces.get_interfaces", + "documentation": {} + }, + { + "label": "TOPICS_FILTER", + "kind": 5, + "importPath": "web_p.GetInterfaces.get_interfaces", + "description": "web_p.GetInterfaces.get_interfaces", + "peekOfCode": "TOPICS_FILTER = [\"/parameter_events\", \"/rosout\"]\ndef get_script_args(cfg):\n args = cfg[\"command\"].split()\n args.append(cfg[\"package\"])\n args.append(cfg[\"executable\"])\n return args\ndef get_topics(filename, path):\n jsonpath = os.path.join(path, filename)\n with NodeStrategy({}) as node:\n topic_names_and_types = get_topic_names_and_types(node=node, include_hidden_topics=False)", + "detail": "web_p.GetInterfaces.get_interfaces", + "documentation": {} + }, + { + "label": "copy_and_move_folder", + "kind": 2, + "importPath": "web_p.blender", + "description": "web_p.blender", + "peekOfCode": "def copy_and_move_folder(src, dst):\n try:\n if os.path.exists(dst):\n shutil.rmtree(dst)\n shutil.copytree(src, dst)\n print(f\"Folder {src} successfully copied\")\n except shutil.Error as e:\n print(f\"Error: {e}\")\nsource_folder = os.path.dirname(os.path.abspath(__file__)) + \"/blender/\"\ncopy_and_move_folder(source_folder, args.path)", + "detail": "web_p.blender", + "documentation": {} + }, + { + "label": "parser", + "kind": 5, + "importPath": "web_p.blender", + "description": "web_p.blender", + "peekOfCode": "parser = argparse.ArgumentParser()\nparser.add_argument(\"--path\")\nargs = parser.parse_args()\ndef copy_and_move_folder(src, dst):\n try:\n if os.path.exists(dst):\n shutil.rmtree(dst)\n shutil.copytree(src, dst)\n print(f\"Folder {src} successfully copied\")\n except shutil.Error as e:", + "detail": "web_p.blender", + "documentation": {} + }, + { + "label": "args", + "kind": 5, + "importPath": "web_p.blender", + "description": "web_p.blender", + "peekOfCode": "args = parser.parse_args()\ndef copy_and_move_folder(src, dst):\n try:\n if os.path.exists(dst):\n shutil.rmtree(dst)\n shutil.copytree(src, dst)\n print(f\"Folder {src} successfully copied\")\n except shutil.Error as e:\n print(f\"Error: {e}\")\nsource_folder = os.path.dirname(os.path.abspath(__file__)) + \"/blender/\"", + "detail": "web_p.blender", + "documentation": {} + }, + { + "label": "source_folder", + "kind": 5, + "importPath": "web_p.blender", + "description": "web_p.blender", + "peekOfCode": "source_folder = os.path.dirname(os.path.abspath(__file__)) + \"/blender/\"\ncopy_and_move_folder(source_folder, args.path)", + "detail": "web_p.blender", + "documentation": {} + }, + { + "label": "copy_and_move_folder", + "kind": 2, + "importPath": "web_p.education", + "description": "web_p.education", + "peekOfCode": "def copy_and_move_folder(src, dst, folder):\n try:\n if os.path.exists(dst + \"/education/\") is False:\n Path(dst + \"/education/\").mkdir(parents=True, exist_ok=True)\n if os.path.exists(dst + \"/education/\" + folder + \"/\"):\n shutil.rmtree(dst + \"/education/\" + folder + \"/\")\n shutil.copytree(src, dst + \"/education/\" + folder + \"/\")\n except shutil.Error as e:\n print(f\"Error: {e}\")\nsource_folder = os.path.dirname(os.path.abspath(__file__)) + \"/education\"", + "detail": "web_p.education", + "documentation": {} + }, + { + "label": "parser", + "kind": 5, + "importPath": "web_p.education", + "description": "web_p.education", + "peekOfCode": "parser = argparse.ArgumentParser()\nparser.add_argument(\"--path\", required=True, help=\"Path for dataset\")\nparser.add_argument(\"--name\", required=True, help=\"String with result weights name\")\nparser.add_argument(\"--datasetName\", required=True, help=\"String with dataset name\")\nparser.add_argument(\"--outpath\", default=\"weights\", help=\"Output path for weights\")\nparser.add_argument(\"--type\", default=\"ObjectDetection\", help=\"Type of implementation\")\nparser.add_argument(\"--epoch\", default=3, help=\"How many training epochs\")\nparser.add_argument('--pretrain', help=\"Use pretraining\")\nargs = parser.parse_args()\ndef copy_and_move_folder(src, dst, folder):", + "detail": "web_p.education", + "documentation": {} + }, + { + "label": "args", + "kind": 5, + "importPath": "web_p.education", + "description": "web_p.education", + "peekOfCode": "args = parser.parse_args()\ndef copy_and_move_folder(src, dst, folder):\n try:\n if os.path.exists(dst + \"/education/\") is False:\n Path(dst + \"/education/\").mkdir(parents=True, exist_ok=True)\n if os.path.exists(dst + \"/education/\" + folder + \"/\"):\n shutil.rmtree(dst + \"/education/\" + folder + \"/\")\n shutil.copytree(src, dst + \"/education/\" + folder + \"/\")\n except shutil.Error as e:\n print(f\"Error: {e}\")", + "detail": "web_p.education", + "documentation": {} + }, + { + "label": "source_folder", + "kind": 5, + "importPath": "web_p.education", + "description": "web_p.education", + "peekOfCode": "source_folder = os.path.dirname(os.path.abspath(__file__)) + \"/education\"\ncopy_and_move_folder(source_folder, args.path, args.name)", + "detail": "web_p.education", + "documentation": {} + }, + { + "label": "copy_and_move_folder", + "kind": 2, + "importPath": "web_p.get_interfaces_mock", + "description": "web_p.get_interfaces_mock", + "peekOfCode": "def copy_and_move_folder(src, dst):\n try:\n if os.path.exists(dst):\n shutil.rmtree(dst)\n shutil.copytree(src, dst)\n print(f\"Folder {src} successfully copied\")\n except shutil.Error as e:\n print(f\"Error: {e}\")\nsource_folder = os.path.dirname(os.path.abspath(__file__)) + \"/interfaces/\"\ncopy_and_move_folder(source_folder, args.path)", + "detail": "web_p.get_interfaces_mock", + "documentation": {} + }, + { + "label": "parser", + "kind": 5, + "importPath": "web_p.get_interfaces_mock", + "description": "web_p.get_interfaces_mock", + "peekOfCode": "parser = argparse.ArgumentParser()\nparser.add_argument(\"--path\")\nargs = parser.parse_args()\ndef copy_and_move_folder(src, dst):\n try:\n if os.path.exists(dst):\n shutil.rmtree(dst)\n shutil.copytree(src, dst)\n print(f\"Folder {src} successfully copied\")\n except shutil.Error as e:", + "detail": "web_p.get_interfaces_mock", + "documentation": {} + }, + { + "label": "args", + "kind": 5, + "importPath": "web_p.get_interfaces_mock", + "description": "web_p.get_interfaces_mock", + "peekOfCode": "args = parser.parse_args()\ndef copy_and_move_folder(src, dst):\n try:\n if os.path.exists(dst):\n shutil.rmtree(dst)\n shutil.copytree(src, dst)\n print(f\"Folder {src} successfully copied\")\n except shutil.Error as e:\n print(f\"Error: {e}\")\nsource_folder = os.path.dirname(os.path.abspath(__file__)) + \"/interfaces/\"", + "detail": "web_p.get_interfaces_mock", + "documentation": {} + }, + { + "label": "source_folder", + "kind": 5, + "importPath": "web_p.get_interfaces_mock", + "description": "web_p.get_interfaces_mock", + "peekOfCode": "source_folder = os.path.dirname(os.path.abspath(__file__)) + \"/interfaces/\"\ncopy_and_move_folder(source_folder, args.path)", + "detail": "web_p.get_interfaces_mock", + "documentation": {} + }, + { + "label": "convert2relative", + "kind": 2, + "importPath": "web_p.renderBOPdataset", + "description": "web_p.renderBOPdataset", + "peekOfCode": "def convert2relative(height, width, bbox):\n \"\"\"\n YOLO format use relative coordinates for annotation\n \"\"\"\n x, y, w, h = bbox\n x += w/2\n y += h/2\n return x/width, y/height, w/width, h/height\ndef render() -> int:\n i = 0", + "detail": "web_p.renderBOPdataset", + "documentation": {} + }, + { + "label": "render", + "kind": 2, + "importPath": "web_p.renderBOPdataset", + "description": "web_p.renderBOPdataset", + "peekOfCode": "def render() -> int:\n i = 0\n for obj in all_meshs:\n # Make the object actively participate in the physics simulation\n obj.enable_rigidbody(active=True, collision_shape=\"COMPOUND\")\n # Also use convex decomposition as collision shapes\n obj.build_convex_decomposition_collision_shape(VHACD_PATH)\n i += 1\n # print(f\"{i} : {obj.get_name()}\")\n objs = all_meshs + rnd_par.scene.objs", + "detail": "web_p.renderBOPdataset", + "documentation": {} + }, + { + "label": "VHACD_PATH", + "kind": 5, + "importPath": "web_p.renderBOPdataset", + "description": "web_p.renderBOPdataset", + "peekOfCode": "VHACD_PATH = \"blenderproc_resources/vhacd\"\nDIR_MODELS = \"models\"\nDIR_MESH = \"assets/libs/objects/\" #\"assets/mesh/\"\nFILE_LOG_SCENE = \"res.txt\"\nFILE_RBS_INFO = \"rbs_info.json\"\nFILE_GT_COCO = \"scene_gt_coco.json\"\nEXT_MODELS = \".fbx\"\nTEXTURE_TMPL = \"*.jpg\"\nNot_Categories_Name = True # наименование категории в COCO-аннотации отсутствует\ndef _get_list_texture(rel_path: str) -> list:", + "detail": "web_p.renderBOPdataset", + "documentation": {} + }, + { + "label": "DIR_MODELS", + "kind": 5, + "importPath": "web_p.renderBOPdataset", + "description": "web_p.renderBOPdataset", + "peekOfCode": "DIR_MODELS = \"models\"\nDIR_MESH = \"assets/libs/objects/\" #\"assets/mesh/\"\nFILE_LOG_SCENE = \"res.txt\"\nFILE_RBS_INFO = \"rbs_info.json\"\nFILE_GT_COCO = \"scene_gt_coco.json\"\nEXT_MODELS = \".fbx\"\nTEXTURE_TMPL = \"*.jpg\"\nNot_Categories_Name = True # наименование категории в COCO-аннотации отсутствует\ndef _get_list_texture(rel_path: str) -> list:\n # local_path/texture/", + "detail": "web_p.renderBOPdataset", + "documentation": {} + }, + { + "label": "DIR_MESH", + "kind": 5, + "importPath": "web_p.renderBOPdataset", + "description": "web_p.renderBOPdataset", + "peekOfCode": "DIR_MESH = \"assets/libs/objects/\" #\"assets/mesh/\"\nFILE_LOG_SCENE = \"res.txt\"\nFILE_RBS_INFO = \"rbs_info.json\"\nFILE_GT_COCO = \"scene_gt_coco.json\"\nEXT_MODELS = \".fbx\"\nTEXTURE_TMPL = \"*.jpg\"\nNot_Categories_Name = True # наименование категории в COCO-аннотации отсутствует\ndef _get_list_texture(rel_path: str) -> list:\n # local_path/texture/\n loc = os.path.dirname(os.path.dirname(rnd_par.output_dir))", + "detail": "web_p.renderBOPdataset", + "documentation": {} + }, + { + "label": "FILE_LOG_SCENE", + "kind": 5, + "importPath": "web_p.renderBOPdataset", + "description": "web_p.renderBOPdataset", + "peekOfCode": "FILE_LOG_SCENE = \"res.txt\"\nFILE_RBS_INFO = \"rbs_info.json\"\nFILE_GT_COCO = \"scene_gt_coco.json\"\nEXT_MODELS = \".fbx\"\nTEXTURE_TMPL = \"*.jpg\"\nNot_Categories_Name = True # наименование категории в COCO-аннотации отсутствует\ndef _get_list_texture(rel_path: str) -> list:\n # local_path/texture/\n loc = os.path.dirname(os.path.dirname(rnd_par.output_dir))\n path = os.path.join(loc, rel_path)", + "detail": "web_p.renderBOPdataset", + "documentation": {} + }, + { + "label": "FILE_RBS_INFO", + "kind": 5, + "importPath": "web_p.renderBOPdataset", + "description": "web_p.renderBOPdataset", + "peekOfCode": "FILE_RBS_INFO = \"rbs_info.json\"\nFILE_GT_COCO = \"scene_gt_coco.json\"\nEXT_MODELS = \".fbx\"\nTEXTURE_TMPL = \"*.jpg\"\nNot_Categories_Name = True # наименование категории в COCO-аннотации отсутствует\ndef _get_list_texture(rel_path: str) -> list:\n # local_path/texture/\n loc = os.path.dirname(os.path.dirname(rnd_par.output_dir))\n path = os.path.join(loc, rel_path)\n return list(Path(path).absolute().rglob(TEXTURE_TMPL))", + "detail": "web_p.renderBOPdataset", + "documentation": {} + }, + { + "label": "FILE_GT_COCO", + "kind": 5, + "importPath": "web_p.renderBOPdataset", + "description": "web_p.renderBOPdataset", + "peekOfCode": "FILE_GT_COCO = \"scene_gt_coco.json\"\nEXT_MODELS = \".fbx\"\nTEXTURE_TMPL = \"*.jpg\"\nNot_Categories_Name = True # наименование категории в COCO-аннотации отсутствует\ndef _get_list_texture(rel_path: str) -> list:\n # local_path/texture/\n loc = os.path.dirname(os.path.dirname(rnd_par.output_dir))\n path = os.path.join(loc, rel_path)\n return list(Path(path).absolute().rglob(TEXTURE_TMPL))\ndef _get_path_model(name_model: str) -> str:", + "detail": "web_p.renderBOPdataset", + "documentation": {} + }, + { + "label": "EXT_MODELS", + "kind": 5, + "importPath": "web_p.renderBOPdataset", + "description": "web_p.renderBOPdataset", + "peekOfCode": "EXT_MODELS = \".fbx\"\nTEXTURE_TMPL = \"*.jpg\"\nNot_Categories_Name = True # наименование категории в COCO-аннотации отсутствует\ndef _get_list_texture(rel_path: str) -> list:\n # local_path/texture/\n loc = os.path.dirname(os.path.dirname(rnd_par.output_dir))\n path = os.path.join(loc, rel_path)\n return list(Path(path).absolute().rglob(TEXTURE_TMPL))\ndef _get_path_model(name_model: str) -> str:\n # TODO on name_model find path for mesh (model.fbx)", + "detail": "web_p.renderBOPdataset", + "documentation": {} + }, + { + "label": "TEXTURE_TMPL", + "kind": 5, + "importPath": "web_p.renderBOPdataset", + "description": "web_p.renderBOPdataset", + "peekOfCode": "TEXTURE_TMPL = \"*.jpg\"\nNot_Categories_Name = True # наименование категории в COCO-аннотации отсутствует\ndef _get_list_texture(rel_path: str) -> list:\n # local_path/texture/\n loc = os.path.dirname(os.path.dirname(rnd_par.output_dir))\n path = os.path.join(loc, rel_path)\n return list(Path(path).absolute().rglob(TEXTURE_TMPL))\ndef _get_path_model(name_model: str) -> str:\n # TODO on name_model find path for mesh (model.fbx)\n # local_path/assets/libs/objects # assets/mesh/", + "detail": "web_p.renderBOPdataset", + "documentation": {} + }, + { + "label": "Not_Categories_Name", + "kind": 5, + "importPath": "web_p.renderBOPdataset", + "description": "web_p.renderBOPdataset", + "peekOfCode": "Not_Categories_Name = True # наименование категории в COCO-аннотации отсутствует\ndef _get_list_texture(rel_path: str) -> list:\n # local_path/texture/\n loc = os.path.dirname(os.path.dirname(rnd_par.output_dir))\n path = os.path.join(loc, rel_path)\n return list(Path(path).absolute().rglob(TEXTURE_TMPL))\ndef _get_path_model(name_model: str) -> str:\n # TODO on name_model find path for mesh (model.fbx)\n # local_path/assets/libs/objects # assets/mesh/\n loc = os.path.dirname(os.path.dirname(rnd_par.output_dir))", + "detail": "web_p.renderBOPdataset", + "documentation": {} + }, + { + "label": "convert2relative", + "kind": 2, + "importPath": "web_p.renderBOPdataset2", + "description": "web_p.renderBOPdataset2", + "peekOfCode": "def convert2relative(height, width, bbox):\n \"\"\"\n YOLO format use relative coordinates for annotation\n \"\"\"\n x, y, w, h = bbox\n x += w/2\n y += h/2\n return x/width, y/height, w/width, h/height\ndef render() -> int:\n i = 0", + "detail": "web_p.renderBOPdataset2", + "documentation": {} + }, + { + "label": "render", + "kind": 2, + "importPath": "web_p.renderBOPdataset2", + "description": "web_p.renderBOPdataset2", + "peekOfCode": "def render() -> int:\n i = 0\n for obj in all_meshs:\n # Make the object actively participate in the physics simulation\n obj.enable_rigidbody(active=True, collision_shape=\"COMPOUND\")\n # Also use convex decomposition as collision shapes\n obj.build_convex_decomposition_collision_shape(VHACD_PATH)\n i += 1\n # print(f\"{i} : {obj.get_name()}\")\n objs = all_meshs + rnd_par.scene.objs", + "detail": "web_p.renderBOPdataset2", + "documentation": {} + }, + { + "label": "VHACD_PATH", + "kind": 5, + "importPath": "web_p.renderBOPdataset2", + "description": "web_p.renderBOPdataset2", + "peekOfCode": "VHACD_PATH = \"blenderproc_resources/vhacd\"\nDIR_MODELS = \"models\"\nDIR_MESH = \"assets/libs/objects/\"\nFILE_LOG_SCENE = \"res.txt\"\nFILE_RBS_INFO = \"rbs_info.json\"\nFILE_GT_COCO = \"scene_gt_coco.json\"\nEXT_MODELS = \".fbx\"\nTEXTURE_TMPL = \"*.jpg\"\nNot_Categories_Name = True # наименование категории в COCO-аннотации отсутствует\ndef _get_list_texture(rel_path: str) -> list:", + "detail": "web_p.renderBOPdataset2", + "documentation": {} + }, + { + "label": "DIR_MODELS", + "kind": 5, + "importPath": "web_p.renderBOPdataset2", + "description": "web_p.renderBOPdataset2", + "peekOfCode": "DIR_MODELS = \"models\"\nDIR_MESH = \"assets/libs/objects/\"\nFILE_LOG_SCENE = \"res.txt\"\nFILE_RBS_INFO = \"rbs_info.json\"\nFILE_GT_COCO = \"scene_gt_coco.json\"\nEXT_MODELS = \".fbx\"\nTEXTURE_TMPL = \"*.jpg\"\nNot_Categories_Name = True # наименование категории в COCO-аннотации отсутствует\ndef _get_list_texture(rel_path: str) -> list:\n # local_path/texture/", + "detail": "web_p.renderBOPdataset2", + "documentation": {} + }, + { + "label": "DIR_MESH", + "kind": 5, + "importPath": "web_p.renderBOPdataset2", + "description": "web_p.renderBOPdataset2", + "peekOfCode": "DIR_MESH = \"assets/libs/objects/\"\nFILE_LOG_SCENE = \"res.txt\"\nFILE_RBS_INFO = \"rbs_info.json\"\nFILE_GT_COCO = \"scene_gt_coco.json\"\nEXT_MODELS = \".fbx\"\nTEXTURE_TMPL = \"*.jpg\"\nNot_Categories_Name = True # наименование категории в COCO-аннотации отсутствует\ndef _get_list_texture(rel_path: str) -> list:\n # local_path/texture/\n loc = os.path.dirname(os.path.dirname(rnd_par.output_dir))", + "detail": "web_p.renderBOPdataset2", + "documentation": {} + }, + { + "label": "FILE_LOG_SCENE", + "kind": 5, + "importPath": "web_p.renderBOPdataset2", + "description": "web_p.renderBOPdataset2", + "peekOfCode": "FILE_LOG_SCENE = \"res.txt\"\nFILE_RBS_INFO = \"rbs_info.json\"\nFILE_GT_COCO = \"scene_gt_coco.json\"\nEXT_MODELS = \".fbx\"\nTEXTURE_TMPL = \"*.jpg\"\nNot_Categories_Name = True # наименование категории в COCO-аннотации отсутствует\ndef _get_list_texture(rel_path: str) -> list:\n # local_path/texture/\n loc = os.path.dirname(os.path.dirname(rnd_par.output_dir))\n path = os.path.join(loc, rel_path)", + "detail": "web_p.renderBOPdataset2", + "documentation": {} + }, + { + "label": "FILE_RBS_INFO", + "kind": 5, + "importPath": "web_p.renderBOPdataset2", + "description": "web_p.renderBOPdataset2", + "peekOfCode": "FILE_RBS_INFO = \"rbs_info.json\"\nFILE_GT_COCO = \"scene_gt_coco.json\"\nEXT_MODELS = \".fbx\"\nTEXTURE_TMPL = \"*.jpg\"\nNot_Categories_Name = True # наименование категории в COCO-аннотации отсутствует\ndef _get_list_texture(rel_path: str) -> list:\n # local_path/texture/\n loc = os.path.dirname(os.path.dirname(rnd_par.output_dir))\n path = os.path.join(loc, rel_path)\n return list(Path(path).absolute().rglob(TEXTURE_TMPL))", + "detail": "web_p.renderBOPdataset2", + "documentation": {} + }, + { + "label": "FILE_GT_COCO", + "kind": 5, + "importPath": "web_p.renderBOPdataset2", + "description": "web_p.renderBOPdataset2", + "peekOfCode": "FILE_GT_COCO = \"scene_gt_coco.json\"\nEXT_MODELS = \".fbx\"\nTEXTURE_TMPL = \"*.jpg\"\nNot_Categories_Name = True # наименование категории в COCO-аннотации отсутствует\ndef _get_list_texture(rel_path: str) -> list:\n # local_path/texture/\n loc = os.path.dirname(os.path.dirname(rnd_par.output_dir))\n path = os.path.join(loc, rel_path)\n return list(Path(path).absolute().rglob(TEXTURE_TMPL))\n# def _get_path_model(name_model: str) -> str:", + "detail": "web_p.renderBOPdataset2", + "documentation": {} + }, + { + "label": "EXT_MODELS", + "kind": 5, + "importPath": "web_p.renderBOPdataset2", + "description": "web_p.renderBOPdataset2", + "peekOfCode": "EXT_MODELS = \".fbx\"\nTEXTURE_TMPL = \"*.jpg\"\nNot_Categories_Name = True # наименование категории в COCO-аннотации отсутствует\ndef _get_list_texture(rel_path: str) -> list:\n # local_path/texture/\n loc = os.path.dirname(os.path.dirname(rnd_par.output_dir))\n path = os.path.join(loc, rel_path)\n return list(Path(path).absolute().rglob(TEXTURE_TMPL))\n# def _get_path_model(name_model: str) -> str:\n# # TODO on name_model find path for mesh (model.fbx)", + "detail": "web_p.renderBOPdataset2", + "documentation": {} + }, + { + "label": "TEXTURE_TMPL", + "kind": 5, + "importPath": "web_p.renderBOPdataset2", + "description": "web_p.renderBOPdataset2", + "peekOfCode": "TEXTURE_TMPL = \"*.jpg\"\nNot_Categories_Name = True # наименование категории в COCO-аннотации отсутствует\ndef _get_list_texture(rel_path: str) -> list:\n # local_path/texture/\n loc = os.path.dirname(os.path.dirname(rnd_par.output_dir))\n path = os.path.join(loc, rel_path)\n return list(Path(path).absolute().rglob(TEXTURE_TMPL))\n# def _get_path_model(name_model: str) -> str:\n# # TODO on name_model find path for mesh (model.fbx)\n# # local_path/assets/libs/objects # assets/mesh/", + "detail": "web_p.renderBOPdataset2", + "documentation": {} + }, + { + "label": "Not_Categories_Name", + "kind": 5, + "importPath": "web_p.renderBOPdataset2", + "description": "web_p.renderBOPdataset2", + "peekOfCode": "Not_Categories_Name = True # наименование категории в COCO-аннотации отсутствует\ndef _get_list_texture(rel_path: str) -> list:\n # local_path/texture/\n loc = os.path.dirname(os.path.dirname(rnd_par.output_dir))\n path = os.path.join(loc, rel_path)\n return list(Path(path).absolute().rglob(TEXTURE_TMPL))\n# def _get_path_model(name_model: str) -> str:\n# # TODO on name_model find path for mesh (model.fbx)\n# # local_path/assets/libs/objects # assets/mesh/\n# loc = os.path.dirname(os.path.dirname(rnd_par.output_dir))", + "detail": "web_p.renderBOPdataset2", + "documentation": {} + }, + { + "label": "copy_and_move_folder", + "kind": 2, + "importPath": "web_p.robot_builder", + "description": "web_p.robot_builder", + "peekOfCode": "def copy_and_move_folder(src, dst):\n try:\n if os.path.exists(dst):\n shutil.rmtree(dst)\n shutil.copytree(src, dst)\n print(f\"Folder {src} successfully copied\")\n except shutil.Error as e:\n print(f\"Error: {e}\")\nsource_folder = os.path.dirname(os.path.abspath(__file__)) + \"/robot_builder/\"\ncopy_and_move_folder(source_folder, args.path + args.name)", + "detail": "web_p.robot_builder", + "documentation": {} + }, + { + "label": "parser", + "kind": 5, + "importPath": "web_p.robot_builder", + "description": "web_p.robot_builder", + "peekOfCode": "parser = argparse.ArgumentParser()\nparser.add_argument(\"--path\")\nparser.add_argument(\"--nDOF\")\nparser.add_argument(\"--toolType\")\nparser.add_argument(\"--name\")\nargs = parser.parse_args()\ndef copy_and_move_folder(src, dst):\n try:\n if os.path.exists(dst):\n shutil.rmtree(dst)", + "detail": "web_p.robot_builder", + "documentation": {} + }, + { + "label": "args", + "kind": 5, + "importPath": "web_p.robot_builder", + "description": "web_p.robot_builder", + "peekOfCode": "args = parser.parse_args()\ndef copy_and_move_folder(src, dst):\n try:\n if os.path.exists(dst):\n shutil.rmtree(dst)\n shutil.copytree(src, dst)\n print(f\"Folder {src} successfully copied\")\n except shutil.Error as e:\n print(f\"Error: {e}\")\nsource_folder = os.path.dirname(os.path.abspath(__file__)) + \"/robot_builder/\"", + "detail": "web_p.robot_builder", + "documentation": {} + }, + { + "label": "source_folder", + "kind": 5, + "importPath": "web_p.robot_builder", + "description": "web_p.robot_builder", + "peekOfCode": "source_folder = os.path.dirname(os.path.abspath(__file__)) + \"/robot_builder/\"\ncopy_and_move_folder(source_folder, args.path + args.name)", + "detail": "web_p.robot_builder", + "documentation": {} + }, + { + "label": "trans_3Dto2D_point_in_camera", + "kind": 2, + "importPath": "web_p.train_Dope", + "description": "web_p.train_Dope", + "peekOfCode": "def trans_3Dto2D_point_in_camera(xyz, K_m, R_m2c, t_m2c):\n \"\"\"\n xyz : 3D-координаты точки\n K_m : внутренняя матрица камеры 3х3\n R_m2c : матрица поворота 3х3\n t_m2c : вектор перемещения 3х1\n return [u,v]\n \"\"\"\n K = np.array(K_m)\n r = np.array(R_m2c)", + "detail": "web_p.train_Dope", + "documentation": {} + }, + { + "label": "gt_parse", + "kind": 2, + "importPath": "web_p.train_Dope", + "description": "web_p.train_Dope", + "peekOfCode": "def gt_parse(path: str, out_dir: str):\n global nn_image\n with open(os.path.join(path, FILE_GT_COCO), \"r\") as fh:\n coco_data = json.load(fh)\n with open(os.path.join(path, FILE_GT), \"r\") as fh:\n gt_data = json.load(fh)\n with open(os.path.join(path, FILE_GT_INFO), \"r\") as fh:\n gt_info = json.load(fh)\n for img in coco_data[\"images\"]:\n rgb_file = os.path.join(path, img[\"file_name\"])", + "detail": "web_p.train_Dope", + "documentation": {} + }, + { + "label": "explore", + "kind": 2, + "importPath": "web_p.train_Dope", + "description": "web_p.train_Dope", + "peekOfCode": "def explore(path: str, res_dir: str):\n if not os.path.isdir(path):\n return\n folders = [\n os.path.join(path, o)\n for o in os.listdir(path)\n if os.path.isdir(os.path.join(path, o))\n ]\n for path_entry in folders:\n if os.path.isfile(os.path.join(path_entry,FILE_GT_COCO)) and \\", + "detail": "web_p.train_Dope", + "documentation": {} + }, + { + "label": "BOP2DOPE_dataset", + "kind": 2, + "importPath": "web_p.train_Dope", + "description": "web_p.train_Dope", + "peekOfCode": "def BOP2DOPE_dataset(dpath: str, out_dir: str) -> str:\n \"\"\" Convert BOP-dataset to YOLO format for train \"\"\"\n res_dir = os.path.join(out_dir, DIR_ROOT_DS)\n if os.path.isdir(res_dir):\n shutil.rmtree(res_dir)\n os.mkdir(res_dir)\n explore(dpath, res_dir)\n return out_dir\ndef train(dopepath:str, wname:str, epochs:int, pretrain: bool, lname: list):\n import random", + "detail": "web_p.train_Dope", + "documentation": {} + }, + { + "label": "train", + "kind": 2, + "importPath": "web_p.train_Dope", + "description": "web_p.train_Dope", + "peekOfCode": "def train(dopepath:str, wname:str, epochs:int, pretrain: bool, lname: list):\n import random\n # try:\n import configparser as configparser\n # except ImportError:\n # import ConfigParser as configparser\n import torch\n # import torch.nn.parallel\n import torch.optim as optim\n import torch.utils.data", + "detail": "web_p.train_Dope", + "documentation": {} + }, + { + "label": "train_Dope_i", + "kind": 2, + "importPath": "web_p.train_Dope", + "description": "web_p.train_Dope", + "peekOfCode": "def train_Dope_i(path:str, wname:str, dname:str, outpath:str, epochs:int, pretrain: bool):\n \"\"\" Main procedure for train DOPE model \"\"\"\n global K_intrinsic, model_info, camera_data, im_width\n if not os.path.isdir(outpath):\n print(f\"Invalid output path '{outpath}'\")\n exit(-1)\n out_dir = os.path.join(outpath, wname)\n ds_path = os.path.join(path, dname)\n if not os.path.isdir(ds_path):\n print(f\"{ds_path} : no BOP directory\")", + "detail": "web_p.train_Dope", + "documentation": {} + }, + { + "label": "FILE_RBS_INFO", + "kind": 5, + "importPath": "web_p.train_Dope", + "description": "web_p.train_Dope", + "peekOfCode": "FILE_RBS_INFO = \"rbs_info.json\"\nFILE_CAMERA = \"camera.json\"\nFILE_GT = \"scene_gt.json\"\nFILE_GT_COCO = \"scene_gt_coco.json\"\nFILE_GT_INFO = \"scene_gt_info.json\"\nFILE_MODEL = \"epoch\"\nEXT_MODEL = \".pth\"\nEXT_RGB = \"jpg\"\nDIR_ROOT_DS = \"dataset_dope\"\nDIR_TRAIN_OUT = \"out_weights\"", + "detail": "web_p.train_Dope", + "documentation": {} + }, + { + "label": "MODEL_SCALE", + "kind": 5, + "importPath": "web_p.train_Dope", + "description": "web_p.train_Dope", + "peekOfCode": "MODEL_SCALE = 1000 # исходная модель в метрах, преобразуем в мм (для DOPE)\n# Own_Numbering_Files = True # наименование image-файлов: собственная нумерация\nnn_image = 0\nK_intrinsic = []\nmodel_info = []\ncamera_data = {}\nim_width = 0\nnb_update_network = 0\n# [\n# [min(x), min(y), min(z)],", + "detail": "web_p.train_Dope", + "documentation": {} + }, + { + "label": "nn_image", + "kind": 5, + "importPath": "web_p.train_Dope", + "description": "web_p.train_Dope", + "peekOfCode": "nn_image = 0\nK_intrinsic = []\nmodel_info = []\ncamera_data = {}\nim_width = 0\nnb_update_network = 0\n# [\n# [min(x), min(y), min(z)],\n# [min(x), max(y), min(z)],\n# [min(x), max(y), max(z)],", + "detail": "web_p.train_Dope", + "documentation": {} + }, + { + "label": "K_intrinsic", + "kind": 5, + "importPath": "web_p.train_Dope", + "description": "web_p.train_Dope", + "peekOfCode": "K_intrinsic = []\nmodel_info = []\ncamera_data = {}\nim_width = 0\nnb_update_network = 0\n# [\n# [min(x), min(y), min(z)],\n# [min(x), max(y), min(z)],\n# [min(x), max(y), max(z)],\n# [min(x), min(y), max(z)],", + "detail": "web_p.train_Dope", + "documentation": {} + }, + { + "label": "model_info", + "kind": 5, + "importPath": "web_p.train_Dope", + "description": "web_p.train_Dope", + "peekOfCode": "model_info = []\ncamera_data = {}\nim_width = 0\nnb_update_network = 0\n# [\n# [min(x), min(y), min(z)],\n# [min(x), max(y), min(z)],\n# [min(x), max(y), max(z)],\n# [min(x), min(y), max(z)],\n# [max(x), min(y), max(z)],", + "detail": "web_p.train_Dope", + "documentation": {} + }, + { + "label": "camera_data", + "kind": 5, + "importPath": "web_p.train_Dope", + "description": "web_p.train_Dope", + "peekOfCode": "camera_data = {}\nim_width = 0\nnb_update_network = 0\n# [\n# [min(x), min(y), min(z)],\n# [min(x), max(y), min(z)],\n# [min(x), max(y), max(z)],\n# [min(x), min(y), max(z)],\n# [max(x), min(y), max(z)],\n# [max(x), max(y), min(z)],", + "detail": "web_p.train_Dope", + "documentation": {} + }, + { + "label": "im_width", + "kind": 5, + "importPath": "web_p.train_Dope", + "description": "web_p.train_Dope", + "peekOfCode": "im_width = 0\nnb_update_network = 0\n# [\n# [min(x), min(y), min(z)],\n# [min(x), max(y), min(z)],\n# [min(x), max(y), max(z)],\n# [min(x), min(y), max(z)],\n# [max(x), min(y), max(z)],\n# [max(x), max(y), min(z)],\n# [max(x), max(y), max(z)],", + "detail": "web_p.train_Dope", + "documentation": {} + }, + { + "label": "nb_update_network", + "kind": 5, + "importPath": "web_p.train_Dope", + "description": "web_p.train_Dope", + "peekOfCode": "nb_update_network = 0\n# [\n# [min(x), min(y), min(z)],\n# [min(x), max(y), min(z)],\n# [min(x), max(y), max(z)],\n# [min(x), min(y), max(z)],\n# [max(x), min(y), max(z)],\n# [max(x), max(y), min(z)],\n# [max(x), max(y), max(z)],\n# [max(x), min(y), max(z)],", + "detail": "web_p.train_Dope", + "documentation": {} + }, + { + "label": "convert2relative", + "kind": 2, + "importPath": "web_p.train_Yolo", + "description": "web_p.train_Yolo", + "peekOfCode": "def convert2relative(height, width, bbox):\n \"\"\" YOLO format use relative coordinates for annotation \"\"\"\n x, y, w, h = bbox\n x += w/2\n y += h/2\n return x/width, y/height, w/width, h/height\ndef gt_parse(path: str, out_dir: str):\n global nn_image, f1, f2\n with open(os.path.join(path, FILE_GT_COCO), \"r\") as fh:\n coco_data = json.load(fh)", + "detail": "web_p.train_Yolo", + "documentation": {} + }, + { + "label": "gt_parse", + "kind": 2, + "importPath": "web_p.train_Yolo", + "description": "web_p.train_Yolo", + "peekOfCode": "def gt_parse(path: str, out_dir: str):\n global nn_image, f1, f2\n with open(os.path.join(path, FILE_GT_COCO), \"r\") as fh:\n coco_data = json.load(fh)\n for img in coco_data[\"images\"]:\n rgb_file = os.path.join(path, img[\"file_name\"])\n if os.path.isfile(rgb_file):\n ext = os.path.splitext(rgb_file)[1] # only ext\n f = f\"{nn_image:06}\"\n out_img = os.path.join(out_dir, DIR_RGB_DS, f + ext)", + "detail": "web_p.train_Yolo", + "documentation": {} + }, + { + "label": "explore", + "kind": 2, + "importPath": "web_p.train_Yolo", + "description": "web_p.train_Yolo", + "peekOfCode": "def explore(path: str, res_dir: str):\n if not os.path.isdir(path):\n return\n folders = [\n os.path.join(path, o)\n for o in os.listdir(path)\n if os.path.isdir(os.path.join(path, o))\n ]\n for path_entry in folders:\n if os.path.isfile(os.path.join(path_entry,FILE_GT_COCO)):", + "detail": "web_p.train_Yolo", + "documentation": {} + }, + { + "label": "BOP2Yolo_dataset", + "kind": 2, + "importPath": "web_p.train_Yolo", + "description": "web_p.train_Yolo", + "peekOfCode": "def BOP2Yolo_dataset(dpath: str, out_dir: str, lname: list) -> str:\n \"\"\" Convert BOP-dataset to YOLO format for train \"\"\"\n cfg_yaml = os.path.join(out_dir, FILE_RBS_TRAIN)\n p = os.path.join(out_dir, DIR_ROOT_DS, DIR_COCO_DS)\n cfg_data = {\"path\": p, \"train\": FILE_L_TRAIN, \"val\": FILE_L_VAL}\n cfg_data[\"names\"] = {i:x for i,x in enumerate(lname)}\n with open(cfg_yaml, \"w\") as fh:\n yaml.dump(cfg_data, fh)\n res_dir = os.path.join(out_dir, DIR_ROOT_DS)\n if not os.path.isdir(res_dir):", + "detail": "web_p.train_Yolo", + "documentation": {} + }, + { + "label": "train_YoloV8", + "kind": 2, + "importPath": "web_p.train_Yolo", + "description": "web_p.train_Yolo", + "peekOfCode": "def train_YoloV8(path:str, wname:str, dname:str, outpath:str, epochs:int, pretrain: bool):\n \"\"\" Main procedure for train YOLOv8 model \"\"\"\n if not os.path.isdir(outpath):\n print(f\"Invalid output path '{outpath}'\")\n exit(-1)\n out_dir = os.path.join(outpath, wname)\n if pretrain:\n # продолжить обучение\n if not os.path.isdir(out_dir):\n print(f\"No dir '{out_dir}'\")", + "detail": "web_p.train_Yolo", + "documentation": {} + }, + { + "label": "FILE_BASEMODEL", + "kind": 5, + "importPath": "web_p.train_Yolo", + "description": "web_p.train_Yolo", + "peekOfCode": "FILE_BASEMODEL = \"yolov8n.pt\"\nFILE_RBS_INFO = \"rbs_info.json\"\nFILE_RBS_TRAIN = \"rbs_train.yaml\"\nFILE_GT_COCO = \"scene_gt_coco.json\"\nFILE_L_TRAIN = \"i_train.txt\"\nFILE_L_VAL = \"i_val.txt\"\nFILE_TRAIN_RES = \"weights/last.pt\"\nDIR_ROOT_DS = \"datasets\"\nDIR_COCO_DS = \"rbs_coco\"\nDIR_RGB_DS = \"images\"", + "detail": "web_p.train_Yolo", + "documentation": {} + }, + { + "label": "FILE_RBS_TRAIN", + "kind": 5, + "importPath": "web_p.train_Yolo", + "description": "web_p.train_Yolo", + "peekOfCode": "FILE_RBS_TRAIN = \"rbs_train.yaml\"\nFILE_GT_COCO = \"scene_gt_coco.json\"\nFILE_L_TRAIN = \"i_train.txt\"\nFILE_L_VAL = \"i_val.txt\"\nFILE_TRAIN_RES = \"weights/last.pt\"\nDIR_ROOT_DS = \"datasets\"\nDIR_COCO_DS = \"rbs_coco\"\nDIR_RGB_DS = \"images\"\nDIR_LABELS_DS = \"labels\"\nSZ_SERIES = 15 # number of train images per validation images", + "detail": "web_p.train_Yolo", + "documentation": {} + }, + { + "label": "FILE_TRAIN_RES", + "kind": 5, + "importPath": "web_p.train_Yolo", + "description": "web_p.train_Yolo", + "peekOfCode": "FILE_TRAIN_RES = \"weights/last.pt\"\nDIR_ROOT_DS = \"datasets\"\nDIR_COCO_DS = \"rbs_coco\"\nDIR_RGB_DS = \"images\"\nDIR_LABELS_DS = \"labels\"\nSZ_SERIES = 15 # number of train images per validation images\nnn_image = 0\nf1 = f2 = None\ndef convert2relative(height, width, bbox):\n \"\"\" YOLO format use relative coordinates for annotation \"\"\"", + "detail": "web_p.train_Yolo", + "documentation": {} + }, + { + "label": "SZ_SERIES", + "kind": 5, + "importPath": "web_p.train_Yolo", + "description": "web_p.train_Yolo", + "peekOfCode": "SZ_SERIES = 15 # number of train images per validation images\nnn_image = 0\nf1 = f2 = None\ndef convert2relative(height, width, bbox):\n \"\"\" YOLO format use relative coordinates for annotation \"\"\"\n x, y, w, h = bbox\n x += w/2\n y += h/2\n return x/width, y/height, w/width, h/height\ndef gt_parse(path: str, out_dir: str):", + "detail": "web_p.train_Yolo", + "documentation": {} + }, + { + "label": "nn_image", + "kind": 5, + "importPath": "web_p.train_Yolo", + "description": "web_p.train_Yolo", + "peekOfCode": "nn_image = 0\nf1 = f2 = None\ndef convert2relative(height, width, bbox):\n \"\"\" YOLO format use relative coordinates for annotation \"\"\"\n x, y, w, h = bbox\n x += w/2\n y += h/2\n return x/width, y/height, w/width, h/height\ndef gt_parse(path: str, out_dir: str):\n global nn_image, f1, f2", + "detail": "web_p.train_Yolo", + "documentation": {} + }, + { + "label": "f1", + "kind": 5, + "importPath": "web_p.train_Yolo", + "description": "web_p.train_Yolo", + "peekOfCode": "f1 = f2 = None\ndef convert2relative(height, width, bbox):\n \"\"\" YOLO format use relative coordinates for annotation \"\"\"\n x, y, w, h = bbox\n x += w/2\n y += h/2\n return x/width, y/height, w/width, h/height\ndef gt_parse(path: str, out_dir: str):\n global nn_image, f1, f2\n with open(os.path.join(path, FILE_GT_COCO), \"r\") as fh:", + "detail": "web_p.train_Yolo", + "documentation": {} + }, + { + "label": "copy_and_move_folder", + "kind": 2, + "importPath": "web_p.train_mock", + "description": "web_p.train_mock", + "peekOfCode": "def copy_and_move_folder(src, dst):\n try:\n if os.path.exists(dst):\n shutil.rmtree(dst)\n shutil.copytree(src, dst)\n print(f\"Folder {src} successfully copied\")\n except shutil.Error as e:\n print(f\"Error: {e}\")\nsource_folder = os.path.dirname(os.path.abspath(__file__)) + \"/train/\"\ncopy_and_move_folder(source_folder, args.path)", + "detail": "web_p.train_mock", + "documentation": {} + }, + { + "label": "parser", + "kind": 5, + "importPath": "web_p.train_mock", + "description": "web_p.train_mock", + "peekOfCode": "parser = argparse.ArgumentParser()\nparser.add_argument(\"--path\")\nparser.add_argument(\"--form\")\nargs = parser.parse_args()\ndef copy_and_move_folder(src, dst):\n try:\n if os.path.exists(dst):\n shutil.rmtree(dst)\n shutil.copytree(src, dst)\n print(f\"Folder {src} successfully copied\")", + "detail": "web_p.train_mock", + "documentation": {} + }, + { + "label": "args", + "kind": 5, + "importPath": "web_p.train_mock", + "description": "web_p.train_mock", + "peekOfCode": "args = parser.parse_args()\ndef copy_and_move_folder(src, dst):\n try:\n if os.path.exists(dst):\n shutil.rmtree(dst)\n shutil.copytree(src, dst)\n print(f\"Folder {src} successfully copied\")\n except shutil.Error as e:\n print(f\"Error: {e}\")\nsource_folder = os.path.dirname(os.path.abspath(__file__)) + \"/train/\"", + "detail": "web_p.train_mock", + "documentation": {} + }, + { + "label": "source_folder", + "kind": 5, + "importPath": "web_p.train_mock", + "description": "web_p.train_mock", + "peekOfCode": "source_folder = os.path.dirname(os.path.abspath(__file__)) + \"/train/\"\ncopy_and_move_folder(source_folder, args.path)", + "detail": "web_p.train_mock", + "documentation": {} + } +] \ No newline at end of file diff --git a/server/src/core/usecases/exec_process_usecase.ts b/server/src/core/usecases/exec_process_usecase.ts index 379e1e2..a6899dc 100644 --- a/server/src/core/usecases/exec_process_usecase.ts +++ b/server/src/core/usecases/exec_process_usecase.ts @@ -73,6 +73,7 @@ export class SpawnProcessUseCase { subprocess.on("close", (code) => { console.log(`Процесс завершился с кодом: ${code}`); }); + return Result.ok('ok'); } catch (error) { return Result.error(error); } diff --git a/server/src/features/calculations_instance/domain/exec_calculations_instance_process_scenario.ts b/server/src/features/calculations_instance/domain/exec_calculations_instance_process_scenario.ts index 9ed9618..e98afc1 100644 --- a/server/src/features/calculations_instance/domain/exec_calculations_instance_process_scenario.ts +++ b/server/src/features/calculations_instance/domain/exec_calculations_instance_process_scenario.ts @@ -15,16 +15,14 @@ export class ExecCalculationInstanceProcessScenario extends CallbackStrategyWith async (model) => { const fileOutPath = model.instancePath.pathNormalize() + "/form.json"; return (await new IsHaveActiveProcessUseCase().call()).map(async () => { - const execCommand = `${ - model.script - } --path ${model.instancePath.pathNormalize()} --form ${fileOutPath}`.replace("\n", ""); - + const execCommand = `${model.script + } --path ${model.instancePath.pathNormalize()} --form ${fileOutPath}`.replace("\n", ""); + await new CreateFileUseCase().call(fileOutPath, Buffer.from(JSON.stringify(model.formBuilder))); await CalculationInstanceDBModel.findById(id).updateOne({ processStatus: "RUN", lastProcessExecCommand: execCommand, }); - new ExecProcessUseCase().call( // @ts-expect-error `${model.project.rootDir}/`, diff --git a/server/src/features/runtime/domain/exec_simulation_usecase.ts b/server/src/features/runtime/domain/exec_simulation_usecase.ts index a2b9824..24837a6 100644 --- a/server/src/features/runtime/domain/exec_simulation_usecase.ts +++ b/server/src/features/runtime/domain/exec_simulation_usecase.ts @@ -14,7 +14,7 @@ export class ExecSimulationUseCase extends CallbackStrategyWithValidationModel { +class ExecAnalyzeScenario extends CallbackStrategyWithIdQuery { + + idValidationExpression: CoreValidation = new MongoIdValidation() + call = async (id: string) => + (await new ReadByIdDataBaseModelUseCase(CalculationInstanceDBModel).call(id)).map(async (model) => + (await new SpawnProcessUseCase().call('/Users/idontsudo/webservice', `nix run github:nixos/nixpkgs#python312Packages.tensorboard -- --logdir ${model.instancePath}`, "", new ProcessWatcher())).map(() => Result.ok('ok'),), + ) +} + +export class RunTimePresentation extends CrudController { constructor() { super({ url: "run_time", @@ -16,6 +32,7 @@ export class RunTimePresentation extends CoreHttpController> { - logs = ""; - delay: number; - constructor(delay: number, pattern: string) { + + constructor() { super(); this.on(this.lister); - setTimeout(() => { - console.log(this.logs); - }, delay); + } lister = (event: Result) => { event.map(async (success) => { - this.logs += success.data; + console.log(success.data) }); }; } diff --git a/server/src/features/scenes/domain/create_robot_scenario.ts b/server/src/features/scenes/domain/create_robot_scenario.ts index 57cb76c..9dc2375 100644 --- a/server/src/features/scenes/domain/create_robot_scenario.ts +++ b/server/src/features/scenes/domain/create_robot_scenario.ts @@ -17,11 +17,7 @@ export class CreateRobotScenario extends CallbackStrategyWithValidationModel { const { rootDir } = projectModel[0]; - console.log( - `python3 $PYTHON_ROBOT_BUILDER --path ${ - projectModel[0].rootDir + "/" + StaticFilesProject.robots + "/" - } --name ${model.name} --nDOF ${model.nDof} --toolType ${model.toolType}` - ); + return new GetServerAddressUseCase().call().map(async (serverAddress) => ( await new ExecProcessUseCase().call( diff --git a/server/src/main.ts b/server/src/main.ts index 1398356..31d168e 100644 --- a/server/src/main.ts +++ b/server/src/main.ts @@ -3,7 +3,8 @@ import { App } from "./core/controllers/app"; import { SocketSubscriber } from "./core/controllers/socket_controller"; import { extensions } from "./core/extensions/extensions"; import { httpRoutes } from "./core/controllers/routes"; -import { executorProgramService } from "./core/usecases/exec_process_usecase"; +import { SpawnProcessUseCase, executorProgramService } from "./core/usecases/exec_process_usecase"; +import { ProcessWatcher } from "./features/runtime/service/process_watcher"; extensions(); diff --git a/ui/src/core/store/base_store.ts b/ui/src/core/store/base_store.ts index 0885e36..b9562f6 100644 --- a/ui/src/core/store/base_store.ts +++ b/ui/src/core/store/base_store.ts @@ -127,16 +127,6 @@ export abstract class FormState extends UiErrorState { this.viewModel = plainToInstance(instance, viewModel); }; } -abstract class Foo { - abstract init?(): void; -} -interface Foo1 { - init?(param1: number | undefined): void; -} -class Bar implements Foo1 {} -export interface LifeCycleStore { - init?(navigate?: NavigateFunction | undefined): void; - dispose?(): void; -} + -class VVV implements LifeCycleStore {} + \ No newline at end of file diff --git a/ui/src/features/calculation_instance/presentation/ui/cards/get_model_card.tsx b/ui/src/features/calculation_instance/presentation/ui/cards/get_model_card.tsx index b5036ec..901029d 100644 --- a/ui/src/features/calculation_instance/presentation/ui/cards/get_model_card.tsx +++ b/ui/src/features/calculation_instance/presentation/ui/cards/get_model_card.tsx @@ -83,7 +83,7 @@ export const getModelCard = ( {match(calculationModel.card ?? "") .with(CardModel.pose_estimate, () => { - return ; + return ; }) .otherwise(() => { return <>; diff --git a/ui/src/features/calculation_instance/presentation/ui/cards/pose_estimate_card/model_card.tsx b/ui/src/features/calculation_instance/presentation/ui/cards/pose_estimate_card/model_card.tsx index a0513b7..f619f93 100644 --- a/ui/src/features/calculation_instance/presentation/ui/cards/pose_estimate_card/model_card.tsx +++ b/ui/src/features/calculation_instance/presentation/ui/cards/pose_estimate_card/model_card.tsx @@ -1,6 +1,12 @@ - +import makeAutoObservable from "mobx-store-inheritance"; +import { ButtonV2 } from "../../../../../../core/ui/button/button_v2"; +import { HttpMethod, HttpRepository } from "../../../../../../core/repository/core_http_repository"; +import { useStore } from "../../../../../../core/helper/use_store"; +import { UiErrorState } from "../../../../../../core/store/base_store"; +import { NavigateFunction } from "react-router-dom"; export interface IModelCardProps { + _id?: string; dependency?: Object; processStatus?: string; name?: string; @@ -16,13 +22,31 @@ export interface IModelCardProps { datasetName?: string; epochNextTraining?: number; } - +export class PoseEstimateRepository extends HttpRepository { + execAnalyze = (id: string) => this._jsonRequest(HttpMethod.POST, `/run_time/exec/analyze?id=${id}`); +} +export class PoseEstimateStore extends UiErrorState { + navigate?: NavigateFunction; + poseEstimateRepository = new PoseEstimateRepository(); + constructor() { + super(); + makeAutoObservable(this); + } + async init(navigate?: NavigateFunction | undefined) { + this.navigate = navigate; + } + onClickExecAnalyze = async (id: string) => + (await this.poseEstimateRepository.execAnalyze(id)).fold( + () => { + setTimeout(() => { + window.open("http://localhost:6006/", "mozillaWindow", "popup"); + }, 3000); + }, + () => {} + ); +} export const PoseEstimateCard = (props: IModelCardProps) => { - return ( -
- ModelCard -
- ); + const store = useStore(PoseEstimateStore); + // @ts-ignore + return store.onClickExecAnalyze(props.dependency._id ?? "")} text="Запустить анализ" />; }; diff --git a/web_p/train/F1_curve.png b/web_p/train/F1_curve.png new file mode 100644 index 0000000..1a4e9ca Binary files /dev/null and b/web_p/train/F1_curve.png differ diff --git a/web_p/train/PR_curve.png b/web_p/train/PR_curve.png new file mode 100644 index 0000000..c961c64 Binary files /dev/null and b/web_p/train/PR_curve.png differ diff --git a/web_p/train/P_curve.png b/web_p/train/P_curve.png new file mode 100644 index 0000000..b62292b Binary files /dev/null and b/web_p/train/P_curve.png differ diff --git a/web_p/train/R_curve.png b/web_p/train/R_curve.png new file mode 100644 index 0000000..757d47e Binary files /dev/null and b/web_p/train/R_curve.png differ diff --git a/web_p/train/args.yaml b/web_p/train/args.yaml new file mode 100644 index 0000000..f69a613 --- /dev/null +++ b/web_p/train/args.yaml @@ -0,0 +1,105 @@ +task: detect +mode: train +model: /home/shalenikol/fork_work/webservice/server/build/public/4c4f3909-74b0-4206-aec1-fc4acd3a1081/weights/od_w01/yolov8n.pt +data: /home/shalenikol/fork_work/webservice/server/build/public/4c4f3909-74b0-4206-aec1-fc4acd3a1081/weights/od_w01/rbs_train.yaml +epochs: 33 +time: null +patience: 50 +batch: 16 +imgsz: 640 +save: true +save_period: -1 +cache: false +device: null +workers: 8 +project: /home/shalenikol/fork_work/webservice/server/build/public/4c4f3909-74b0-4206-aec1-fc4acd3a1081/weights/od_w01 +name: train +exist_ok: false +pretrained: true +optimizer: auto +verbose: true +seed: 0 +deterministic: true +single_cls: false +rect: false +cos_lr: false +close_mosaic: 10 +resume: false +amp: true +fraction: 1.0 +profile: false +freeze: null +multi_scale: false +overlap_mask: true +mask_ratio: 4 +dropout: 0.0 +val: true +split: val +save_json: false +save_hybrid: false +conf: null +iou: 0.7 +max_det: 300 +half: false +dnn: false +plots: true +source: null +vid_stride: 1 +stream_buffer: false +visualize: false +augment: false +agnostic_nms: false +classes: null +retina_masks: false +embed: null +show: false +save_frames: false +save_txt: false +save_conf: false +save_crop: false +show_labels: true +show_conf: true +show_boxes: true +line_width: null +format: torchscript +keras: false +optimize: false +int8: false +dynamic: false +simplify: false +opset: null +workspace: 4 +nms: false +lr0: 0.01 +lrf: 0.01 +momentum: 0.937 +weight_decay: 0.0005 +warmup_epochs: 3.0 +warmup_momentum: 0.8 +warmup_bias_lr: 0.1 +box: 7.5 +cls: 0.5 +dfl: 1.5 +pose: 12.0 +kobj: 1.0 +label_smoothing: 0.0 +nbs: 64 +hsv_h: 0.015 +hsv_s: 0.7 +hsv_v: 0.4 +degrees: 0.0 +translate: 0.1 +scale: 0.5 +shear: 0.0 +perspective: 0.0 +flipud: 0.0 +fliplr: 0.5 +mosaic: 1.0 +mixup: 0.0 +copy_paste: 0.0 +auto_augment: randaugment +erasing: 0.4 +crop_fraction: 1.0 +cfg: null +tracker: botsort.yaml +save_dir: /home/shalenikol/fork_work/webservice/server/build/public/4c4f3909-74b0-4206-aec1-fc4acd3a1081/weights/od_w01/train diff --git a/web_p/train/confusion_matrix.png b/web_p/train/confusion_matrix.png new file mode 100644 index 0000000..24a7fb8 Binary files /dev/null and b/web_p/train/confusion_matrix.png differ diff --git a/web_p/train/confusion_matrix_normalized.png b/web_p/train/confusion_matrix_normalized.png new file mode 100644 index 0000000..29fc07a Binary files /dev/null and b/web_p/train/confusion_matrix_normalized.png differ diff --git a/web_p/train/events.out.tfevents.1732122141.shalenikol-desktop.109110.0 b/web_p/train/events.out.tfevents.1732122141.shalenikol-desktop.109110.0 new file mode 100644 index 0000000..825cfe6 Binary files /dev/null and b/web_p/train/events.out.tfevents.1732122141.shalenikol-desktop.109110.0 differ diff --git a/web_p/train/labels.jpg b/web_p/train/labels.jpg new file mode 100644 index 0000000..b9fb066 Binary files /dev/null and b/web_p/train/labels.jpg differ diff --git a/web_p/train/labels_correlogram.jpg b/web_p/train/labels_correlogram.jpg new file mode 100644 index 0000000..e634e7b Binary files /dev/null and b/web_p/train/labels_correlogram.jpg differ diff --git a/web_p/train/results.csv b/web_p/train/results.csv new file mode 100644 index 0000000..b6231f9 --- /dev/null +++ b/web_p/train/results.csv @@ -0,0 +1,34 @@ + epoch, train/box_loss, train/cls_loss, train/dfl_loss, metrics/precision(B), metrics/recall(B), metrics/mAP50(B), metrics/mAP50-95(B), val/box_loss, val/cls_loss, val/dfl_loss, lr/pg0, lr/pg1, lr/pg2 + 1, 0.62674, 1.281, 0.92555, 0.99239, 0.99448, 0.99323, 0.90966, 0.40212, 0.8264, 0.80447, 0.00066247, 0.00066247, 0.00066247 + 2, 0.60996, 0.71899, 0.93387, 0.9945, 0.99945, 0.99484, 0.91551, 0.43253, 0.60301, 0.8228, 0.0012893, 0.0012893, 0.0012893 + 3, 0.58648, 0.54879, 0.92909, 1, 0.98871, 0.99494, 0.9213, 0.40211, 0.39327, 0.81593, 0.0018761, 0.0018761, 0.0018761 + 4, 0.58195, 0.48301, 0.92375, 0.99087, 0.9337, 0.97172, 0.89393, 0.41614, 0.46785, 0.82069, 0.00182, 0.00182, 0.00182 + 5, 0.56201, 0.44926, 0.92381, 0.99447, 0.99385, 0.99494, 0.94951, 0.34807, 0.32406, 0.8013, 0.00182, 0.00182, 0.00182 + 6, 0.52696, 0.40581, 0.9068, 0.95813, 0.98343, 0.99281, 0.94494, 0.33023, 0.48053, 0.79401, 0.00176, 0.00176, 0.00176 + 7, 0.51017, 0.3952, 0.90752, 0.99889, 1, 0.995, 0.95388, 0.3192, 0.33973, 0.7992, 0.0017, 0.0017, 0.0017 + 8, 0.50772, 0.37889, 0.90238, 0.98351, 0.98842, 0.98581, 0.94918, 0.30154, 0.28504, 0.79667, 0.00164, 0.00164, 0.00164 + 9, 0.47737, 0.3576, 0.89251, 0.99946, 0.99448, 0.995, 0.97205, 0.28135, 0.23642, 0.79101, 0.00158, 0.00158, 0.00158 + 10, 0.46587, 0.34547, 0.89324, 0.99948, 1, 0.995, 0.96897, 0.28021, 0.28522, 0.78694, 0.00152, 0.00152, 0.00152 + 11, 0.45881, 0.33452, 0.89055, 0.99954, 1, 0.995, 0.97012, 0.26364, 0.21443, 0.7813, 0.00146, 0.00146, 0.00146 + 12, 0.44939, 0.32887, 0.89206, 0.9996, 1, 0.995, 0.98382, 0.24486, 0.20614, 0.78109, 0.0014, 0.0014, 0.0014 + 13, 0.44388, 0.32289, 0.88796, 0.99932, 1, 0.995, 0.97195, 0.27681, 0.21443, 0.77933, 0.00134, 0.00134, 0.00134 + 14, 0.43847, 0.31282, 0.88496, 0.99965, 1, 0.995, 0.98019, 0.25014, 0.20255, 0.7775, 0.00128, 0.00128, 0.00128 + 15, 0.41585, 0.30067, 0.8774, 0.99943, 1, 0.995, 0.97609, 0.25842, 0.21239, 0.78006, 0.00122, 0.00122, 0.00122 + 16, 0.41436, 0.29784, 0.87488, 0.99964, 1, 0.995, 0.97823, 0.25499, 0.19837, 0.78004, 0.00116, 0.00116, 0.00116 + 17, 0.414, 0.29771, 0.87575, 0.99943, 1, 0.995, 0.98746, 0.2251, 0.203, 0.77468, 0.0011, 0.0011, 0.0011 + 18, 0.39273, 0.29075, 0.86927, 0.99445, 1, 0.995, 0.98597, 0.22693, 0.19648, 0.77208, 0.00104, 0.00104, 0.00104 + 19, 0.40052, 0.28802, 0.87804, 0.99958, 1, 0.995, 0.98541, 0.22268, 0.18749, 0.77233, 0.00098, 0.00098, 0.00098 + 20, 0.38066, 0.27951, 0.86666, 0.99969, 1, 0.995, 0.98901, 0.20959, 0.1775, 0.7697, 0.00092, 0.00092, 0.00092 + 21, 0.38115, 0.27813, 0.8658, 0.99964, 1, 0.995, 0.98895, 0.20699, 0.1779, 0.77073, 0.00086, 0.00086, 0.00086 + 22, 0.37441, 0.27094, 0.87121, 0.99965, 1, 0.995, 0.98975, 0.20138, 0.17235, 0.76785, 0.0008, 0.0008, 0.0008 + 23, 0.36808, 0.26148, 0.86426, 0.99965, 1, 0.995, 0.98829, 0.19861, 0.1628, 0.76706, 0.00074, 0.00074, 0.00074 + 24, 0.25547, 0.199, 0.77555, 0.99955, 1, 0.995, 0.98791, 0.21853, 0.18063, 0.76972, 0.00068, 0.00068, 0.00068 + 25, 0.24799, 0.1969, 0.78404, 0.99958, 1, 0.995, 0.98812, 0.23069, 0.18178, 0.76985, 0.00062, 0.00062, 0.00062 + 26, 0.24232, 0.1915, 0.78022, 0.99968, 1, 0.995, 0.99024, 0.20883, 0.16788, 0.76752, 0.00056, 0.00056, 0.00056 + 27, 0.23288, 0.1839, 0.77463, 0.99968, 1, 0.995, 0.99151, 0.2026, 0.16501, 0.76809, 0.0005, 0.0005, 0.0005 + 28, 0.23066, 0.18012, 0.77547, 0.99961, 1, 0.995, 0.98912, 0.19388, 0.1534, 0.76246, 0.00044, 0.00044, 0.00044 + 29, 0.22286, 0.17062, 0.77932, 0.9997, 1, 0.995, 0.99039, 0.20566, 0.14978, 0.76601, 0.00038, 0.00038, 0.00038 + 30, 0.21427, 0.16357, 0.77529, 0.9997, 1, 0.995, 0.99215, 0.18345, 0.14148, 0.76206, 0.00032, 0.00032, 0.00032 + 31, 0.20895, 0.16067, 0.77189, 0.9997, 1, 0.995, 0.99187, 0.17027, 0.13746, 0.76124, 0.00026, 0.00026, 0.00026 + 32, 0.20248, 0.15421, 0.77526, 0.9997, 1, 0.995, 0.99246, 0.17229, 0.13828, 0.76056, 0.0002, 0.0002, 0.0002 + 33, 0.19494, 0.15005, 0.76361, 0.99971, 1, 0.995, 0.99302, 0.16442, 0.12543, 0.76043, 0.00014, 0.00014, 0.00014 diff --git a/web_p/train/results.png b/web_p/train/results.png new file mode 100644 index 0000000..1978bab Binary files /dev/null and b/web_p/train/results.png differ diff --git a/web_p/train/train_batch0.jpg b/web_p/train/train_batch0.jpg new file mode 100644 index 0000000..4cb50d7 Binary files /dev/null and b/web_p/train/train_batch0.jpg differ diff --git a/web_p/train/train_batch1.jpg b/web_p/train/train_batch1.jpg new file mode 100644 index 0000000..5a20720 Binary files /dev/null and b/web_p/train/train_batch1.jpg differ diff --git a/web_p/train/train_batch2.jpg b/web_p/train/train_batch2.jpg new file mode 100644 index 0000000..0ccd9f0 Binary files /dev/null and b/web_p/train/train_batch2.jpg differ diff --git a/web_p/train/train_batch3657.jpg b/web_p/train/train_batch3657.jpg new file mode 100644 index 0000000..0f1eac8 Binary files /dev/null and b/web_p/train/train_batch3657.jpg differ diff --git a/web_p/train/train_batch3658.jpg b/web_p/train/train_batch3658.jpg new file mode 100644 index 0000000..615376e Binary files /dev/null and b/web_p/train/train_batch3658.jpg differ diff --git a/web_p/train/train_batch3659.jpg b/web_p/train/train_batch3659.jpg new file mode 100644 index 0000000..0248e7a Binary files /dev/null and b/web_p/train/train_batch3659.jpg differ diff --git a/web_p/train/val_batch0_labels.jpg b/web_p/train/val_batch0_labels.jpg new file mode 100644 index 0000000..bd751a0 Binary files /dev/null and b/web_p/train/val_batch0_labels.jpg differ diff --git a/web_p/train/val_batch0_pred.jpg b/web_p/train/val_batch0_pred.jpg new file mode 100644 index 0000000..aac07e4 Binary files /dev/null and b/web_p/train/val_batch0_pred.jpg differ diff --git a/web_p/train/val_batch1_labels.jpg b/web_p/train/val_batch1_labels.jpg new file mode 100644 index 0000000..23b8ca3 Binary files /dev/null and b/web_p/train/val_batch1_labels.jpg differ diff --git a/web_p/train/val_batch1_pred.jpg b/web_p/train/val_batch1_pred.jpg new file mode 100644 index 0000000..b71a650 Binary files /dev/null and b/web_p/train/val_batch1_pred.jpg differ diff --git a/web_p/train/val_batch2_labels.jpg b/web_p/train/val_batch2_labels.jpg new file mode 100644 index 0000000..353ceea Binary files /dev/null and b/web_p/train/val_batch2_labels.jpg differ diff --git a/web_p/train/val_batch2_pred.jpg b/web_p/train/val_batch2_pred.jpg new file mode 100644 index 0000000..ce2e32f Binary files /dev/null and b/web_p/train/val_batch2_pred.jpg differ diff --git a/web_p/train/weights/best.pt b/web_p/train/weights/best.pt new file mode 100644 index 0000000..943e696 Binary files /dev/null and b/web_p/train/weights/best.pt differ diff --git a/web_p/train/weights/last.pt b/web_p/train/weights/last.pt new file mode 100644 index 0000000..d48d34d Binary files /dev/null and b/web_p/train/weights/last.pt differ diff --git a/web_p/train_mock.py b/web_p/train_mock.py new file mode 100644 index 0000000..15af87a --- /dev/null +++ b/web_p/train_mock.py @@ -0,0 +1,24 @@ +import shutil +import argparse +import os.path + +parser = argparse.ArgumentParser() +parser.add_argument("--path") +parser.add_argument("--form") + +args = parser.parse_args() + + +def copy_and_move_folder(src, dst): + try: + if os.path.exists(dst): + shutil.rmtree(dst) + shutil.copytree(src, dst) + print(f"Folder {src} successfully copied") + except shutil.Error as e: + print(f"Error: {e}") + + +source_folder = os.path.dirname(os.path.abspath(__file__)) + "/train/" + +copy_and_move_folder(source_folder, args.path)