Apparently, this still isn't possible in v12?
I'd like to add a new class to one of the standard object detection architectures. Consider the YOLO v2 detector from the Neural Net Repo.
NetModel["YOLO V2 Trained on MS-COCO Data"]
Which currently has 80 classes:
labels = {"person", "bicycle", "car", "motorcycle", "airplane", "bus",
"train", "truck", "boat", "traffic light", "fire hydrant",
"stop sign", "parking meter", "bench", "bird", "cat", "dog",
"horse", "sheep", "cow", "elephant", "bear", "zebra", "giraffe",
"backpack", "umbrella", "handbag", "tie", "suitcase", "frisbee",
"skis", "snowboard", "sports ball", "kite", "baseball bat",
"baseball glove", "skateboard", "surfboard", "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", "bed", "dining table", "toilet", "tv", "laptop",
"mouse", "remote", "keyboard", "cell phone", "microwave", "oven",
"toaster", "sink", "refrigerator", "book", "clock", "vase",
"scissors", "teddy bear", "hair drier", "toothbrush"};
As a minimal workable example, here is a toy set of training data for an additional class 'Fish', consisting of image and bounding-box coordinate pairs:
{fish, bboxes} =
CloudGet @ CloudObject[
"https://www.wolframcloud.com/objects/9c57ab39-52e2-40d3-84e6-80c9ee9a42a4"];
HighlightImage[fish[[1]], Rectangle @@ bboxes[[1]]]
Unfortunately, I can't find any information on the training net:
If I have to, I can download the original training data:
I also looked on the community but couldn't find any guidance for NetTrain
'ing bounding box detection networks.
References: