Toggle navigation
Toggle navigation
This project
Loading...
Sign in
강현준
/
2018-1-capstone_design_1-Automated_calculation_system
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Hyunjun
2018-05-29 11:48:22 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
26db7839f649d9189cac31e183b9f7650a0a1476
26db7839
1 parent
16a55b17
make_img.py 추가
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletions
README.md
simple_convnet_c++/make_img.py
README.md
View file @
26db783
...
...
@@ -24,4 +24,7 @@ test하는 부분만 골라내기 위해 python test 코드를 추가(test.py), simple_convnet
7.
python test 폴더 추가
python test 폴더에는 test에 필요하지 않은 train 부분을 삭제함
\ No newline at end of file
python test 폴더에는 test에 필요하지 않은 train 부분을 삭제함
8.
make_img_py 추가
이미지를 불러와 (32,32,3)의 크기로 resize한 후 input.txt에 저장함
\ No newline at end of file
...
...
simple_convnet_c++/make_img.py
0 → 100644
View file @
26db783
from
numpy
import
array
,
savetxt
from
PIL
import
Image
import
sys
filename
=
None
filename
=
sys
.
argv
[
1
]
if
filename
==
None
:
raise
(
FileNotFoundError
)
img
=
array
(
Image
.
open
(
filename
)
.
resize
((
32
,
32
),
Image
.
ANTIALIAS
))
.
transpose
(
2
,
0
,
1
)
.
flatten
()
savetxt
(
'input.txt'
,
img
,
fmt
=
'
%
d'
,
delimiter
=
' '
)
Please
register
or
login
to post a comment