Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Finding Incompatible JPEG Blocks
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
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Levecque Etienne
Finding Incompatible JPEG Blocks
Commits
b3020130
Commit
b3020130
authored
1 year ago
by
Levecque Etienne
Browse files
Options
Downloads
Patches
Plain Diff
fix: correct pipeline issue
parent
6c2e38bf
Loading
Loading
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
antecedent/block.py
+1
-1
1 addition, 1 deletion
antecedent/block.py
antecedent/pipeline.py
+2
-2
2 additions, 2 deletions
antecedent/pipeline.py
with
3 additions
and
3 deletions
antecedent/block.py
+
1
−
1
View file @
b3020130
...
...
@@ -90,7 +90,7 @@ class Block:
error
=
np
.
sum
(
abs_error
,
axis
=
(
1
,
2
,
3
))
error_idx
=
np
.
argsort
(
error
)
if
error
[
error_idx
[
0
]]
==
0
:
# check only the first element which is the smallest error
if
error_idx
.
any
()
and
error
[
error_idx
[
0
]]
==
0
:
# check only the first element which is the smallest error
send_logs
(
verbose
,
shared_dict
,
task_id
,
max_iter
,
max_iter
)
self
.
antecedents
[
pipeline
]
=
(
children
[
not_seen
][
error_idx
[
0
]],
iter_counter
)
...
...
This diff is collapsed.
Click to expand it.
antecedent/pipeline.py
+
2
−
2
View file @
b3020130
...
...
@@ -176,7 +176,7 @@ class ComposedPipeline:
return
blocks
def
backward
(
self
,
blocks
):
for
pipe
in
self
.
pipelines
:
for
pipe
in
self
.
pipelines
[::
-
1
]
:
blocks
=
pipe
.
backward
(
blocks
)
return
blocks
...
...
@@ -199,7 +199,7 @@ def create_pipeline(name, quality, grayscale, target_is_dct):
compression
=
not
target_is_dct
for
subclass
in
JPEGPipeline
.
__subclasses__
():
if
subclass
.
is_named
(
name
[
i
].
lower
()):
pipelines
.
append
(
subclass
(
quality
[
i
],
grayscale
,
compression
))
pipelines
.
append
(
subclass
(
quality
[
i
],
compression
,
grayscale
))
found
=
True
break
if
found
:
...
...
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