Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
maskrcnn
Project
Project
Details
Activity
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
人工智能
maskrcnn
Commits
be5a7f55
Commit
be5a7f55
authored
May 22, 2019
by
吴升宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge tem update
parent
99d13fb8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
10 deletions
+25
-10
.gitignore
.gitignore
+2
-0
webcam.py
demo/webcam.py
+4
-1
work.py
demo/work.py
+10
-5
comm.py
maskrcnn_benchmark/utils/comm.py
+3
-2
config.py
proj/config.py
+6
-2
No files found.
.gitignore
View file @
be5a7f55
...
...
@@ -29,3 +29,4 @@ dist/
/datasets
/models
/output
local_config.py
\ No newline at end of file
demo/webcam.py
View file @
be5a7f55
...
...
@@ -61,7 +61,10 @@ def img_to_three_color_map(source_path, target_path):
masks_per_dim
=
args
.
masks_per_dim
,
min_image_size
=
args
.
min_image_size
,
)
source_path
=
source_path
[
3
:]
target_path
=
target_path
[
3
:]
print
(
target_path
)
print
(
source_path
)
img
=
cv2
.
imread
(
source_path
)
composite
=
coco_demo
.
run_on_opencv_image
(
img
)
if
composite
is
not
None
:
...
...
work.py
→
demo/
work.py
View file @
be5a7f55
...
...
@@ -13,18 +13,23 @@ def write_redis(source_path, target_path):
def
main
():
rs
=
os
.
walk
(
'../
fashionbase/images/dataset_0520/weiyi
'
)
rs
=
os
.
walk
(
'../
../fashionbase/images/dataset_0520/xifu
'
)
for
a
,
b
,
files
in
rs
:
print
(
a
)
for
file
in
files
:
dir
=
source_path
.
replace
(
'dataset_0520'
,
'dataset_0520_10000'
)
fold
=
os
.
exit
(
dir
)
dir
=
'../../fashionbase/images/dataset_0520/xifu'
.
replace
(
'dataset_0520'
,
'dataset_0520_10000'
)
fold
=
os
.
path
.
exists
(
dir
)
if
not
fold
:
os
.
mkdir
(
dir
)
source_path
=
'../
fashionbase/images/dataset_0520/weiyi
/'
+
file
source_path
=
'../
../fashionbase/images/dataset_0520/xifu
/'
+
file
target_path
=
source_path
.
replace
(
'dataset_0520'
,
'dataset_0520_10000'
)
# source_path = source_path[3:]
# target_path = target_path[3:]
print
(
source_path
)
print
(
target_path
)
#write_redis(source_path, target_path)
# img_reproce.delay(source_path, target_path)
write_redis
(
source_path
,
target_path
)
if
__name__
==
'__main__'
:
...
...
maskrcnn_benchmark/utils/comm.py
View file @
be5a7f55
...
...
@@ -63,8 +63,9 @@ def all_gather(data):
tensor
=
torch
.
ByteTensor
(
storage
)
.
to
(
"cuda"
)
# obtain Tensor size of each rank
local_size
=
torch
.
IntTensor
([
tensor
.
numel
()])
.
to
(
"cuda"
)
size_list
=
[
torch
.
IntTensor
([
0
])
.
to
(
"cuda"
)
for
_
in
range
(
world_size
)]
local_size
=
torch
.
LongTensor
([
tensor
.
numel
()])
.
to
(
"cuda"
)
size_list
=
[
torch
.
LongTensor
([
0
])
.
to
(
"cuda"
)
for
_
in
range
(
world_size
)]
dist
.
all_gather
(
size_list
,
local_size
)
size_list
=
[
int
(
size
.
item
())
for
size
in
size_list
]
max_size
=
max
(
size_list
)
...
...
proj/config.py
View file @
be5a7f55
...
...
@@ -10,4 +10,9 @@ CELERY_RESULT_SERIALIZER = 'json' # 读取任务结果一般性能要求不高
CELERY_TASK_RESULT_EXPIRES
=
60
*
60
*
24
# 任务过期时间,不建议直接写86400,应该让这样的magic数字表述更明显
CELERY_ACCEPT_CONTENT
=
[
'json'
,
'msgpack'
]
# 指定接受的内容类型
\ No newline at end of file
CELERY_ACCEPT_CONTENT
=
[
'json'
,
'msgpack'
]
# 指定接受的内容类型
try
:
from
.config_local
import
*
# noqa
except
ImportError
:
pass
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