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

How To Use Data Prepare (Fish_data part) #4

Open
sjz1 opened this issue Jan 13, 2023 · 0 comments
Open

How To Use Data Prepare (Fish_data part) #4

sjz1 opened this issue Jan 13, 2023 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@sjz1
Copy link
Contributor

sjz1 commented Jan 13, 2023

How To prepare Fish Data

Please rename the Dirctories like bottom Structure


Before running code

Notice : 반드시 gbt_fish_dtset3.json 과 dtset3 와 같이
이미지를 담은 파일명이 해당 json앞에 이름이 있어야 한다


(Ex) json : gbt_fish_dtset_val_images.json ==> image folder : val_images


Data File Rename Convention

1. 어류 개체 촬영 영상 --> Fish_dataset


폴더 이름을 Fish _dataset으로 바꿔 주기


2. Training 폴더에 들어 가기


2-1 앞에 라벨이라는 단어 제거해주기

[라벨]gbt_fish_dtset -> gbt_fish_dtset


2-2 [원천]dtset/dtset을 다음 dtset과 같이 속의 폴더를 꺼내주기

[원천]dtset1/dtset1 -> dtset1

[원천]dtset2/dtset2 -> dtset2

[원천]dtset3/dtset3 -> dtset3

[원천]dtset4/dtset4 -> dtset4


3. Validation 폴더에 들어 가기


3-1

[라벨]gbt_fish_dtset -> gbt_fish_dtset


3-2

[라벨]gbt_fish_dtset.json -> gbt_fish_dtset_val_images.json

[원천]images -> val_images


4. 다음과 같은 구조가 만들어졌는지 확인하기

📂Fish

┣ 📂Fish_dataset

┃ ┣ 📂Training

┃ ┃ ┣ 📂dtset

┃ ┃ ┃ ┣ 📂dtset1

┃ ┃ ┃ ┣ 📂dtset2

┃ ┃ ┃ ┣ 📂dtset3

┃ ┃ ┃ ┗ 📂dtset4

┃ ┃ ┗ 📂gbt_fish_dtset

┃ ┃ ┃ ┗ 📜gbt_fish_dtset1.json

┃ ┃ ┃ ┗ 📜gbt_fish_dtset2.json

┃ ┃ ┃ ┗ 📜gbt_fish_dtset3.json

┃ ┃ ┃ ┗ 📜gbt_fish_dtset4.json

┃ ┗ 📂Validation

┃ ┃ ┣ 📂dtset

┃ ┃ ┃ ┗ 📂val_images

┃ ┃ ┣ 📂gbt_fish_dtset

┃ ┃ ┃ ┗ 📜gbt_fish_dtset_val_images.json

┣ 📂Function

┃ ┣ 📜annotation_part.py

┃ ┗ 📜image_part.py

┣ 📂utils

┃ ┗ 📜json_refactor.py

┗ 📜Fish_Data_Crop.py (main)

📂Sashimi



다음과 같은 세팅을 마친 후


5. gbt_fish_dtset_val_images.json를 열어


"categories":[]


"categories":[{"name":"Olive flounder","supercategory":"fish","id":1},{"name":"Korea rockfish","supercategory":"fish","id":2},{"name":"Red seabream","supercategory":"fish","id":3},{"name":"Black porgy","supercategory":"fish","id":4},{"name":"Rock bream","supercategory":"fish","id":5}]


로 바꿔주자

6. Fish_Data_Crop.py를 실행 시켜준다

경로 등은 설정



7. 실행 이후 다음과 같은 파일 구조가 만들어졌는지 확인

After running code

📂Fish

┣ 📂Fish_dataset

┃ ┣ 📂output

┃ ┃ ┣ 📂analysis_csv

┃ ┃ ┃ ┣ 📗catagory_list.csv

┃ ┃ ┃ ┣ 📗train_images_size_list.csv

┃ ┃ ┃ ┣ 📗train.csv

┃ ┃ ┃ ┣ 📗valid_catagory_list.csv

┃ ┃ ┃ ┣ 📗valid_images_size_list.csv

┃ ┃ ┃ ┗ 📗valid_images_size_list.csv

┃ ┃ ┣ 📂crop_image

┃ ┃ ┃ ┣ 📂dtset1

┃ ┃ ┃ ┣ 📂dtset2

┃ ┃ ┃ ┣ 📂dtset3

┃ ┃ ┃ ┣ 📂dtset4

┃ ┃ ┃ ┗ 📂val_images

┃ ┃ ┗ 📂new_json_set

┃ ┃ ┃ ┣ 📜[new]_gbt_fish_dtset_val_images.json

┃ ┃ ┃ ┣ 📜[new]_gbt_fish_dtset1.json

┃ ┃ ┃ ┣ 📜[new]_gbt_fish_dtset2.json

┃ ┃ ┃ ┣ 📜[new]_gbt_fish_dtset3.json

┃ ┃ ┃ ┣ 📜[new]_gbt_fish_dtset4.json

┃ ┣ 📂Training

┃ ┗ 📂Validation

┣ 📂Function

┃ ┣ 📜annotation_part.py

┃ ┗ 📜image_part.py

┣ 📂utils

┃ ┗ 📜json_refactor.py

┗ 📜Fish_Data_Crop.py (main)

📂Sashimi


🎉 Congratulations 🎉

LimePencil added a commit that referenced this issue Jan 18, 2023
# This is the 1st commit message:

[Test] travis

Co-authored-by: Yoon Sang Jun <SangJunni@users.noreply.github.com>

# This is the commit message #2:

[Test] travis test 2

# This is the commit message #3:

[Test] test 2

# This is the commit message #4:

[Fix] test 3

# This is the commit message #5:

[Fix] fix

# This is the commit message #6:

[Fix] fix2

# This is the commit message #7:

[fix] fix4

# This is the commit message #8:

[Fix] fix5

# This is the commit message #9:

[Fix] fix 6
@0seob 0seob added the documentation Improvements or additions to documentation label Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants