像这种.mat文件如何读取呢?
法一 pycharm
使用的代码:
from scipy.io import loadmat
features_struct = loadmat('C:/Datasets/102 Category Flower/setid.mat' )
print(features_struct)
显示效果:
C:\Users\XX\.conda\envs\MNIST\python.exe C:\Users\XX\Desktop\MNIST\loadmat.py
{'__header__': b'MATLAB 5.0 MAT-file, Platform: GLNX86, Created on: Thu Feb 19 17:38:58 2009', '__version__': '1.0', '__globals__': [], 'trnid': array([[6765, 6755, 6768, ..., 8026, 8036, 8041]], dtype=uint16), 'valid': array([[6773, 6767, 6739, ..., 8028, 8008, 8030]], dtype=uint16), 'tstid': array([[6734, 6735, 6737, ..., 8044, 8045, 8047]], dtype=uint16)}
Process finished with exit code 0
不太好看。
法二 matlab
用matlab打开