Closed vinci-xiao closed 5 days ago
I think you need to check the settings that are being passed into filtered detections. it seems that all your detections are being filtered out so its returning none. can you check how many detections there are before the filtering?
Hi all, hope you are doing well so far. Regarding this issue, it will happen with indoor scene as well if there is no object detected in a frame. In this case, filtered_detection will be an empty list. Below is my solution
# Accounting for the case when there is no detection in the image
if len(filtered_detections) != 0:
# Unzip the filtered results
confidences, class_ids, xyxy, masks, indices = zip(*filtered_detections)
filtered_labels = [given_labels[i] for i in indices]
# Create new detections object
filtered_detections = sv.Detections(
class_id=np.array(class_ids, dtype=np.int64),
confidence=np.array(confidences, dtype=np.float32),
xyxy=np.array(xyxy, dtype=np.float32),
mask=np.array(masks, dtype=np.bool_)
)
else:
# No filter
filtered_detections = detections
filtered_labels = given_labels
At the end of filter_detections function in general_utils.py, I added a condition to check if the filtered_detection is empty. If it is, then we will assign it to the input detections.
I found this issue and the proposed change have already been included in PR #68. So I'm closing this issue for now.
I got the map preprocessed successfully but got the following error while I was running "rerun_realtime_mapping.py"
Is there any chance to adjust some parameters to get thing works? or I simply shouldn't use it for outdoor scenarios.