Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
food-recognition-benchmark-starter-kit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gotsulyak
food-recognition-benchmark-starter-kit
Commits
22b7e139
Commit
22b7e139
authored
3 years ago
by
iggotsul
Browse files
Options
Downloads
Patches
Plain Diff
fuse conv
parent
4e1b86e6
No related branches found
Branches containing commit
Tags
submission-test-26
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
__pycache__/predict_mmdetection.cpython-38.pyc
+0
-0
0 additions, 0 deletions
__pycache__/predict_mmdetection.cpython-38.pyc
data/results/predictions.json
+1
-1
1 addition, 1 deletion
data/results/predictions.json
predict_mmdetection.py
+3
-1
3 additions, 1 deletion
predict_mmdetection.py
with
4 additions
and
2 deletions
__pycache__/predict_mmdetection.cpython-38.pyc
+
0
−
0
View file @
22b7e139
No preview for this file type
This diff is collapsed.
Click to expand it.
data/results/predictions.json
+
1
−
1
View file @
22b7e139
source diff could not be displayed: it is too large. Options to address this:
view the blob
.
This diff is collapsed.
Click to expand it.
predict_mmdetection.py
+
3
−
1
View file @
22b7e139
...
...
@@ -51,6 +51,7 @@ from mmdet.apis import init_detector, inference_detector
from
mmdet.apis
import
multi_gpu_test
from
mmdet.datasets
import
build_dataloader
,
build_dataset
,
replace_ImageToTensor
from
mmdet.models
import
build_detector
import
pycocotools.mask
as
mask_util
from
utils.mmdet_inference
import
inference
...
...
@@ -85,13 +86,14 @@ class MMDetectionPredictor(FoodChallengePredictor):
if
self
.
cfg
.
get
(
"
cudnn_benchmark
"
,
False
):
torch
.
backends
.
cudnn
.
benchmark
=
True
self
.
cfg
.
data
.
samples_per_gpu
=
1
self
.
cfg
.
data
.
workers_per_gpu
=
0
self
.
cfg
.
data
.
workers_per_gpu
=
1
self
.
cfg
.
model
.
pretrained
=
None
self
.
cfg
.
data
.
test
.
test_mode
=
True
self
.
cfg
.
data
.
test
.
ann_file
=
self
.
test_predictions_file
.
name
self
.
cfg
.
data
.
test
.
img_prefix
=
self
.
test_data_path
self
.
model
=
init_detector
(
self
.
cfg_name
,
self
.
checkpoint_name
,
device
=
"
cuda:0
"
)
self
.
model
=
fuse_conv_bn
(
self
.
model
)
fp16_cfg
=
self
.
cfg
.
get
(
"
fp16
"
,
None
)
if
fp16_cfg
is
not
None
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment