diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..15abd6b4 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,7 @@ +*.png filter=lfs diff=lfs merge=lfs -text +*.jpg filter=lfs diff=lfs merge=lfs -text +*.mp4 filter=lfs diff=lfs merge=lfs -text +*.wav filter=lfs diff=lfs merge=lfs -text +*.JPEG filter=lfs diff=lfs merge=lfs -text +*.jpeg filter=lfs diff=lfs merge=lfs -text +*.pth filter=lfs diff=lfs merge=lfs -text diff --git a/data/test/segmentation/data/000000309022.jpg b/data/test/segmentation/data/000000309022.jpg new file mode 100755 index 00000000..7aa51424 --- /dev/null +++ b/data/test/segmentation/data/000000309022.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:898b141c663f242f716bb26c4cf4962452927e6bef3f170e61fb364cd6359d00 +size 187956 diff --git a/data/test/segmentation/models/segformer_b0.pth b/data/test/segmentation/models/segformer_b0.pth new file mode 100644 index 00000000..85e68166 --- /dev/null +++ b/data/test/segmentation/models/segformer_b0.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:94d7df6a4ff3c605916378304b2a00404a23d4965d226a657417061647cb46a6 +size 45361179 diff --git a/docs/source/develop.md b/docs/source/develop.md index 705e23f8..7273c16c 100644 --- a/docs/source/develop.md +++ b/docs/source/develop.md @@ -39,12 +39,55 @@ pre-commit run --all-files bash scripts/ci_test.sh ``` - ### 2.2 Test data - if you add new data, please do the following to commit it to git-lfs before "git commit": - ```bash - python git-lfs/git_lfs.py add data/test/new_data - python git-lfs/git_lfs.py push - ``` + +### 2.2 Test data storage + +As we need a lot of data for testing, including images, models. We use git lfs +to store those large files. + +1. install git-lfs(version>=2.5.0) + +for mac + +```bash +brew install git-lfs +git lfs install +``` + +for centos, please download rpm from git-lfs github release [website](https://github.com/git-lfs/git-lfs/releases/tag/v3.2.0) +```bash +wget http://101374-public.oss-cn-hangzhou-zmf.aliyuncs.com/git-lfs-3.2.0-1.el7.x86_64.rpm +sudo rpm -ivh git-lfs-3.2.0-1.el7.x86_64.rpm +git lfs install +``` + +for ubuntu +```bash +curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash +sudo apt-get install git-lfs +git lfs install +``` + +2. track your data type using git lfs, for example, to track png files +```bash +git lfs track "*.png" +``` + +3. add your test files to `data/test/` folder, you can make directories if you need. +```bash +git add data/test/test.png +``` + +4. commit your test data to remote branch +```bash +git commit -m "xxx" +``` + +To pull data from remote repo, just as the same way you pull git files. +```bash +git pull origin branch_name +``` + ## 3. Build pip package ```bash