Coder Social home page Coder Social logo

Comments (2)

tanyuhe avatar tanyuhe commented on June 12, 2024 1

OK,自己写了一个
import os

定义输入图片和模型文件的路径

input_dir = '测试文件夹'
model_path = '模型路径'

遍历目录及其子目录中的所有文件

for dirpath, dirnames, filenames in os.walk(input_dir):
# 遍历当前目录下的文件
for filename in filenames:
# 检查文件是否为图片文件(这里假设图片文件以 .jpg 结尾)
if filename.endswith('.jpg'):
# 构建输入图片的完整路径
input_image = os.path.join(dirpath, filename)

        # 调用 vis_cam.py 脚本并传递输入图片和模型路径作为参数
        os.system(f'python tools/vis_cam.py {input_image} {model_path} --save-path 输出路径'+filename)

from awesome-backbones.

Fafa-DL avatar Fafa-DL commented on June 12, 2024

这个我理解应该自己稍微加个循环就能实现

from awesome-backbones.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.