fix enviroment.yaml and update readme
This commit is contained in:
@@ -58,15 +58,16 @@ The results in the parentheses are mentioned in the papers
|
||||
- tensorboard
|
||||
- opencv-python
|
||||
- tqdm
|
||||
- py7zr
|
||||
|
||||
Install dependenices by [Anaconda](https://conda.io/projects/conda/en/latest/user-guide/install/index.html):
|
||||
```
|
||||
conda install tqdm pyyaml tensorboard opencv
|
||||
conda install tqdm pyyaml tensorboard opencv py7zr
|
||||
conda install pytorch==1.6.0 torchvision -c pytorch
|
||||
```
|
||||
Or, Install dependenices by pip:
|
||||
```
|
||||
pip install tqdm pyyaml tensorboard opencv-python
|
||||
pip install tqdm pyyaml tensorboard opencv-python py7zr
|
||||
pip install torch==1.6.0 torchvision==0.7.0
|
||||
```
|
||||
### Prepare dataset
|
||||
|
||||
@@ -35,6 +35,9 @@ Download URL: http://www.cbsr.ia.ac.cn/GaitDatasetB-silh.zip
|
||||
Step1: Download URL: http://www.am.sanken.osaka-u.ac.jp/BiometricDB/GaitMVLP.html
|
||||
|
||||
Step2: Unzip the dataset, you will get a structure directory like:
|
||||
```
|
||||
python misc/extractor.py --input_path Path_of_OUMVLP-base --output_path Path_of_OUMVLP-raw --password Given_Password
|
||||
```
|
||||
|
||||
- Original
|
||||
```
|
||||
@@ -67,12 +70,12 @@ Step2: Unzip the dataset, you will get a structure directory like:
|
||||
```
|
||||
Step3 : To rearrange directory of OUMVLP dataset, turning to id-type-view structure, Run
|
||||
```
|
||||
python misc/rearrange_OUMVLP.py --input_path OUMVLP-raw --output_path OUMVLP-rearrange
|
||||
python misc/rearrange_OUMVLP.py --input_path Path_of_OUMVLP-raw --output_path Path_of_OUMVLP-rearranged
|
||||
```
|
||||
|
||||
Step4: Transforming images to pickle file, run
|
||||
```
|
||||
python misc/pretreatment.py --input_path OUMVLP-rearrange --output_path OUMVLP-pkl
|
||||
python misc/pretreatment.py --input_path Path_of_OUMVLP-rearranged --output_path Path_of_OUMVLP-pkl
|
||||
```
|
||||
|
||||
- Processed
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
name: opengait
|
||||
channels:
|
||||
- pytorch
|
||||
- defaults
|
||||
- anaconda
|
||||
- conda-forge
|
||||
dependencies:
|
||||
- python
|
||||
- pip
|
||||
- tqdm
|
||||
- numpy
|
||||
- pandas
|
||||
- matplotlib
|
||||
- scikit-learn
|
||||
- pytorch
|
||||
- torchvision
|
||||
- cudatoolkit=10.2
|
||||
- ipykernel
|
||||
- pip:
|
||||
- tensorboard
|
||||
- seaborn
|
||||
- py7zr
|
||||
+6
-4
@@ -6,7 +6,7 @@ import py7zr
|
||||
from tqdm import tqdm
|
||||
|
||||
|
||||
def extractall(base_path: Path, output_path: Path) -> None:
|
||||
def extractall(base_path: Path, output_path: Path, passwords) -> None:
|
||||
"""Extract all archives in base_path to output_path.
|
||||
|
||||
Args:
|
||||
@@ -18,7 +18,7 @@ def extractall(base_path: Path, output_path: Path) -> None:
|
||||
for file_path in tqdm(list(base_path.rglob('Silhouette_*.7z'))):
|
||||
if output_path.joinpath(file_path.stem).exists():
|
||||
continue
|
||||
with py7zr.SevenZipFile(file_path, password='OUMVLP_20180214') as archive:
|
||||
with py7zr.SevenZipFile(file_path, password=passwords) as archive:
|
||||
total_items = len(
|
||||
[f for f in archive.getnames() if f.endswith('.png')]
|
||||
)
|
||||
@@ -32,11 +32,13 @@ def extractall(base_path: Path, output_path: Path) -> None:
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser(description='OUMVLP extractor')
|
||||
parser.add_argument('-b', '--base_path', type=str,
|
||||
parser.add_argument('-b', '--input_path', type=str,
|
||||
required=True, help='Base path to OUMVLP .7z files')
|
||||
parser.add_argument('-o', '--output_path', type=str,
|
||||
required=True, help='Output path for extracted files')
|
||||
parser.add_argument('-p', '--password', type=str,
|
||||
required=True, help='password for extracted files')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
extractall(Path(args.base_path), Path(args.output_path))
|
||||
extractall(Path(args.input_path), Path(args.output_path), args.password)
|
||||
|
||||
Reference in New Issue
Block a user