Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
image-compression
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Elphel
image-compression
Commits
3a858f29
Commit
3a858f29
authored
Apr 05, 2022
by
Kelly Chang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.elphel.com/Elphel/master
parents
271201a3
5ff7f723
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
23 deletions
+34
-23
Error_to_Image-checkpoint.ipynb
.ipynb_checkpoints/Error_to_Image-checkpoint.ipynb
+14
-3
Scout_Clean_Code_with_EncDec-checkpoint.ipynb
...checkpoints/Scout_Clean_Code_with_EncDec-checkpoint.ipynb
+9
-9
Error_to_Image.ipynb
Error_to_Image.ipynb
+2
-2
Scout_Clean_Code_with_EncDec.ipynb
Scout_Clean_Code_with_EncDec.ipynb
+9
-9
No files found.
.ipynb_checkpoints/Error_to_Image-checkpoint.ipynb
View file @
3a858f29
...
...
@@ -776,7 +776,7 @@
},
{
"cell_type": "code",
"execution_count":
72
,
"execution_count":
16
,
"id": "64832ca7",
"metadata": {},
"outputs": [
...
...
@@ -784,7 +784,18 @@
"name": "stdout",
"output_type": "stream",
"text": [
"6.736892561802416\n"
"[58 38 13 ... 65 97 32]\n"
]
},
{
"ename": "NameError",
"evalue": "name 'o' is not defined",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m~\\AppData\\Local\\Temp/ipykernel_2620/2795330121.py\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m 7\u001b[0m \u001b[0mfreqs\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;33m[\u001b[0m\u001b[0mx\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcount\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mvalue\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;33m/\u001b[0m \u001b[0mlen\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mx\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;32mfor\u001b[0m \u001b[0mvalue\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mset\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mx\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 8\u001b[0m \u001b[1;32mreturn\u001b[0m \u001b[0mfreqs\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 9\u001b[1;33m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0msp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mstats\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mentropy\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mrel_freq\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mlist\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mnp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mravel\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mo\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 10\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 11\u001b[0m \u001b[1;32mdef\u001b[0m \u001b[0mentropy_check\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mx\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0my\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;31mNameError\u001b[0m: name 'o' is not defined"
]
}
],
...
...
@@ -798,7 +809,7 @@
"def rel_freq(x):\n",
" freqs = [x.count(value) / len(x) for value in set(x)] \n",
" return freqs\n",
"print(sp.stats.entropy(rel_freq(list(np.ravel(
o
)))))\n",
"print(sp.stats.entropy(rel_freq(list(np.ravel(
image
)))))\n",
"\n",
"def entropy_check(x, y):\n",
" #freq = rel_freq(list(np.ravel(o)))\n",
...
...
.ipynb_checkpoints/Scout_Clean_Code_with_EncDec-checkpoint.ipynb
View file @
3a858f29
...
...
@@ -3,7 +3,7 @@
{
"cell_type": "code",
"execution_count": 2,
"id": "
0d67d099
",
"id": "
5bb42c2c
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -27,7 +27,7 @@
{
"cell_type": "code",
"execution_count": 3,
"id": "
fc76b964
",
"id": "
ec24fcba
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -74,7 +74,7 @@
{
"cell_type": "code",
"execution_count": 4,
"id": "
b781115b
",
"id": "
c2430512
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -122,7 +122,7 @@
{
"cell_type": "code",
"execution_count": 10,
"id": "
fe145ec0
",
"id": "
b973ed91
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -202,7 +202,7 @@
{
"cell_type": "code",
"execution_count": 6,
"id": "4f
b8f5d0
",
"id": "4f
6a5a0d
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -231,7 +231,7 @@
{
"cell_type": "code",
"execution_count": 7,
"id": "
9a39a65b
",
"id": "
4b65c7e9
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -293,7 +293,7 @@
{
"cell_type": "code",
"execution_count": 11,
"id": "
fc4d80bd
",
"id": "
280aafd3
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -307,7 +307,7 @@
{
"cell_type": "code",
"execution_count": 12,
"id": "
2d82e61a
",
"id": "
c4242b52
",
"metadata": {},
"outputs": [
{
...
...
@@ -329,7 +329,7 @@
{
"cell_type": "code",
"execution_count": 16,
"id": "
e35be607
",
"id": "
a9502e22
",
"metadata": {},
"outputs": [
{
...
...
Error_to_Image.ipynb
View file @
3a858f29
...
...
@@ -805,11 +805,11 @@
"plt.colorbar()\n",
"plt.xlim(0,50)\n",
"plt.ylim(0,100)\"\"\"\n",
"
print(diff)
\n",
"\n",
"def rel_freq(x):\n",
" freqs = [x.count(value) / len(x) for value in set(x)] \n",
" return freqs\n",
"print(sp.stats.entropy(rel_freq(list(np.ravel(
o
)))))\n",
"print(sp.stats.entropy(rel_freq(list(np.ravel(
image
)))))\n",
"\n",
"def entropy_check(x, y):\n",
" #freq = rel_freq(list(np.ravel(o)))\n",
...
...
Scout_Clean_Code_with_EncDec.ipynb
View file @
3a858f29
...
...
@@ -3,7 +3,7 @@
{
"cell_type": "code",
"execution_count": 2,
"id": "
0d67d099
",
"id": "
5bb42c2c
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -27,7 +27,7 @@
{
"cell_type": "code",
"execution_count": 3,
"id": "
fc76b964
",
"id": "
ec24fcba
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -74,7 +74,7 @@
{
"cell_type": "code",
"execution_count": 4,
"id": "
b781115b
",
"id": "
c2430512
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -122,7 +122,7 @@
{
"cell_type": "code",
"execution_count": 10,
"id": "
fe145ec0
",
"id": "
b973ed91
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -202,7 +202,7 @@
{
"cell_type": "code",
"execution_count": 6,
"id": "4f
b8f5d0
",
"id": "4f
6a5a0d
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -231,7 +231,7 @@
{
"cell_type": "code",
"execution_count": 7,
"id": "
9a39a65b
",
"id": "
4b65c7e9
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -293,7 +293,7 @@
{
"cell_type": "code",
"execution_count": 11,
"id": "
fc4d80bd
",
"id": "
280aafd3
",
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -307,7 +307,7 @@
{
"cell_type": "code",
"execution_count": 12,
"id": "
2d82e61a
",
"id": "
c4242b52
",
"metadata": {},
"outputs": [
{
...
...
@@ -329,7 +329,7 @@
{
"cell_type": "code",
"execution_count": 16,
"id": "
e35be607
",
"id": "
a9502e22
",
"metadata": {},
"outputs": [
{
...
...
Write
Preview
Markdown
is supported
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