MXNet 프레임워크에서는 RecordIO 를 이용하여 학습에 사용되는 데이터의 리스트를 만들고
해당파일을 rec파일로 만들어서 학습에 사용한다
단순히 이미지를 순차적으로 읽어 오는 경우에 비해 학습에 걸리는 시간이 유의미하게 차이나기 때문에
필요한 경우 rec파일로 만들어서 사용하면 도움이 될 수 있다.
파일 변환에는 im2rec.py 파일을 이용하고 해당 파일은 공식 github에서 받을 수 있다.
https://github.com/apache/incubator-mxnet/blob/master/tools/im2rec.py
GitHub - apache/incubator-mxnet: Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware D
Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more - GitHub - apache/incubato...
github.com
[make list]
사용법 : python im2rec.py [outputpath/title] [DBPATH] --recursive --list --num-thread 8
예시 : python im2rec.py ./output/output /home/user/database/train --recursive --list --num-thread 8
[make rec - train]
사용법 : python im2rec.py [outputpath/] [DBPath] --recursive --pass-through --pack-label --num-thread 8
예시 : python im2rec.py ./output/ /home/user/database/train --recursive --pass-through --pack-label --num-thread 8
[make rec - test]
사용법 : python im2rec.py [outputpath/] [DBPath] --recursive --pass-through --pack-label --no-shuffle --num-thread 8
'전공관련 > Deep Learning' 카테고리의 다른 글
[Pytorch] DDP 환경에서 load_state_dict 사용시 OOM 발생 상황을 해결하자 (0) | 2023.06.08 |
---|---|
[Pytorch] Boolean value of Tensor with more than one value is ambiguous 에러를 해결하자. (0) | 2023.06.07 |
[Pytorch] pycharm 환경에서 torch.distributed.launch를 실행하자 (1) | 2021.07.13 |
[Tensorflow] h5py 관련 오류를 해결하자 (0) | 2021.04.26 |
[ONNX] cuda 버전에 따른 python onnxruntime 버전을 맞추자. (0) | 2021.03.09 |