代码拉取完成,页面将自动刷新
cd preprocess
python parse_replay_info.py
--replays_paths $REPLAY_FOLDER_PATH_1$;$REPLAY_FOLDER_PATH_2$;...;$REPLAY_FOLDER_PATH_N$
--save_path $SAVE_PATH$
--n_instance [N_PROCESSES]
--batch_size [BATCH_SIZE]
import json
from google.protobuf.json_format import Parse
from s2clientprotocol import sc2api_pb2 as sc_pb
with open(REPLAY_INFO_PATH) as f:
info = json.load(f)
REPLAY_PATH = info['path']
REPLAY_INFO_PROTO = Parse(info['info'], sc_pb.ResponseReplayInfo())
python preprocess.py
--infos_path $REPLAY_INFO_PATH$
--save_path $SAVE_PATH$
--min_duration [MIN_DURATION]
--max_duration [MAX_DURATION]
--min_apm [MIN_APM]
--min_mmr [MIN_MMR]
[[REPLAY_PATH_1, REPLAY_INFO_PATH_1],
[REPLAY_PATH_2, REPLAY_INFO_PATH_2],
...,
[REPLAY_PATH_N, REPLAY_INFO_PATH_N]]
cd parse_replay
python extract_actions.py
--hq_replay_set $PREFILTERED_REPLAY_LIST$
--save_path $SAVE_PATH$
--n_instance [N_PROCESSES]
--batch_size [BATCH_SIZE]
--step_mul [STEP_SIZE]
--width [WORLD_WIDTH]
--map_size [MAP_SIZE]
import json
from google.protobuf.json_format import Parse
from s2clientprotocol import sc2api_pb2 as sc_pb
with open(ACTION_PATH) as f:
actions = json.load(f)
for actions_per_frame in actions:
for action_str in actions_per_frame:
action = Parse(action_str, sc_pb.Action())
python sample_actions.py
--hq_replay_set $PREFILTERED_REPLAY_LIST$
--parsed_replays $PARSED_REPLAYS$
--infos_path $REPLAY_INFOS$
--step_mul [STEP_SIZE]
--skip [SKIP_FRAMES]
[FRAME_ID_1, FRAME_ID_2, ..., FRAME_ID_N]
python parse_replay.py
--hq_replay_set $PREFILTERED_REPLAY_LIST$
--save_path $SAVE_PATH$
--n_instance [N_PROCESSES]
--batch_size [BATCH_SIZE]
--width [WORLD_WIDTH]
--map_size [MAP_SIZE]
import json
from google.protobuf.json_format import Parse
from s2clientprotocol import sc2api_pb2 as sc_pb
with open(GLOBAL_INFO_PATH) as f:
global_info = json.load(f)
GAME_INFO = Parse(global_info['game_info'], sc_pb.ResponseGameInfo())
DATA_RAW = Parse(global_info['data_raw'], sc_pb.ResponseData())
import stream
from s2clientprotocol import sc2api_pb2 as sc_pb
OBS = [obs for obs in stream.parse(SAMPLED_OBSERVATION_PATH), sc_pb.ResponseObservation)]
python replay2global_features.py
--hq_replay_set $PREFILTERED_REPLAY_LIST$
--parsed_replay_path: $PARSED_REPLAYS$
--step_mul [STEP_SIZE]
[state_1, state_2, ..., state_N]
state_t = {...} [READ THE CODE or PRINT]
cd extract_features
python replay_stat.py
--hq_replay_path $PREFILTERED_REPLAY_FOLDER$
--parsed_replay_path $PARSED_REPLAYS$
--race [RACE]
The stat files with postfix _human.json is human-readable.
python global_feature_vector.py
--hq_replay_set $PREFILTERED_REPLAY_LIST$
--parsed_replay_path: $PARSED_REPLAYS$
python spatial_feature_tensor.py
--hq_replay_set $PREFILTERED_REPLAY_LIST$
--parsed_replay_path: $PARSED_REPLAYS$
--step_mul [STEP_SIZE]
--n_workers [#PROCESSES]
python split.py
--hq_replay_set $PREFILTERED_REPLAY_LIST$
--root $ROOT_PARSED_REPLAYS$
--parsed_replay_path $PARSED_REPLAYS$
--save_path $SAVE_PATH$
--ratio [TRAIN:VAL:TEST]
--seed [RANDOM_SEED]
[{RACE_1: [{"global__path": GLOBAL_FEATURE_PATH,
"spatial_path_S": SPATIAL_FEATURE_PATH_S,
"spatial_path_G": SPATIAL_FEATURE_PATH_G}, ...],
RACE_2: [{...}, ...]}, {...}, ...]
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。