问题描述
我正在尝试将75,000张图像的目录解压缩以训练CNN.使用进行解压缩时,
I'm trying to unzip a directory of 75,000 images for training a CNN. When unzipping using,
!unzip -uq "/content/BDD_gt_8045.zip" -d "/content/drive/My Drive/Ground_Truth"
并非所有图像都解压缩.我相信大约有5,000.我尝试做过几次,但后来有一些重复.我可以解压缩的图像数量有限制吗?
not all images unzip. I have about 5,000 I believe. I tried doing it several times but then I have some duplicates. Is there a limit to the number of images I can unzip?
目前,我对将所有文件都放入驱动器中以训练模型的方式仍然感到困惑.
I'm currently stuck on how else I'm meant to get all files into my drive to train the model.
推荐答案
Colab的默认'unzip'二进制文件无法正常工作.似乎在几个周期后会自动取消解压缩.运行最新版本的7z,您一切顺利.
Colab's default 'unzip' binary doesn't work as expected. It seems to cancel the unzipping automatically after a few cycles. Run latest version of 7z and you are good to go.
# To extract with full paths
!7z x <filename.zip>
# To extract all the files in the same folder (ignore paths)
!7z e <filename.zip>
# To specify output directory, use '-o'
!7z x <filename.zip> -o '/content/drive/My Drive/Datasets/FashionMNIST'
这篇关于在Google Colab中解压缩图像目录不会解压缩全部内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!