sift-flow数据集


图像语义分割与几何语义分割数据集

下载该数据集:

wget www.cs.unc.edu/~jtighe/Papers/ECCV10/siftflow/SiftFlowDataset.zip

里面有2688张图像,其类别信息如下:


Semantic and geometric segmentation classes for scenes.

Semantic: 0 is void and 1–33 are classes.

01 awning
02 balcony
03 bird
04 boat
05 bridge
06 building
07 bus
08 car
09 cow
10 crosswalk
11 desert
12 door
13 fence
14 field
15 grass
16 moon
17 mountain
18 person
19 plant
20 pole
21 river
22 road
23 rock
24 sand
25 sea
26 sidewalk
27 sign
28 sky
29 staircase
30 streetlight
31 sun
32 tree
33 window

Geometric: -1 is void and 1–3 are classes.

01 sky
02 horizontal
03 vertical

N.B. Three classes (cow, desert, and moon) are absent from the test set, so
they are excluded from evaluation. The highway_bost181 and street_urb506 images
are missing annotations so these are likewise excluded from evaluation.


  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 6
    评论
SIFT-RANSAC算法是一种图像配准算法,可以用于在两幅图像中找到相同区域。下面是使用Python实现SIFT-RANSAC算法的步骤: 1.导入必要的库 ```python import cv2 import numpy as np from scipy.spatial import distance from collections import Counter ``` 2.加载图像 ```python img1 = cv2.imread('image1.jpg', cv2.IMREAD_GRAYSCALE) img2 = cv2.imread('image2.jpg', cv2.IMREAD_GRAYSCALE) ``` 3.提取SIFT特征 ```python sift = cv2.xfeatures2d.SIFT_create() kp1, des1 = sift.detectAndCompute(img1, None) kp2, des2 = sift.detectAndCompute(img2, None) ``` 4.特征匹配 ```python bf = cv2.BFMatcher() matches = bf.knnMatch(des1, des2, k=2) ``` 5.筛选好的匹配点 ```python good = [] for m, n in matches: if m.distance < 0.75 * n.distance: good.append(m) ``` 6.使用RANSAC算法进行配准 ```python MIN_MATCH_COUNT = 10 if len(good) > MIN_MATCH_COUNT: src_pts = np.float32([kp1[m.queryIdx].pt for m in good]).reshape(-1, 1, 2) dst_pts = np.float32([kp2[m.trainIdx].pt for m in good]).reshape(-1, 1, 2) M, mask = cv2.findHomography(src_pts, dst_pts, cv2.RANSAC, 5.0) matchesMask = mask.ravel().tolist() else: print("Not enough matches are found - {}/{}".format(len(good), MIN_MATCH_COUNT)) matchesMask = None ``` 7.计算匹配点的正确率 ```python if matchesMask is not None: distances = [] for i in range(len(good)): if matchesMask[i] == 1: pt1 = src_pts[i][0] pt2 = dst_pts[i][0] distances.append(distance.euclidean(pt1, pt2)) correct_ratio = Counter(distances).most_common()[0][1] / len(distances) print("Correct Ratio: {:.2f}%".format(correct_ratio * 100)) ``` 以上是使用Python实现SIFT-RANSAC算法的步骤,其中RANSAC算法可以有效地筛选出正确的匹配点,提高匹配的准确率。
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值