Improved Graph-Based Clustering With Applications In Computer Vision And Behavior Analysis