Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
97dd6c5c
Commit
97dd6c5c
authored
May 18, 2016
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix viz bu
parent
4fd1db97
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
tensorpack/dataflow/dataset/atari.py
tensorpack/dataflow/dataset/atari.py
+3
-3
No files found.
tensorpack/dataflow/dataset/atari.py
View file @
97dd6c5c
...
@@ -33,7 +33,7 @@ class AtariDriver(object):
...
@@ -33,7 +33,7 @@ class AtariDriver(object):
self
.
viz
=
viz
self
.
viz
=
viz
self
.
romname
=
os
.
path
.
basename
(
rom_file
)
self
.
romname
=
os
.
path
.
basename
(
rom_file
)
if
isinstance
(
self
.
viz
,
float
):
if
self
.
viz
and
isinstance
(
self
.
viz
,
float
):
cv2
.
startWindowThread
()
cv2
.
startWindowThread
()
cv2
.
namedWindow
(
self
.
romname
)
cv2
.
namedWindow
(
self
.
romname
)
...
@@ -56,10 +56,10 @@ class AtariDriver(object):
...
@@ -56,10 +56,10 @@ class AtariDriver(object):
now
=
self
.
_grab_raw_image
()
now
=
self
.
_grab_raw_image
()
ret
=
np
.
maximum
(
now
,
self
.
last_image
)
ret
=
np
.
maximum
(
now
,
self
.
last_image
)
self
.
last_image
=
now
self
.
last_image
=
now
if
isinstance
(
self
.
viz
,
float
):
if
self
.
viz
and
isinstance
(
self
.
viz
,
float
):
cv2
.
imshow
(
self
.
romname
,
ret
)
cv2
.
imshow
(
self
.
romname
,
ret
)
time
.
sleep
(
self
.
viz
)
time
.
sleep
(
self
.
viz
)
el
se
:
el
if
self
.
viz
:
cv2
.
imwrite
(
"{}/{:06d}.jpg"
.
format
(
self
.
viz
,
self
.
framenum
),
ret
)
cv2
.
imwrite
(
"{}/{:06d}.jpg"
.
format
(
self
.
viz
,
self
.
framenum
),
ret
)
self
.
framenum
+=
1
self
.
framenum
+=
1
ret
=
cv2
.
cvtColor
(
ret
,
cv2
.
COLOR_BGR2YUV
)[:,:,
0
]
ret
=
cv2
.
cvtColor
(
ret
,
cv2
.
COLOR_BGR2YUV
)[:,:,
0
]
...
...
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