Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
FML Project
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Meet Narendra
FML Project
Commits
e1e608b2
Commit
e1e608b2
authored
Oct 04, 2022
by
Soumya Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added code for gif
parent
9380cdc1
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
524 additions
and
4 deletions
+524
-4
1508.06576/Logs/blank.txt
1508.06576/Logs/blank.txt
+0
-0
1508.06576/Logs/style_transfer.log
1508.06576/Logs/style_transfer.log
+516
-0
1508.06576/gifs/blank.txt
1508.06576/gifs/blank.txt
+0
-0
1508.06576/image2gif.py
1508.06576/image2gif.py
+1
-1
1508.06576/logger.py
1508.06576/logger.py
+2
-2
1508.06576/optimizer.py
1508.06576/optimizer.py
+5
-1
1508.06576/styled_images/blank.txt
1508.06576/styled_images/blank.txt
+0
-0
No files found.
1508.06576/Logs/blank.txt
deleted
100644 → 0
View file @
9380cdc1
1508.06576/Logs/style_transfer.log
0 → 100644
View file @
e1e608b2
This diff is collapsed.
Click to expand it.
1508.06576/gifs/blank.txt
deleted
100644 → 0
View file @
9380cdc1
1508.06576/image2gif.py
View file @
e1e608b2
...
...
@@ -10,7 +10,7 @@ for img in os.listdir(path):
fnames
.
sort
()
with
imageio
.
get_writer
(
'gifs/'
+
newNameFolder
+
".gif"
,
mode
=
'I'
,
duration
=
0.
9
)
as
writer
:
with
imageio
.
get_writer
(
'gifs/'
+
newNameFolder
+
".gif"
,
mode
=
'I'
,
duration
=
0.
2
)
as
writer
:
for
fname
in
fnames
:
image
=
imageio
.
imread
(
fname
)
writer
.
append_data
(
image
)
1508.06576/logger.py
View file @
e1e608b2
...
...
@@ -11,7 +11,7 @@ class Logger:
_formatter
=
logging
.
Formatter
(
'
%(asctime)
s
%(levelname)
s
%(message)
s'
)
def
__new__
(
cls
,
*
args
,
**
kwargs
):
if
not
cls
.
_instance
:
identifier
=
'
content-reconstruction-mixed
'
identifier
=
''
if
not
os
.
path
.
isdir
(
"Logs/"
):
os
.
mkdir
(
"Logs/"
)
logHandler
=
logging
.
FileHandler
(
"Logs/style_transfer_"
+
identifier
+
".log"
)
...
...
@@ -35,4 +35,4 @@ if __name__ == "__main__":
ERROR = b.logger()
INFO.info("TEST")
ERROR.info("ERROR")
'''
\ No newline at end of file
'''
1508.06576/optimizer.py
View file @
e1e608b2
...
...
@@ -48,4 +48,8 @@ class Optimizer:
#plt.plot(content_img_clone)
if
(
e
%
10
==
0
):
LOGGER
.
info
(
f
"Epoch = {e} Total Loss = {total_loss} content Loss = {total_cont_loss} style Loss = {total_style_loss}"
)
save_image
(
content_img_clone
,
"styled.png"
)
\ No newline at end of file
identifier
=
""
name
=
"styled_images/"
+
identifier
+
"/styled_"
+
str
(
e
)
+
".png"
save_image
(
content_img_clone
,
name
)
save_image
(
content_img_clone
,
name
)
\ No newline at end of file
1508.06576/styled_images/blank.txt
deleted
100644 → 0
View file @
9380cdc1
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