Skip to content

Commit 299b2aa

Browse files
committed
courses scripted
1 parent 7087101 commit 299b2aa

File tree

12 files changed

+273
-131
lines changed

12 files changed

+273
-131
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
.DS_STORE
12
backup

courses.html

Lines changed: 47 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -31,56 +31,57 @@
3131

3232
<div class="contentItem">
3333

34-
<table class="course">
35-
<tr>
36-
<!-- course 1 -->
37-
<td>
38-
<div class="cropTeaser" style="background-image: url('courses/16385.png');">
39-
</div>
40-
</td>
41-
<td class="courseDescription">
42-
<h2 class="courseTitle"> 16-385 / Computer Vision </h2>
43-
This course provides a comprehensive introduction to computer vision. Major topics
44-
include image processing, detection
45-
and recognition, geometry-based and physics-based vision and video analysis.
46-
Students will learn basic concepts of
47-
computer vision as well as hands on experience to solve real-life vision problems.
48-
<p class="offeringList"><a href="./index.html">Course Website</a></p>
49-
</td>
34+
<!-- autogen courses -->
5035

51-
<!-- course 2 -->
52-
<td>
53-
<div class="cropTeaser" style="background-image: url('courses/l43d.png');">
54-
</div>
55-
</td>
36+
<!--------------------------------------------------------------------------->
37+
<table class="course" id=16889>
38+
<tr>
39+
<td>
40+
<div class="cropTeaser" style="background-image: url('courses/l43d.png');">
41+
</div>
42+
</td>
43+
<td class="courseDescription">
44+
<h2 class="courseTitle"> 16-889 : Learning for 3D Vision </h2>
45+
Any autonomous agent we develop must perceive and act in a 3D world. The ability to infer, model, and utilize 3D representations is therefore of central importance in AI, with applications ranging from robotic manipulation and self-driving to virtual reality and image manipulation. While 3D understanding has been a longstanding goal in computer vision, it has witnessed several impressive advances due to the rapid recent progress in (deep) learning techniques. The goal of this course is to explore this confluence of 3D Vision and Learning-based methods.
46+
<p class="offeringList"><a href="https://learning3d.github.io/">Course Website</a></p>
47+
</td>
48+
</tr>
49+
</table>
50+
<!--------------------------------------------------------------------------->
5651

57-
<td class="courseDescription">
58-
<h2 class="courseTitle"> 16-889 / Learning for 3D Vision </h2>
59-
While 3D understanding has
60-
been a longstanding goal in computer
61-
vision, it has witnessed several impressive advances due to the rapid recent
62-
progress in (deep) learning techniques. The
63-
goal of this course is to explore this confluence of 3D Vision and Learning-based
64-
methods.
52+
<!--------------------------------------------------------------------------->
53+
<table class="course" id=16385>
54+
<tr>
55+
<td>
56+
<div class="cropTeaser" style="background-image: url('courses/16385.png');">
57+
</div>
58+
</td>
59+
<td class="courseDescription">
60+
<h2 class="courseTitle"> 16-385 : Computer Vision </h2>
61+
This course provides a comprehensive introduction to computer vision. Major topics include image processing, detection and recognition, geometry-based and physics-based vision and video analysis. Students will learn basic concepts of computer vision as well as hands on experience to solve real-life vision problems.
62+
<p class="offeringList"><a href="http://16385.courses.cs.cmu.edu/spring2022/">Course Website</a></p>
63+
</td>
64+
</tr>
65+
</table>
66+
<!--------------------------------------------------------------------------->
67+
68+
<!--------------------------------------------------------------------------->
69+
<table class="course" id=16824>
70+
<tr>
71+
<td>
72+
<div class="cropTeaser" style="background-image: url('https://visual-learning.cs.cmu.edu/images/teaser.jpg');">
73+
</div>
74+
</td>
75+
<td class="courseDescription">
76+
<h2 class="courseTitle"> 16-824 : Visual Learning and Recognition </h2>
77+
This graduate-level computer vision course focuses on representation and reasoning for large amounts of data (images, videos, and associated tags, text, GPS locations, etc.) toward the ultimate goal of understanding the visual world surrounding us. We will be reading an eclectic mix of classic and recent papers on topics including Theories of Perception, Mid-level Vision (Grouping, Segmentation, Poses), Object and Scene Recognition, 3D Scene Understanding, Action Recognition, Contextual Reasoning, Joint Language and Vision Models, Deep Generative Models, etc. We will be covering a wide range of supervised, semi-supervised and unsupervised approaches for each of the topics above.
78+
<p class="offeringList"><a href="https://visual-learning.cs.cmu.edu/">Course Website</a></p>
79+
</td>
80+
</tr>
81+
</table>
82+
<!--------------------------------------------------------------------------->
6583

66-
<p class="offeringList"><a href="https://learning3d.github.io/">Course Website</a></p>
67-
</td>
68-
</tr>
6984

70-
<tr>
71-
<!-- course 1 -->
72-
<td> <div class="cropTeaser" style="background-image: url('courses/16385.png');"> </div> </td>
73-
<td class="courseDescription">
74-
<h2 class="courseTitle"> 16-385 / Computer Vision </h2>
75-
This course provides a comprehensive introduction to computer vision. Major topics
76-
include image processing, detection
77-
and recognition, geometry-based and physics-based vision and video analysis.
78-
Students will learn basic concepts of
79-
computer vision as well as hands on experience to solve real-life vision problems.
80-
<p class="offeringList"><a href="./index.html">Course website</a></p>
81-
</td>
82-
</tr>
83-
</table>
8485
</div> <!-- content -->
8586

8687
</div>

courses/.DS_Store

6 KB
Binary file not shown.

courses/16385.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
number:: 16-385
2+
title:: Computer Vision
3+
url:: http://16385.courses.cs.cmu.edu/spring2022/
4+
img:: courses/16385.png
5+
description:: This course provides a comprehensive introduction to computer vision. Major topics include image processing, detection and recognition, geometry-based and physics-based vision and video analysis. Students will learn basic concepts of computer vision as well as hands on experience to solve real-life vision problems.

courses/16824.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
number:: 16-824
2+
title:: Visual Learning and Recognition
3+
url:: https://visual-learning.cs.cmu.edu/
4+
img:: https://visual-learning.cs.cmu.edu/images/teaser.jpg
5+
description:: This graduate-level computer vision course focuses on representation and reasoning for large amounts of data (images, videos, and associated tags, text, GPS locations, etc.) toward the ultimate goal of understanding the visual world surrounding us. We will be reading an eclectic mix of classic and recent papers on topics including Theories of Perception, Mid-level Vision (Grouping, Segmentation, Poses), Object and Scene Recognition, 3D Scene Understanding, Action Recognition, Contextual Reasoning, Joint Language and Vision Models, Deep Generative Models, etc. We will be covering a wide range of supervised, semi-supervised and unsupervised approaches for each of the topics above.

courses/16889.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
number:: 16-889
2+
title:: Learning for 3D Vision
3+
url:: https://learning3d.github.io/
4+
img:: courses/l43d.png
5+
description:: Any autonomous agent we develop must perceive and act in a 3D world. The ability to infer, model, and utilize 3D representations is therefore of central importance in AI, with applications ranging from robotic manipulation and self-driving to virtual reality and image manipulation. While 3D understanding has been a longstanding goal in computer vision, it has witnessed several impressive advances due to the rapid recent progress in (deep) learning techniques. The goal of this course is to explore this confluence of 3D Vision and Learning-based methods.

courses_base.html

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta name="description" content="Course offerings in computer vision at Carnegie Mellon.">
7+
<title>Carnegie Mellon Computer Vision - Courses</title>
8+
<link href='http://fonts.googleapis.com/css?family=EB+Garamond' rel='stylesheet' type='text/css'>
9+
<link href='http://fonts.googleapis.com/css?family=Roboto+Condensed:700' rel='stylesheet' type='text/css'>
10+
<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,300italic,400italic' rel='stylesheet'
11+
type='text/css'>
12+
<link rel="icon" type="image/x-icon" href="./assets/ri-favicon.ico">
13+
<link rel="stylesheet" href="./style.css">
14+
</head>
15+
16+
<body class="page page-id-16 page-parent page-child parent-pageid-24 page-template-default">
17+
18+
<div id="wrapper">
19+
<div id="header">
20+
<div id="logo"><a href="./index.html"><img alt="Computer Vision @ Carnegie Mellon" src="./assets/logo.svg"></a>
21+
</div>
22+
<div id="navBar">
23+
24+
<a href="./index.html">People</a>
25+
<a href="./research.html">Research</a>
26+
<a href="./courses.html">Courses</a>
27+
</div>
28+
</div>
29+
30+
<div id="main" role="main">
31+
32+
<div class="contentItem">
33+
34+
<!-- autogen courses -->
35+
36+
</div> <!-- content -->
37+
38+
</div>
39+
<!--main-->
40+
41+
<div id="footWrapper">
42+
<div id="footer">
43+
<span id="footerLogo"><a href="http://www.cmu.edu/index.shtml"><img src="./assets/cmu.svg"
44+
alt="Carnegie Mellon University"></a></span>
45+
<span id="footerAddress"><a
46+
href="https://www.google.com/maps/place/Carnegie+Mellon+University/@40.442492,-79.942553,17z/data=!3m1!4b1!4m2!3m1!1s0x8834f21f58679a9f:0x88716b461fc4daf4">5000
47+
Forbes Ave Pittsburgh, PA 15213</a></span>
48+
</div>
49+
</div>
50+
</div>
51+
</body>
52+
53+
</html>

gen_course_page.py

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
import os
2+
import glob
3+
import random
4+
5+
MAX_PROJECTS = 24
6+
CURRENT_YEAR = 2022
7+
8+
def read_file(fpath):
9+
with open(fpath, 'r') as f:
10+
content = f.read()
11+
return content
12+
13+
def get_txtfile_ids(folder):
14+
txtfiles = glob.glob('{}/*.txt'.format(folder))
15+
ids = [os.path.basename(txtfile)[:-4] for txtfile in txtfiles]
16+
return ids
17+
18+
# <img class="paper static" title="paper" src="src.png" />
19+
def parse_course_info(course_id, course_folder):
20+
elems = {}
21+
keys = []
22+
fpath = os.path.join(course_folder, course_id + '.txt')
23+
24+
with open(fpath, 'r') as f:
25+
for ln in f.readlines():
26+
ln_items = ln.split('::')
27+
if len(ln_items) != 2:
28+
continue
29+
key, val = ln_items[0], ln_items[1]
30+
key = key.rstrip().lstrip()
31+
val = val.rstrip().lstrip()
32+
elems[key] = val
33+
keys.append(key)
34+
35+
if 'img' not in keys:
36+
elems['img'] = 'courses/16385.jpeg'
37+
38+
return elems, keys
39+
40+
41+
def get_course_html_string(id, elems, keys):
42+
comment_str = '<!--------------------------------------------------------------------------->'
43+
course_str = ''
44+
course_str += '\n' + comment_str + '\n'
45+
course_str += '<table class="course" id={}>\n'.format(id)
46+
course_str += '<tr>\n<td>\n'
47+
course_str += '<div class="cropTeaser" style="background-image: url(\'{}\');">\n</div>\n'.format(elems['img'])
48+
course_str += '</td>\n<td class="courseDescription">\n'
49+
course_str += '<h2 class="courseTitle"> {} : {} </h2> \n {} \n'.format(elems['number'], elems['title'], elems['description'])
50+
if 'url' in keys:
51+
course_str += '<p class="offeringList"><a href="{}">Course Website</a></p>\n'.format(elems['url'])
52+
course_str += '</td>\n</tr>\n</table>\n'
53+
54+
## Meta fields
55+
# add some javascript here if needed using the id for the added element
56+
57+
course_str += comment_str + '\n'
58+
return course_str
59+
60+
61+
if __name__ == '__main__':
62+
page_string = read_file('./courses_base.html')
63+
64+
###########################################################################
65+
###########################################################################
66+
67+
folder = './courses'
68+
courses_string = ''
69+
ids = get_txtfile_ids(folder)
70+
random.shuffle(ids)
71+
for id in ids:
72+
elems, keys = parse_course_info(id, folder)
73+
courses_string += get_course_html_string(id, elems, keys)
74+
75+
page_string = page_string.replace('<!-- autogen courses -->', '<!-- autogen courses -->\n' + courses_string)
76+
77+
###########################################################################
78+
###########################################################################
79+
80+
fpath = './courses.html'
81+
with open(fpath, 'w') as f:
82+
f.write(page_string)

0 commit comments

Comments
 (0)