Binary file not shown.
|
Before Width: | Height: | Size: 1.1 MiB |
@@ -1,16 +0,0 @@
|
|||||||
import time
|
|
||||||
|
|
||||||
import cv2
|
|
||||||
|
|
||||||
from doc_dewarp import dewarp
|
|
||||||
from paddle_detection import detector
|
|
||||||
from util import image_util
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
image = image_util.read("PH20240813000294_3_081442_1.jpg")
|
|
||||||
images = detector.get_book_areas(image)
|
|
||||||
for i in range(len(images)):
|
|
||||||
dewarped_image = dewarp.dewarp_image(images[i]) # 去扭曲
|
|
||||||
cv2.imwrite(f"book_{i}.jpg", dewarped_image)
|
|
||||||
print(f"{len(images)}张图片已保存")
|
|
||||||
time.sleep(3600)
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
x-env:
|
|
||||||
&template
|
|
||||||
image: fcb_photo_review:2.0.0
|
|
||||||
|
|
||||||
services:
|
|
||||||
photo_dewarp:
|
|
||||||
<<: *template
|
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
container_name: photo_dewarp
|
|
||||||
hostname: photo_dewarp
|
|
||||||
volumes:
|
|
||||||
- ./log:/app/log
|
|
||||||
- ./model:/app/model
|
|
||||||
command: [ "dewarp_test.py" ]
|
|
||||||
deploy:
|
|
||||||
resources:
|
|
||||||
reservations:
|
|
||||||
devices:
|
|
||||||
- device_ids: [ "1" ]
|
|
||||||
capabilities: [ "gpu" ]
|
|
||||||
driver: "nvidia"
|
|
||||||
Reference in New Issue
Block a user