Skip to content

Commit

Permalink
courses scripted
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhtuls committed Aug 16, 2022
1 parent 7087101 commit 299b2aa
Show file tree
Hide file tree
Showing 12 changed files with 273 additions and 131 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.DS_STORE
backup
93 changes: 47 additions & 46 deletions courses.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,56 +31,57 @@

<div class="contentItem">

<table class="course">
<tr>
<!-- course 1 -->
<td>
<div class="cropTeaser" style="background-image: url('courses/16385.png');">
</div>
</td>
<td class="courseDescription">
<h2 class="courseTitle"> 16-385 / Computer Vision </h2>
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.
<p class="offeringList"><a href="./index.html">Course Website</a></p>
</td>
<!-- autogen courses -->

<!-- course 2 -->
<td>
<div class="cropTeaser" style="background-image: url('courses/l43d.png');">
</div>
</td>
<!--------------------------------------------------------------------------->
<table class="course" id=16889>
<tr>
<td>
<div class="cropTeaser" style="background-image: url('courses/l43d.png');">
</div>
</td>
<td class="courseDescription">
<h2 class="courseTitle"> 16-889 : Learning for 3D Vision </h2>
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.
<p class="offeringList"><a href="https://learning3d.github.io/">Course Website</a></p>
</td>
</tr>
</table>
<!--------------------------------------------------------------------------->

<td class="courseDescription">
<h2 class="courseTitle"> 16-889 / Learning for 3D Vision </h2>
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.
<!--------------------------------------------------------------------------->
<table class="course" id=16385>
<tr>
<td>
<div class="cropTeaser" style="background-image: url('courses/16385.png');">
</div>
</td>
<td class="courseDescription">
<h2 class="courseTitle"> 16-385 : Computer Vision </h2>
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.
<p class="offeringList"><a href="http://16385.courses.cs.cmu.edu/spring2022/">Course Website</a></p>
</td>
</tr>
</table>
<!--------------------------------------------------------------------------->

<!--------------------------------------------------------------------------->
<table class="course" id=16824>
<tr>
<td>
<div class="cropTeaser" style="background-image: url('https://visual-learning.cs.cmu.edu/images/teaser.jpg');">
</div>
</td>
<td class="courseDescription">
<h2 class="courseTitle"> 16-824 : Visual Learning and Recognition </h2>
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.
<p class="offeringList"><a href="https://visual-learning.cs.cmu.edu/">Course Website</a></p>
</td>
</tr>
</table>
<!--------------------------------------------------------------------------->

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

<tr>
<!-- course 1 -->
<td> <div class="cropTeaser" style="background-image: url('courses/16385.png');"> </div> </td>
<td class="courseDescription">
<h2 class="courseTitle"> 16-385 / Computer Vision </h2>
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.
<p class="offeringList"><a href="./index.html">Course website</a></p>
</td>
</tr>
</table>
</div> <!-- content -->

</div>
Expand Down
Binary file added courses/.DS_Store
Binary file not shown.
5 changes: 5 additions & 0 deletions courses/16385.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
number:: 16-385
title:: Computer Vision
url:: http://16385.courses.cs.cmu.edu/spring2022/
img:: courses/16385.png
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.
5 changes: 5 additions & 0 deletions courses/16824.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
number:: 16-824
title:: Visual Learning and Recognition
url:: https://visual-learning.cs.cmu.edu/
img:: https://visual-learning.cs.cmu.edu/images/teaser.jpg
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.
5 changes: 5 additions & 0 deletions courses/16889.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
number:: 16-889
title:: Learning for 3D Vision
url:: https://learning3d.github.io/
img:: courses/l43d.png
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.
53 changes: 53 additions & 0 deletions courses_base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<meta name="description" content="Course offerings in computer vision at Carnegie Mellon.">
<title>Carnegie Mellon Computer Vision - Courses</title>
<link href='http://fonts.googleapis.com/css?family=EB+Garamond' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Roboto+Condensed:700' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,300italic,400italic' rel='stylesheet'
type='text/css'>
<link rel="icon" type="image/x-icon" href="./assets/ri-favicon.ico">
<link rel="stylesheet" href="./style.css">
</head>

<body class="page page-id-16 page-parent page-child parent-pageid-24 page-template-default">

<div id="wrapper">
<div id="header">
<div id="logo"><a href="./index.html"><img alt="Computer Vision @ Carnegie Mellon" src="./assets/logo.svg"></a>
</div>
<div id="navBar">

<a href="./index.html">People</a>
<a href="./research.html">Research</a>
<a href="./courses.html">Courses</a>
</div>
</div>

<div id="main" role="main">

<div class="contentItem">

<!-- autogen courses -->

</div> <!-- content -->

</div>
<!--main-->

<div id="footWrapper">
<div id="footer">
<span id="footerLogo"><a href="http://www.cmu.edu/index.shtml"><img src="./assets/cmu.svg"
alt="Carnegie Mellon University"></a></span>
<span id="footerAddress"><a
href="https://www.google.com/maps/place/Carnegie+Mellon+University/@40.442492,-79.942553,17z/data=!3m1!4b1!4m2!3m1!1s0x8834f21f58679a9f:0x88716b461fc4daf4">5000
Forbes Ave Pittsburgh, PA 15213</a></span>
</div>
</div>
</div>
</body>

</html>
82 changes: 82 additions & 0 deletions gen_course_page.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
import os
import glob
import random

MAX_PROJECTS = 24
CURRENT_YEAR = 2022

def read_file(fpath):
with open(fpath, 'r') as f:
content = f.read()
return content

def get_txtfile_ids(folder):
txtfiles = glob.glob('{}/*.txt'.format(folder))
ids = [os.path.basename(txtfile)[:-4] for txtfile in txtfiles]
return ids

# <img class="paper static" title="paper" src="src.png" />
def parse_course_info(course_id, course_folder):
elems = {}
keys = []
fpath = os.path.join(course_folder, course_id + '.txt')

with open(fpath, 'r') as f:
for ln in f.readlines():
ln_items = ln.split('::')
if len(ln_items) != 2:
continue
key, val = ln_items[0], ln_items[1]
key = key.rstrip().lstrip()
val = val.rstrip().lstrip()
elems[key] = val
keys.append(key)

if 'img' not in keys:
elems['img'] = 'courses/16385.jpeg'

return elems, keys


def get_course_html_string(id, elems, keys):
comment_str = '<!--------------------------------------------------------------------------->'
course_str = ''
course_str += '\n' + comment_str + '\n'
course_str += '<table class="course" id={}>\n'.format(id)
course_str += '<tr>\n<td>\n'
course_str += '<div class="cropTeaser" style="background-image: url(\'{}\');">\n</div>\n'.format(elems['img'])
course_str += '</td>\n<td class="courseDescription">\n'
course_str += '<h2 class="courseTitle"> {} : {} </h2> \n {} \n'.format(elems['number'], elems['title'], elems['description'])
if 'url' in keys:
course_str += '<p class="offeringList"><a href="{}">Course Website</a></p>\n'.format(elems['url'])
course_str += '</td>\n</tr>\n</table>\n'

## Meta fields
# add some javascript here if needed using the id for the added element

course_str += comment_str + '\n'
return course_str


if __name__ == '__main__':
page_string = read_file('./courses_base.html')

###########################################################################
###########################################################################

folder = './courses'
courses_string = ''
ids = get_txtfile_ids(folder)
random.shuffle(ids)
for id in ids:
elems, keys = parse_course_info(id, folder)
courses_string += get_course_html_string(id, elems, keys)

page_string = page_string.replace('<!-- autogen courses -->', '<!-- autogen courses -->\n' + courses_string)

###########################################################################
###########################################################################

fpath = './courses.html'
with open(fpath, 'w') as f:
f.write(page_string)
Loading

0 comments on commit 299b2aa

Please sign in to comment.