annotations = response[self.response_object]
values = self._parse_annotations(stim[i], annotations)
onset = stim[i].onset if hasattr(stim[i], "onset") else i
ev = Event(onset=onset, duration=stim[i].duration, values=values)
events.append(ev)
else:
events.append(Event())
After Change
request = self._build_request(stim)
responses = self._query_api(request)
features = []
data = []
for i, response in enumerate(responses):
if response:
annotations = response[self.response_object]
feat, values = self._parse_annotations(annotations)
features += feat
data += values
data = [data]
onsets = [stim[i].onset if hasattr(stim[i], "onset") else i for i in range(len(responses))]
durations = [stim[i].duration for i in range(len(responses))]
return ExtractorResult(data, stim, self, features=features,
onsets=onsets, durations=durations)
class GoogleVisionAPIFaceExtractor(GoogleVisionAPIExtractor):