Package deepboof.io

Class DeepBoofDataBaseOps

java.lang.Object
deepboof.io.DeepBoofDataBaseOps

public class DeepBoofDataBaseOps extends Object
Functions for obtaining and processing network models
  • Constructor Details

    • DeepBoofDataBaseOps

      public DeepBoofDataBaseOps()
  • Method Details

    • downloadModel

      public static File downloadModel(List<String> addresses, File destination)
      Attempts to download a model from the list of addresses. If one fails it will try the next in the list. After downloading the model it will then unzip it and return the path to the unzipped directory. It is assumed the unzipped directory's name is the same as the file it's compressed in.
      Parameters:
      addresses - List of address that it can be downloaded from
      destination - Directory that the file should be downloaded to and decompressed in
      Returns:
      The directory containing the decompressed model
    • downloadModel

      public static File downloadModel(String address, File destination)
      Parameters:
      address - Address to downloaded from
      destination - Directory that the file should be downloaded to and decompressed in
      Returns:
      The directory containing the decompressed model
      See Also:
    • download

      public static int download(List<String> urls, File output)
      Will attempt to download the file from the list of URLs. If one failes it will go to the next in the list after printing why it failed
      Parameters:
      urls - Sources for the file
      output - Where to save the file to
      Returns:
      Index of url it downloaded or -1 if it failed
    • download

      public static void download(String location, File output) throws IOException
      Downloads the specified URL. Throws an IOException if it fails for any reason. Prints out information and status to console
      Parameters:
      location - Location of file
      output - Where it will save the downloaded file to
      Throws:
      IOException - Thrown if anything goes wrong
    • decompressTGZ

      public static void decompressTGZ(File src, File dst)
    • decompressZip

      public static void decompressZip(File src, File dst, boolean deleteZip)
    • moveInsideAndDeleteDir

      public static void moveInsideAndDeleteDir(File srcDir, File dstDir)
      Moves everything that's inside the source directory into the destination directory then deletes the source dir.
      Parameters:
      srcDir - source directory
      dstDir - destination directory