-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
code cleanup, example errors fixed of library changes
- Loading branch information
1 parent
99935d7
commit 9d59720
Showing
13 changed files
with
44 additions
and
125 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
??? | ||
person | ||
bicycle | ||
car | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
??? | ||
cat | ||
dog | ||
monkey | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,98 +1,7 @@ | ||
coco_category_index = { | ||
1: {"id": 1, "name": "person"}, | ||
2: {"id": 2, "name": "bicycle"}, | ||
3: {"id": 3, "name": "car"}, | ||
4: {"id": 4, "name": "motorcycle"}, | ||
5: {"id": 5, "name": "airplane"}, | ||
6: {"id": 6, "name": "bus"}, | ||
7: {"id": 7, "name": "train"}, | ||
8: {"id": 8, "name": "truck"}, | ||
9: {"id": 9, "name": "boat"}, | ||
10: {"id": 10, "name": "traffic light"}, | ||
11: {"id": 11, "name": "fire hydrant"}, | ||
13: {"id": 13, "name": "stop sign"}, | ||
14: {"id": 14, "name": "parking meter"}, | ||
15: {"id": 15, "name": "bench"}, | ||
16: {"id": 16, "name": "bird"}, | ||
17: {"id": 17, "name": "cat"}, | ||
18: {"id": 18, "name": "dog"}, | ||
19: {"id": 19, "name": "horse"}, | ||
20: {"id": 20, "name": "sheep"}, | ||
21: {"id": 21, "name": "cow"}, | ||
22: {"id": 22, "name": "elephant"}, | ||
23: {"id": 23, "name": "bear"}, | ||
24: {"id": 24, "name": "zebra"}, | ||
25: {"id": 25, "name": "giraffe"}, | ||
27: {"id": 27, "name": "backpack"}, | ||
28: {"id": 28, "name": "umbrella"}, | ||
31: {"id": 31, "name": "handbag"}, | ||
32: {"id": 32, "name": "tie"}, | ||
33: {"id": 33, "name": "suitcase"}, | ||
34: {"id": 34, "name": "frisbee"}, | ||
35: {"id": 35, "name": "skis"}, | ||
36: {"id": 36, "name": "snowboard"}, | ||
37: {"id": 37, "name": "sports ball"}, | ||
38: {"id": 38, "name": "kite"}, | ||
39: {"id": 39, "name": "baseball bat"}, | ||
40: {"id": 40, "name": "baseball glove"}, | ||
41: {"id": 41, "name": "skateboard"}, | ||
42: {"id": 42, "name": "surfboard"}, | ||
43: {"id": 43, "name": "tennis racket"}, | ||
44: {"id": 44, "name": "bottle"}, | ||
46: {"id": 46, "name": "wine glass"}, | ||
47: {"id": 47, "name": "cup"}, | ||
48: {"id": 48, "name": "fork"}, | ||
49: {"id": 49, "name": "knife"}, | ||
50: {"id": 50, "name": "spoon"}, | ||
51: {"id": 51, "name": "bowl"}, | ||
52: {"id": 52, "name": "banana"}, | ||
53: {"id": 53, "name": "apple"}, | ||
54: {"id": 54, "name": "sandwich"}, | ||
55: {"id": 55, "name": "orange"}, | ||
56: {"id": 56, "name": "broccoli"}, | ||
57: {"id": 57, "name": "carrot"}, | ||
58: {"id": 58, "name": "hot dog"}, | ||
59: {"id": 59, "name": "pizza"}, | ||
60: {"id": 60, "name": "donut"}, | ||
61: {"id": 61, "name": "cake"}, | ||
62: {"id": 62, "name": "chair"}, | ||
63: {"id": 63, "name": "couch"}, | ||
64: {"id": 64, "name": "potted plant"}, | ||
65: {"id": 65, "name": "bed"}, | ||
67: {"id": 67, "name": "dining table"}, | ||
70: {"id": 70, "name": "toilet"}, | ||
72: {"id": 72, "name": "tv"}, | ||
73: {"id": 73, "name": "laptop"}, | ||
74: {"id": 74, "name": "mouse"}, | ||
75: {"id": 75, "name": "remote"}, | ||
76: {"id": 76, "name": "keyboard"}, | ||
77: {"id": 77, "name": "cell phone"}, | ||
78: {"id": 78, "name": "microwave"}, | ||
79: {"id": 79, "name": "oven"}, | ||
80: {"id": 80, "name": "toaster"}, | ||
81: {"id": 81, "name": "sink"}, | ||
82: {"id": 82, "name": "refrigerator"}, | ||
84: {"id": 84, "name": "book"}, | ||
85: {"id": 85, "name": "clock"}, | ||
86: {"id": 86, "name": "vase"}, | ||
87: {"id": 87, "name": "scissors"}, | ||
88: {"id": 88, "name": "teddy bear"}, | ||
89: {"id": 89, "name": "hair drier"}, | ||
90: {"id": 90, "name": "toothbrush"}, | ||
} | ||
|
||
security_cam_category_index = { | ||
1: {"id": 1, "name": "cat"}, | ||
2: {"id": 2, "name": "dog"}, | ||
3: {"id": 3, "name": "monkey"}, | ||
4: {"id": 4, "name": "person"}, | ||
} | ||
|
||
|
||
def read_label_pbtxt(label_path: str) -> dict: | ||
with open(label_path, "r") as label_file: | ||
lines = label_file.readlines() | ||
labels = {} | ||
for row, content in enumerate(lines): | ||
labels[row + 1] = {"id": row + 1, "name": content.strip()} | ||
labels[row] = {"id": row, "name": content.strip()} | ||
return labels |
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
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