-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
29 lines (25 loc) · 742 Bytes
/
main.py
File metadata and controls
29 lines (25 loc) · 742 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# -*- coding: utf-8 -*-
"""
Created on Wed Dec 16 13:45:42 2020
@author: Zixiang Zhao (zixiangzhao@stu.xjtu.edu.cn)
Python implement for "Clustering by Scale-Space Filtering" (IEEE TPAMI 2000)
https://ieeexplore.ieee.org/document/895974
"""
import sklearn.datasets
import matplotlib.pyplot as plt
import numpy as np
import imageio
import os
import cv2
from SSF import main_SSF
Data_general, Data_labels = sklearn.datasets.make_blobs(
n_samples=300,
n_features=2,
centers=20,
cluster_std=0.05,
random_state=0,
center_box=(-1, 1))
# sigma初始化的值
Gaussian_sigma_set=0.05
# SSF计算输出lifetime, sigma, 类中心
clusterCenterList,chooseSigma,chooseClusterCenter=main_SSF(Data_general,Gaussian_sigma_set)