def _parse_project_doc_path(fn):
    """Get project name and banner from a project reference file.

    Returns:
        tuple:
        - project_name (str)
        - project_banner (str)
    """
    project_banner, project_name = None, None
    with open(fn, 'r', encoding='utf-8') as f:
        for line in f.readlines():
            if re.match('^( )*<img', line) and not project_banner:
                project_banner = line
            if line.startswith('# ') and not project_name:
                project_name = line
            if project_name and project_banner:
                break
    if project_name is None or project_banner is None:
        raise ValueError(f'Invalid paper reference file {fn}')

    project_name = re.sub(r'^\# ', '', project_name).strip()
    project_banner = project_banner.strip()
    return project_name, project_banner
Get project name and banner from a project reference file.

    Returns:
        tuple:
        - project_name (str)
        - project_banner (str)
    
mmpose/docs/zh_cn/collect_projects.py