Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Vipin Thomas
Cathumbnailer
Commits
a9298117
Commit
a9298117
authored
Apr 09, 2021
by
Majd Hafiri
Browse files
Upload New File
parent
32b80159
Changes
1
Hide whitespace changes
Inline
Side-by-side
cathumbnailer_template.ipynb
0 → 100644
View file @
a9298117
{
"cells": [
{
"cell_type": "code",
"execution_count": 43,
"metadata": {},
"outputs": [],
"source": [
"### TODO import libraries and apply overlay"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"### TODO download cat images into the folder `cats/`"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"# image_in, image_out: PIL.Image\n",
"# image_out_size: (width, height)\n",
"def fpga_resize(image_in, image_out_size):\n",
" ### YOUR CODE HERE\n",
"\n",
" return image_out"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"def fpga_resize_images(image_paths):\n",
" ### YOUR CODE HERE\n",
" \n",
" return images"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"def cpu_resize_images(image_paths):\n",
" ### YOUR CODE HERE\n",
" \n",
" return images"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"# TODO runtime comparison"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"image_paths = !ls cats/*jpg"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
"# TODO timeit fpga_resize_images(image_paths)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
"# TODO timeit cpu_resize_images(image_paths)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
"# TODO visualization of comparison values using plots"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
%% Cell type:code id: tags:
```
python
### TODO import libraries and apply overlay
```
%% Cell type:code id: tags:
```
python
### TODO download cat images into the folder `cats/`
```
%% Cell type:code id: tags:
```
python
# image_in, image_out: PIL.Image
# image_out_size: (width, height)
def
fpga_resize
(
image_in
,
image_out_size
):
### YOUR CODE HERE
return
image_out
```
%% Cell type:code id: tags:
```
python
def
fpga_resize_images
(
image_paths
):
### YOUR CODE HERE
return
images
```
%% Cell type:code id: tags:
```
python
def
cpu_resize_images
(
image_paths
):
### YOUR CODE HERE
return
images
```
%% Cell type:code id: tags:
```
python
# TODO runtime comparison
```
%% Cell type:code id: tags:
```
python
image_paths
=
!
ls
cats
/*
jpg
```
%% Cell type:code id: tags:
```
python
# TODO timeit fpga_resize_images(image_paths)
```
%% Cell type:code id: tags:
```
python
# TODO timeit cpu_resize_images(image_paths)
```
%% Cell type:code id: tags:
```
python
# TODO visualization of comparison values using plots
```
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment