Python影像辨識筆記(三十一):Zero-Shot Classification — CADA-VAE-PyTorch

介紹

Generalized Zero- and Few-Shot Learning via Aligned Variational Autoencoders的程式碼實現

安裝

官方建議的套件版本

torch==0.4.1
numpy==1.14.3
scipy==1.1.0
scikit_learn==0.20.3
networkx==1.11

建議使用conda建立虛擬環境,避免與原本的環境衝突

git clone https://github.com/edgarschnfld/CADA-VAE-PyTorchcd CADA-VAE-PyTorchpip install -r requirements.txtmkdir data && cd datawget -O data https://www.dropbox.com/sh/btoc495ytfbnbat/AAAaurkoKnnk0uV-swgF-gdSa?dl=1

訓練

python single_experiment.py --dataset CUB --num_shots 0 --generalized True# 可使用的參數:
datasets: CUB, SUN, AWA1, AWA2
num_shots: any number
generalized: True, False

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store