Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discussion] ICDAR_2017 datasets unzip error #17

Closed
2 tasks done
seoulsky-field opened this issue Apr 14, 2022 · 4 comments
Closed
2 tasks done

[Discussion] ICDAR_2017 datasets unzip error #17

seoulsky-field opened this issue Apr 14, 2022 · 4 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@seoulsky-field
Copy link
Contributor

seoulsky-field commented Apr 14, 2022

What

ICDAR_2017 datasets를 unzip하고자 하였으나 unzip이 되지 않았습니다.

  • Terminal에 찍힌 Process

스크린샷 2022-04-14 오후 5 30 19


images_1부터 8까지 동일한 log가 찍혔으며 8까지 unzip command가 다 돈 이후로 아래와 같은 추가 에러가 발생하였습니다.

스크린샷 2022-04-14 오후 5 33 05


image_1부터 8까지 찍혔던 log가 training_localization_transcription, validation_images, validation_localization_transcription zip 파일에 대해서도 동일한 에러가 발생하였습니다.

Why

log에 찍힌 authority문제일 수 있지 않을까 생각합니다. (local 폴더와 SSH연결이 아닌 SSH서버를 직접 사용하기 때문으로 추측)

how

@seoulsky-field seoulsky-field added the help wanted Extra attention is needed label Apr 14, 2022
@seoulsky-field seoulsky-field self-assigned this Apr 14, 2022
@seoulsky-field seoulsky-field added this to To do in Data Annotation via automation Apr 14, 2022
@yehyunsuh
Copy link
Contributor

yehyunsuh commented Apr 14, 2022

해결 방법을 찾았습니다. 제가 아래 말씀드린 방법을 순서대로 진행해주시면 됩니다. 다운로드가 끝난 분들은 2번부터 진행해주세요.

  1. download.sh를 아래 코드로 진행 - 기존에 aistage 코드를 조금 분할했습니다. download.sh 파일은 zip 파일이 다운로드 받았으면 하는 위치에 생성하여 실행시키시면 됩니다. 저는 opt/ml/input에서 진행했습니다. 추가적으로 urls.txt 파일도 같은 경로에 있어야 합니다.
  • urls.txt
https://datasets.cvc.uab.es/rrc/ch8_training_images_1.zip
https://datasets.cvc.uab.es/rrc/ch8_training_images_2.zip
https://datasets.cvc.uab.es/rrc/ch8_training_images_3.zip
https://datasets.cvc.uab.es/rrc/ch8_training_images_4.zip
https://datasets.cvc.uab.es/rrc/ch8_training_images_5.zip
https://datasets.cvc.uab.es/rrc/ch8_training_images_6.zip
https://datasets.cvc.uab.es/rrc/ch8_training_images_7.zip
https://datasets.cvc.uab.es/rrc/ch8_training_images_8.zip
https://datasets.cvc.uab.es/rrc/ch8_training_localization_transcription_gt_v2.zip
https://rrc.cvc.uab.es/downloads/ch8_validation_images.zip
https://datasets.cvc.uab.es/rrc/ch8_validation_localization_transcription_gt_v2.zip
  • download.sh
    sh download.sh
#!/usr/bin/env bash

for url in $(cat urls.txt | tr -d '\r')
do
    wget $url --no-check-certificate
done
  1. 4가지 파일을 생성해주셔야합니다.
    /opt/ml/input/data/ICDAR17_MLT/raw/ch8_training_images
    /opt/ml/input/data/ICDAR17_MLT/raw/ch8_training_gt
    /opt/ml/input/data/ICDAR17_MLT/raw/ch8_validation_images
    /opt/ml/input/data/ICDAR17_MLT/raw/ch8_validation_gt
    해당 경로에 동일한 경로명으로 파일을 생성합니다. 기존에 No directory 오류가 났던 이유가 1) 저 위의 파일들이 생성되지 않았으며 2) unzip할 파일들이 있는 경로에 sh 파일이 없었을 수도 있습니다.

  2. zip파일들이 있는 경로에 unzip_train.sh와 unzip_val.sh 파일을 생성해줍니다.
    (저는 기존에 opt/ml/input에 zip file을 다운 받았기 때문에, 동일한 경로에 shell file을 생성해주었습니다.)

  • unzip_train.sh
    sh unzip_train.sh
for i in ch8_training_images*
do
  unzip $i -d /opt/ml/input/data/ICDAR17_MLT/raw/ch8_training_images
done
unzip ch8_training_localization_transcription_gt_v2.zip -d /opt/ml/input/data/ICDAR17_MLT/raw/ch8_training_gt
  • unzip_val.sh
    sh unzip_val.sh
for i in ch8_validation_images*
do
  unzip $i -d /opt/ml/input/data/ICDAR17_MLT/raw/ch8_validation_images
done
unzip ch8_validation_localization_transcription_gt_v2.zip -d /opt/ml/input/data/ICDAR17_MLT/raw/ch8_validation_gt

4. 위의 과정이 전부 완료가 되면 convert_mlt.py 파일의 directory를 바꿔서 돌려주시면 됩니다. 해당 부분은 아직 저도 안 했기 때문에, 완료되면 이 issue의 comment로 달겠습니다.
4. conver_mlt.py 파일의 경로를

SRC_DATASET_DIR = '/opt/ml/input/data/ICDAR17_MLT'  
DST_DATASET_DIR = '/opt/ml/input/data/ICDAR17_Korean'  

로 변경하고 돌려주시면 됩니다.

@seoulsky-field seoulsky-field changed the title [Help Wanted] ICDAR_2017 datasets unzip error [Discussion] ICDAR_2017 datasets unzip error Apr 14, 2022
@seoulsky-field
Copy link
Contributor Author

seoulsky-field commented Apr 14, 2022

질문 있습니다. 2번에 2가지 파일을 생성해 달라고 해주셨는데 작성해주신 4개의 폴더를 생성하는 건가요? 아니면 4개의 폴더를 생성하고 각각의 폴더에 2가지 파일(unzip_train.sh, unzip_vali.sh)을 생성하는 건가요?

@yehyunsuh
Copy link
Contributor

yehyunsuh commented Apr 14, 2022

@seoulsky-field
4가지 폴더를 생성해야합니다. 잘못 적었네요. train_image, train_gt, val_image, val_gt 4가지 폴더 전부 생성해주시면 됩니다.

@seoulsky-field
Copy link
Contributor Author

오 성공적으로 되었습니다. 감사합니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
Development

No branches or pull requests

2 participants