เราได้เปิดตัว MMACTION ซึ่งเป็นกล่องเครื่องมือความเข้าใจแอ็คชั่นที่เต็มเปี่ยมตาม Pytorch มันรวมถึงการใช้งานสำหรับ TSN เช่นเดียวกับเฟรมเวิร์ก STOA อื่น ๆ สำหรับงานต่าง ๆ บทเรียนที่เราเรียนรู้ใน repo นี้รวมอยู่ใน MMAction เพื่อให้มันเดิมพัน เราขอแนะนำให้คุณเปลี่ยนไป repo นี้จะยังคงอยู่ที่นี่สำหรับการอ้างอิงทางประวัติศาสตร์
หมายเหตุ : ใช้ git clone --recursive https://github.com/yjxiong/tsn-pytorch เพื่อโคลนโครงการนี้ มิฉะนั้นคุณจะไม่สามารถใช้ซีรี่ส์ CNN Series Inception ได้
นี่คือการปรับปรุงใหม่ของเครือข่ายเซ็กเมนต์ชั่วคราว (TSN) ใน pytorch การตั้งค่าทั้งหมดจะถูกเก็บไว้เหมือนกับการใช้งานคาเฟอีนดั้งเดิม
สำหรับการแยกการไหลแบบออปติคัลและการสร้างรายการวิดีโอคุณยังต้องใช้ TSN Codebase ดั้งเดิม
ในการฝึกอบรมรุ่นใหม่ให้ใช้สคริปต์ main.py
คำสั่งในการทำซ้ำการทดลอง TSN ดั้งเดิมของรูปแบบ RGB บน UCF101 สามารถเป็นได้
python main.py ucf101 RGB < ucf101_rgb_train_list > < ucf101_rgb_val_list >
--arch BNInception --num_segments 3
--gd 20 --lr 0.001 --lr_steps 30 60 --epochs 80
-b 128 -j 8 --dropout 0.8
--snapshot_pref ucf101_bninception_ สำหรับโมเดลการไหล:
python main.py ucf101 Flow < ucf101_flow_train_list > < ucf101_flow_val_list >
--arch BNInception --num_segments 3
--gd 20 --lr 0.001 --lr_steps 190 300 --epochs 340
-b 128 -j 8 --dropout 0.7
--snapshot_pref ucf101_bninception_ --flow_pref flow_ สำหรับรุ่น RGB-DIFF:
python main.py ucf101 RGBDiff < ucf101_rgb_train_list > < ucf101_rgb_val_list >
--arch BNInception --num_segments 7
--gd 40 --lr 0.001 --lr_steps 80 160 --epochs 180
-b 128 -j 8 --dropout 0.8
--snapshot_pref ucf101_bninception_ หลังจากการฝึกอบรมจะมีจุดตรวจที่บันทึกโดย Pytorch ตัวอย่างเช่น ucf101_bninception_rgb_checkpoint.pth
ใช้คำสั่งต่อไปนี้เพื่อทดสอบประสิทธิภาพในโปรโตคอลการทดสอบ TSN มาตรฐาน:
python test_models.py ucf101 RGB < ucf101_rgb_val_list > ucf101_bninception_rgb_checkpoint.pth
--arch BNInception --save_scores < score_file_name >
หรือสำหรับแบบจำลองการไหล:
python test_models.py ucf101 Flow < ucf101_rgb_val_list > ucf101_bninception_flow_checkpoint.pth
--arch BNInception --save_scores < score_file_name > --flow_pref flow_