medvqa's People
medvqa's Issues
Data Folder NOT available
There is supposed to be a Data
directory which probably has the pretrained models e.g. ../Data\resnet152\train_fc7.h5
.
But this is NOT available in the files and folders present in the repository and hence, we cannot run the code.
Usage:
def load_image_features(data_dir='../Data', model='resnet152', split='Train'):
fc7_features = None
image_id_list = None
with h5py.File( join( join(data_dir, model), (split + '_fc7.h5')),'r') as hf:
fc7_features = np.array(hf.get('fc7_features'))
with h5py.File( join( join(data_dir, model), (split + '_image_id_list.h5')),'r') as hf:
image_id_list = np.array(hf.get('image_id_list'))
image_id_list = [id.decode('UTF-8') for id in image_id_list]
return fc7_features, image_id_list
def load_ques_embed(data_dir='../Data', model='bert', split='train', cat='allQA'):
embeddings = None
image_id_list = None
cat_name = ""
if(cat=='allQA'):
cat_name = '_All_QA_Pairs_'
elif(cat=='cat1'):
cat_name = '_C1_Modality_'
elif(cat=='cat2'):
cat_name = '_C2_Plane_'
elif(cat=='cat3'):
cat_name = '_C3_Organ_'
else:
cat_name = '_C4_Abnormality_'
root_path = join(join(join(data_dir, model), cat))
with h5py.File( join( root_path, (split + cat_name +split+'_embed.h5')),'r') as hf:
embeddings = np.array(hf.get('embedding'))
with h5py.File( join( root_path, (split + cat_name +split+'_image_id_list.h5')),'r') as hf:
image_id_list = np.array(hf.get('image_id_list'))
image_id_list = [id.decode('UTF-8') for id in image_id_list]
return embeddings, image_id_list
Pls. update the code by providing the Data
directory or if you could share a drive link for the above said folder.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.