Closed xPartners closed 1 week ago
I have updated the document, you can refer to it.
The configuration file config.yaml
defines the parameters for watermark removal.
position: [556, 1233, 701, 1267]
(x1, y1, x2, y2)
where (556, 1233)
is the top-left corner and (701, 1267)
is the bottom-right corner of the watermark.ckpt_p: "./weights/sttn.pth"
mask_expand: 30
neighbor_stride: 10
Thanks, It is fixed already, however, Im facing another issue with './weights/RealESRGAN_x2plus.pth'
Nearly a success, however, still faced an error difficult to settle it, kindly advise
2024-09-07 00:46:56: Start! E:\demo.mp4 2024-09-07 00:46:56: Source: extracting frames with 30.0 FPS... 2024-09-07 00:47:04: Erase: removing watermark... Set Mask: 100%|▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒| 153/153 [00:00<00:00, 962.34it/s] Traceback (most recent call last): File "C:\Users\Usr\KLing-Video-WatermarkRemover-Enhancer\main.py", line 93, in
main()
File "C:\Users\Usr\KLing-Video-WatermarkRemover-Enhancer\main.py", line 90, in main
process_input(args.input, args.remove_watermark, args.enhance_video)
File "C:\Users\Usr\KLing-Video-WatermarkRemover-Enhancer\main.py", line 68, in process_input
process_video(
File "C:\Users\Usr\KLing-Video-WatermarkRemover-Enhancer\main.py", line 36, in process_video
remove_watermark(frame_paths, config)
File "C:\Users\Usr\KLing-Video-WatermarkRemover-Enhancer\modules\erase.py", line 145, in remove_watermark
results = inpaint_video(
File "C:\Users\Usr\AppData\Roaming\Python\Python310\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, kwargs)
File "C:\Users\Usr\KLing-Video-WatermarkRemover-Enhancer\modules\erase.py", line 37, in inpaint_video
model = build_sttn_model(ckpt_p, device)
File "C:\Users\Usr\KLing-Video-WatermarkRemover-Enhancer\modules\sttn.py", line 53, in build_sttn_model
data = torch.load(ckpt_p, map_location=device)
File "C:\Users\Usr\AppData\Roaming\Python\Python310\site-packages\torch\serialization.py", line 997, in load
with _open_file_like(f, 'rb') as opened_file:
File "C:\Users\Usr\AppData\Roaming\Python\Python310\site-packages\torch\serialization.py", line 444, in _open_file_like
return _open_file(name_orbuffer, mode)
File "C:\Users\Usr\AppData\Roaming\Python\Python310\site-packages\torch\serialization.py", line 425, in init
super().init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: './weights/sttn.pth'**_