You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

运行evaluate.py提示缺少--in-path和--out-path参数的解决方法

Fixing "required arguments: --in-path, --out-path" Error in fast-style-transfer's evaluate.py

Let's break down what's causing this error and how to fix it quickly:

The Root Cause: Malformed Command Syntax

Looking at your command line input:

python3 evaluate.py --checkpoint ./rain-princess.ckpt --in-path/Users/hassan/Downloads/fast-style-transfer-master--out-path ./output_image.jpg

Two critical syntax mistakes are tripping up the argument parser:

  • You didn't add a space between --in-path and your input directory path. The parser sees --in-path/Users/... as a single invalid argument instead of recognizing --in-path and its corresponding value.
  • There's no space between your input path and --out-path either, which further confuses the parser about where one parameter ends and the next begins.

Corrected Command

Here's the fixed version of your command (note the spaces around each parameter flag):

python3 evaluate.py --checkpoint ./rain-princess.ckpt --in-path /Users/hassan/Downloads/fast-style-transfer-master --out-path ./output_image.jpg

Let's verify each part:

  • --checkpoint ./rain-princess.ckpt: Correctly points to your model checkpoint (assuming this file exists in your current working directory)
  • --in-path /Users/hassan/Downloads/fast-style-transfer-master: Properly specifies your input directory (with a space after the flag)
  • --out-path ./output_image.jpg: Correctly sets the output image path (again, space after the flag)

Checking File Placement (Your Original Suspicions)

If you still run into issues after fixing the command, here's how to confirm file placement:

  • Verify the checkpoint file: Run ls ./rain-princess.ckpt in your terminal. If it returns "No such file or directory", you'll need to provide the full path to the .ckpt file (e.g., --checkpoint /path/to/your/rain-princess.ckpt).
  • Check the input path: Ensure /Users/hassan/Downloads/fast-style-transfer-master is a valid directory with images you want to process. You can test this with ls /Users/hassan/Downloads/fast-style-transfer-master.
  • Confirm write permissions: Make sure your user has permission to write to the ./output_image.jpg location. If not, use a different output path (like --out-path ~/Desktop/output_image.jpg).

Quick Test to Validate

To rule out other issues, try running the simplest valid command first:

python3 evaluate.py --checkpoint ./rain-princess.ckpt --in-path ./test-input.jpg --out-path ./test-output.jpg

Just place a test image named test-input.jpg in your current working directory to see if the script runs successfully.

内容的提问来源于stack exchange,提问作者S J

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.09 10:57:55