diff --git a/docs/changelog.md b/docs/changelog.md index fcf898f7c3..c7d0bdaddb 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -8,6 +8,7 @@ **Improvements** - Fix CI due to pip upgrade. ([#454](https://github.com/open-mmlab/mmaction2/pull/454)) +- Use title case in modelzoo statistics. ([#456](https://github.com/open-mmlab/mmaction2/pull/456)) - Add FAQ documents for easy troubleshooting. ([#413](https://github.com/open-mmlab/mmaction2/pull/413), [#420](https://github.com/open-mmlab/mmaction2/pull/420), [#439](https://github.com/open-mmlab/mmaction2/pull/439)) diff --git a/docs/stat.py b/docs/stat.py index 0c7d4bd465..bcdacade43 100755 --- a/docs/stat.py +++ b/docs/stat.py @@ -3,6 +3,8 @@ import glob import re +import titlecase + files = sorted(glob.glob('*_models.md')) stats = [] @@ -15,8 +17,9 @@ title = content.split('\n')[0].replace('#', '') # count papers - papers = set(x.lower().strip() - for x in re.findall(r'\btitle\s*=\s*{(.*)}', content)) + papers = set( + titlecase.titlecase(x.lower().strip()) + for x in re.findall(r'\btitle\s*=\s*{(.*)}', content)) paperlist = '\n'.join(sorted(' - ' + x for x in papers)) # count configs diff --git a/requirements/readthedocs.txt b/requirements/readthedocs.txt index 0542bfce6d..70a4cd3546 100644 --- a/requirements/readthedocs.txt +++ b/requirements/readthedocs.txt @@ -1,3 +1,4 @@ mmcv +titlecase torch torchvision diff --git a/setup.cfg b/setup.cfg index e720d52107..97878780ae 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,6 +19,6 @@ line_length = 79 multi_line_output = 0 known_standard_library = pkg_resources,setuptools known_first_party = mmaction -known_third_party = cv2,joblib,matplotlib,mmcv,numpy,pandas,pytest,scipy,seaborn,torch +known_third_party = cv2,joblib,matplotlib,mmcv,numpy,pandas,pytest,scipy,seaborn,titlecase,torch no_lines_before = STDLIB,LOCALFOLDER default_section = THIRDPARTY