Package deepboof.io
Class DeepBoofDataBaseOps
java.lang.Object
deepboof.io.DeepBoofDataBaseOps
Functions for obtaining and processing network models
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddecompressTGZ(File src, File dst) static voiddecompressZip(File src, File dst, boolean deleteZip) static voidDownloads the specified URL.static intWill attempt to download the file from the list of URLs.static FiledownloadModel(String address, File destination) static FiledownloadModel(List<String> addresses, File destination) Attempts to download a model from the list of addresses.static voidmoveInsideAndDeleteDir(File srcDir, File dstDir) Moves everything that's inside the source directory into the destination directory then deletes the source dir.
-
Constructor Details
-
DeepBoofDataBaseOps
public DeepBoofDataBaseOps()
-
-
Method Details
-
downloadModel
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 fromdestination- Directory that the file should be downloaded to and decompressed in- Returns:
- The directory containing the decompressed model
-
downloadModel
- Parameters:
address- Address to downloaded fromdestination- Directory that the file should be downloaded to and decompressed in- Returns:
- The directory containing the decompressed model
- See Also:
-
download
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 fileoutput- Where to save the file to- Returns:
- Index of url it downloaded or -1 if it failed
-
download
Downloads the specified URL. Throws an IOException if it fails for any reason. Prints out information and status to console- Parameters:
location- Location of fileoutput- Where it will save the downloaded file to- Throws:
IOException- Thrown if anything goes wrong
-
decompressTGZ
-
decompressZip
-
moveInsideAndDeleteDir
Moves everything that's inside the source directory into the destination directory then deletes the source dir.- Parameters:
srcDir- source directorydstDir- destination directory
-