Closed VisualJoyce closed 3 years ago
Closing this because I checked the API im_detect
, im
should be BGR order:
def im_detect(net, im, boxes):
"""Detect object classes in an image given object proposals.
Arguments:
net (caffe.Net): Fast R-CNN network to use
im (ndarray): color image to test (in BGR order)
boxes (ndarray): R x 4 array of object proposals
Returns:
scores (ndarray): R x K array of object class scores (K includes
background as object category 0)
boxes (ndarray): R x (4*K) array of predicted bounding boxes
"""
In the feature extraction code, I notice that although
Image
is used to getimg
, butim
read fromcv2
is used later. It's confusing thatimg = Image.open(im_file).convert('RGB')
is used, but nocv2.cvtColor(im_cv, cv2.COLOR_BGR2RGB)
.So, is RGB or BGR that we need to use for this step?