create_fashion_tf_record.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:CRF-image-segmentation 作者: therealnidhin 项目源码 文件源码
def get_class_name_from_filename(file_name):
  """Gets the class name from a file.

  Args:
    file_name: The file name to get the class name from.
               ie. "american_pit_bull_terrier_105.jpg"

  Returns:
    example: The converted tf.Example.
  """
  match = re.match(r'([A-Za-z_]+)(-[0-9]+\.jpg)', file_name, re.I)
  return match.groups()[0]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号