Skip to content

Commit

Permalink
Merge pull request #61 from hmorimitsu/fix
Browse files Browse the repository at this point in the history
Fix
  • Loading branch information
hmorimitsu authored Mar 9, 2024
2 parents c69eeb2 + 4a28b20 commit 1f77f90
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions ptlflow/models/rapidflow/next1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ def forward(self, input):
self.dilation,
self.groups,
)
self.weight = None
else:
if self.weight is None:
self.weight = torch.einsum(
Expand Down
3 changes: 2 additions & 1 deletion ptlflow/models/rpknet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ python test.py rpknet --iters 32 --pretrained_ckpt kitti --test_dataset kitti-20
### Spring

```bash
python test.py rpknet --iters 32 --pretrained_ckpt sintel --test_dataset spring --warm_start
python test.py rpknet --iters 32 --pretrained_ckpt sintel --test_dataset spring --warm_start --input_bgr_to_rgb
```
*There is no special reason to convert to RGB here. But this mode was used by accident when submitting our results.

## Code license

Expand Down
3 changes: 2 additions & 1 deletion ptlflow/models/rpknet/rpknet.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ def add_model_specific_args(parent_parser=None):
parser.add_argument("--pyramid_ranges", type=int, nargs="+", default=(32, 8))
parser.add_argument("--iters", type=int, default=12)
parser.add_argument("--input_pad_one_side", action="store_true")
parser.add_argument("--input_bgr_to_rgb", action="store_true")

parser.add_argument(
"--not_detach_flow", action="store_false", dest="detach_flow"
Expand Down Expand Up @@ -290,7 +291,7 @@ def forward(self, inputs):
inputs["images"],
bgr_add=-0.5,
bgr_mult=2.0,
bgr_to_rgb=False,
bgr_to_rgb=self.args.input_bgr_to_rgb,
resize_mode="pad",
pad_mode="replicate",
pad_two_side=(not self.args.input_pad_one_side),
Expand Down

0 comments on commit 1f77f90

Please sign in to comment.