df_final <- read.table(text="
ID age_T1 age_group
800289 18 young
800289 18 young
800289 18 young
800289 18 young
800289 18 young
800289 18 young
800289 18 young
800289 18 young
800289 18 young
800289 18 young
800674 40 middle
800674 40 middle
800674 40 middle
800674 40 middle
811434 85 old
811434 85 old
811434 85 old
811434 85 old
811434 85 old
811434 85 old
838623 36 middle
838623 36 middle
838623 36 middle
838623 36 middle
838623 36 middle
801208 21 young
801208 21 young
801299 77 old
801299 77 old
801299 77 old
801299 77 old
801299 77 old
801299 77 old
801299 77 old
823516 16 young
823516 16 young
823516 16 young
823516 16 young
823516 16 young
823516 16 young
823516 16 young
823516 16 young
823516 16 young
823516 16 young
855510 77 old
855510 77 old
855510 77 old
855510 77 old
855510 77 old
855510 77 old
855510 77 old
820870 39 middle
820870 39 middle
820870 39 middle
820870 39 middle
800796 88 old
800796 88 old
800796 88 old
800796 88 old
800796 88 old
800796 88 old
800958 37 middle
800958 37 middle
800958 37 middle
800958 37 middle
800958 37 middle
836587 18 young
836587 18 young", header=TRUE)
我正在使用:
并且我授予了Eclipse管理员权限。
self.PATH_TO_CKPT = 'output_graph.pb'
self.PATH_TO_LABELS = 'output_labels.txt'
self.NUM_CLASSES = 1
self.detection_graph = self._load_model()
self.category_index = self._load_label_map()
def _load_model(self):
detection_graph = tf.Graph()
with detection_graph.as_default():
od_graph_def = tf.GraphDef()
with tf.gfile.GFile(self.PATH_TO_CKPT, 'rb') as fid:
serialized_graph = fid.read()
od_graph_def.ParseFromString(serialized_graph)
tf.import_graph_def(od_graph_def, name='')
return detection_graph