Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change COCO classnames as default needed #149

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pixellib/torchbackend/instance/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __init__(self):
add_pointrend_config(self.cfg)


self.class_names = ["person", "bicycle", "car", "motorcycle", "airplane",
self.class_names = ["person", "bicycle", "car", "motorbike", "aeroplane",
"bus", "train", "truck", "boat", "traffic light", "fire hydrant", "stop sign",
"parking meter", "bench", "bird", "cat", "dog", "horse", "sheep", "cow", "elephant", "bear",
"zebra",
Expand All @@ -42,12 +42,12 @@ def __init__(self):
"tennis racket",
"bottle", "wine glass", "cup", "fork", "knife", "spoon", "bowl", "banana", "apple", "sandwich",
"orange",
"broccoli", "carrot", "hot dog", "pizza", "donut", "cake", "chair", "couch", "potted plant",
"broccoli", "carrot", "hot dog", "pizza", "donut", "cake", "chair", "sofa", "pottedplant",
"bed",
"dining table", "toilet", "tv", "laptop", "mouse", "remote", "keyboard", "cell phone",
"diningtable", "toilet", "tvmonitor", "laptop", "mouse", "remote", "keyboard", "cell phone",
"microwave",
"oven", "toaster", "sink", "refrigerator", "book", "clock", "vase", "scissors", "teddy bear",
"hair dryer",
"hair drier",
"toothbrush"]

def load_model(self, model_path, confidence = None, detection_speed = None, network_backbone = "resnet50"):
Expand Down Expand Up @@ -906,4 +906,4 @@ def display_box_instances(image, boxes, masks, class_ids, class_name, scores, sh
image = cv2.rectangle(image, (x1, y1), (x2, y2), color_rec, box_thickness)
image = cv2.putText(image, caption, (x1, y1), cv2.FONT_HERSHEY_SIMPLEX, text_size, txt_color, text_thickness)

return image
return image