Code Monkey home page Code Monkey logo

move_files_with_same_name's Introduction

Move files with same names

Python script to copy/move files with the same name but different extensions.

About

  • The images and annotations needed for neural network training may unequally be in the same/different folders.
  • During training, we ensure that the corresponding annotations are present for each image.
  • During labeling, it is possible that some images will not contain their corresponding annotations (such as XML, TXT, or JSON).
  • This script separates images (all formats such as PNG, JPG, etc.) from the folder based on annotation files (all formats TXT, JSON, etc.).

Usage

 python3 move_file.py --annotations "/folder/containing/annotations/" --ext_a xml --images "folder/containing/images" --ext_i png      
  • annotations: You can point to a folder containing annotations based on their file names to move the corresponding images with this flag.
  • ext_a: This flag indicates the type of files (annotations) you intend to move. It could be XML, JSON, TXT, etc.
  • images This is used for a folder containing several images from which you wish to filter out only those with annotations as specified by the annotations flag.
  • ext_i Image extensions, such as PNG, JPG, JPEG, etc., are described here.
  • --move (Optional) is used to move files from the original directory. The default behavior is copying files instead of moving unless specified otherwise.

move_files_with_same_name's People

Stargazers

 avatar

Watchers

 avatar  avatar

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.