Closed Nethika closed 6 years ago
@Nethika I am also in the same problem. Could you please tell me where to find the keypoints ?
When you download the data, it comes with all the required .mat files.
Hope this helps:
import os
import numpy as np
import cv2
import scipy.io as sio
import scipy.misc as smc
im_path ='C:\\............\\LSUN\\images'
mat ='C:\\............\\LSUN\\training.mat'
data=sio.loadmat(mat)
data=data['training'][0]
Then:
len(data)
is 4000
if we consider the item '0' that is: data[0]
(array(['sun_asmkptxcduixclmd'], dtype='<U20'), array(['hotel_room'], dtype='<U10'), array([[4]], dtype=uint8), array([[ 870.40971168, 1133.83915023], [ 99.5447648 , 1600. ], [ 866.76783005, 0. ], [1200. , 1206.676783 ]]), array([[1600, 1200]], dtype=uint16))
Then,
len(data[0])
is 5
and,
data[0][0]
is the 'name' :
array(['sun_asmkptxcduixclmd'], dtype='<U20')
data[0][1]
is the 'type name':
array(['hotel_room'], dtype='<U10')
data[0][2]
is the 'type':
array([[4]], dtype=uint8)
data[0][3]
is the 'KEY POINTS':
array([[ 870.40971168, 1133.83915023],
[ 99.5447648 , 1600. ],
[ 866.76783005, 0. ],
[1200. , 1206.676783 ]])
data[0][4]
is the 'height and width of image in pixels':
array([[1600, 1200]], dtype=uint16)
I still don't find the .mat file in all my download list. Is the mat file in .zip file or need other download URL?
I still don't find the .mat file in all my download list. Is the mat file in .zip file or need other download URL?
+1
This repo and the related downloading are only for LSUN classification dataset.
found what i needed! Thanks!