botcs / emotion-style Goto Github PK
View Code? Open in Web Editor NEWTransfer style based on recognized emotion features
License: GNU General Public License v3.0
Transfer style based on recognized emotion features
License: GNU General Public License v3.0
Hi, I used your data_loader.py to get the full_path and gender information. I want to split the imdb_crop into female and male folder. But it seems to be wrong. The code lists as follows:
def load_imdbmat():
dataset = loadmat('./imdb_crop/imdb.mat')
fid=open('imdb.txt','w')
face_score_threshold=3
image_names_array = dataset['imdb']['full_path'][0, 0][0]
gender_classes = dataset['imdb']['gender'][0, 0][0]
face_score = dataset['imdb']['face_score'][0, 0][0]
second_face_score = dataset['imdb']['second_face_score'][0, 0][0]
face_score_mask = face_score > face_score_threshold
second_face_score_mask = np.isnan(second_face_score)
unknown_gender_mask = np.logical_not(np.isnan(gender_classes))
mask = np.logical_and(face_score_mask, second_face_score_mask)
mask = np.logical_and(mask, unknown_gender_mask)
image_names_array = image_names_array[mask]
gender_classes = gender_classes[mask].tolist()
image_names = []
for image_name_arg in range(image_names_array.shape[0]):
image_name = image_names_array[image_name_arg][0]
image_names.append(image_name)
#print 'image_names:',len(image_names)
#print 'gender:',len(gender_classes)
for img_name,gender in zip(image_names,gender_classes):
line=img_name+" "+str(int(gender))+"\n"
fid.writelines(line)
print 'done'
The code above can run, but get an error result. It can't split the gender. Any help will be appreciated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.