Skip to content

Boyifyoudontstop/csce452_project3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Completing this project successfully will hinge on:

Getting the detection correct

In person_detector.py:

Parameters for person detection

    self.cluster_distance = 0.01  # Distance between points in a cluster
    self.min_cluster_size = 6    # Minimum points to be considered a person
    self.max_cluster_size = 125 # Maximum points to be considered a person

need to be changed

def filter_person_clusters(self, clusters): person_clusters = []

    for cluster in clusters:
        # Calculate cluster properties
        cluster_size = len(cluster)
        if not (self.min_cluster_size <= cluster_size <= self.max_cluster_size):
            continue
            
        min_x, min_y = np.min(cluster, axis=0)
        max_x, max_y = np.max(cluster, axis=0)
        width = max_x - min_x
        depth = max_y - min_y
        
        area = width * depth
        density = cluster_size / area if area > 0 else 0
        aspect_ratio = width / depth if depth > 0 else 0
        
        is_person = (
            (0.1 <= width <= 0.8) or (0.1 <= depth <= 0.8) #and
            #not (width > 3 or depth > 3)                   
            #0.6 <= aspect_ratio <= 3   # People are roughly circular/oval in lidar view
            #density >= 100 and              # Dense enough to be a person
            #cluster_size >= self.min_cluster_size and  # Minimum size check
            #cluster_size <= self.max_cluster_size      # Maximum size check
        )
        
        if is_person:
            person_clusters.append(cluster)
            print("density: ",density)
    
    return person_clusters

the logic here needs to improve. I am close but not quite, I either detect nothing or the person + false positives from the wall

Releases

No releases published

Packages

No packages published