From cb241d1a299cfcf3819cc86bd0f8bd3bc1bce40d Mon Sep 17 00:00:00 2001 From: sangbumchoi Date: Thu, 2 May 2024 09:21:31 +0000 Subject: [PATCH 1/6] add inference script --- data/dataset_config.py | 6 +- flow/predict.py | 2 + inference.py | 142 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 147 insertions(+), 3 deletions(-) create mode 100644 inference.py diff --git a/data/dataset_config.py b/data/dataset_config.py index 83e01f5..53b510b 100644 --- a/data/dataset_config.py +++ b/data/dataset_config.py @@ -170,9 +170,9 @@ def config_eval_dataloader(args): val_loader = DataLoader(val_dataset, num_workers=8, batch_size=1, shuffle=False, pin_memory=True, drop_last=False) elif args.dataset == "example": # No annotations (annotation path) given - val_data_dirs = ["/path/to/example_dataset/FlowImages_gap1/", - "/path/to/example_dataset/JPEGImages/"] - val_seq = None + val_data_dirs = ["output/flow/FlowImages_gap1", + "output/images"] + val_seq = ['sample'] val_dataset = Example_eval_dataset(data_dirs=val_data_dirs, seqs=val_seq, ref_sam=ref_sam, dataset=args.dataset, flow_gaps=flow_gaps, num_gridside=args.num_gridside) val_loader = DataLoader(val_dataset, num_workers=8, batch_size=1, shuffle=False, pin_memory=True, drop_last=False) diff --git a/flow/predict.py b/flow/predict.py index 778eab9..e8339a3 100644 --- a/flow/predict.py +++ b/flow/predict.py @@ -1,5 +1,6 @@ import sys sys.path.append('core') +sys.path.append('flow/core') import os import cv2 @@ -96,6 +97,7 @@ def predict_batch(args): folder = os.path.basename(args.path) floout = os.path.join(args.outroot, folder) rawfloout = os.path.join(args.raw_outroot, folder) + print(folder, floout, rawfloout) os.makedirs(floout, exist_ok=True) os.makedirs(rawfloout, exist_ok=True) diff --git a/inference.py b/inference.py new file mode 100644 index 0000000..57ffae0 --- /dev/null +++ b/inference.py @@ -0,0 +1,142 @@ +import os +import glob as gb +import argparse +import cv2 +import os +import requests + +def extract_frames(video_path, output_folder): + # Create the output folder if it doesn't exist + os.makedirs(output_folder, exist_ok=True) + + # Open the video file + cap = cv2.VideoCapture(video_path) + + # Variable to keep track of frame count + frame_count = 0 + + # Read frames until there are no more + while cap.isOpened(): + ret, frame = cap.read() + if not ret: + break + + # Save the frame as an image + frame_path = os.path.join(output_folder, f"{frame_count+1:05d}.jpg") + cv2.imwrite(frame_path, frame) + + frame_count += 1 + + # Release the video capture object + cap.release() + +def extract_flow(rgb_path, flow_output_path): + gap = [1] + reverse = [0, 1] + batch_size = 4 + + folder = gb.glob(os.path.join(rgb_path, '*')) + for r in reverse: + for g in gap: + for f in folder: + print('===> Running {}, gap {}'.format(f, g)) + mode = 'flow/raft-things.pth' # model + if r==1: + raw_outroot = flow_output_path + '/Flows_gap-{}/'.format(g) # where to raw flow + outroot = flow_output_path + '/FlowImages_gap-{}/'.format(g) # where to save the image flow + elif r==0: + raw_outroot = flow_output_path + '/Flows_gap{}/'.format(g) # where to raw flow + outroot = flow_output_path + '/FlowImages_gap{}/'.format(g) # where to save the image flow + + os.system("python flow/predict.py " + "--gap {} --mode {} --path {} --batch_size {} " + "--outroot {} --reverse {} --raw_outroot {}".format(g, mode, f, batch_size, outroot, r, raw_outroot)) + +def create_video_from_images(input_folder, output_video_path, fps): + # Get the list of image files in the input folder + image_files = [os.path.join(input_folder, file) for file in os.listdir(input_folder) if file.endswith('.png')] + + # Sort the image files by name + image_files.sort() + + # Get the dimensions of the first image to set the video size + first_image = cv2.imread(image_files[0]) + height, width, _ = first_image.shape + + # Define the codec and create VideoWriter object + fourcc = cv2.VideoWriter_fourcc(*'mp4v') # Use appropriate codec based on the output video format + out = cv2.VideoWriter(output_video_path, fourcc, fps, (width, height)) + + # Iterate over each image and add it to the video + for image_file in image_files: + img = cv2.imread(image_file) + out.write(img) + + # Release VideoWriter object + out.release() + +def download_weight(filename, url): + # Check if the file exists locally + if not os.path.exists(filename): + print(f"File '{filename}' not found locally. Proceeding with download.") + + # Download the file + response = requests.get(url) + with open(filename, 'wb') as f: + f.write(response.content) + + print("File downloaded successfully!") + else: + print(f"File '{filename}' already exists locally. No need to download.") + +def inference(args): + """ + User should change the configuration path to appropriate path. + Install segment-anything + """ + ckpt = 'frame_level_flowpsam_vitbvith_train_on_oclrsyn_dvs17m.pth' + rgb_encoder_ckpt_path = 'sam_vit_h_4b8939.pth' + download_weight(rgb_encoder_ckpt_path, 'https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth') + flow_encoder_ckpt_path = 'sam_vit_b_01ec64.pth' + download_weight(flow_encoder_ckpt_path, 'https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pth') + os.system("python evaluation.py " + "--model flowpsam --ckpt {} --rgb_encoder_ckpt_path {} --flow_encoder_ckpt_path {} --flow_gaps 1 " + "--dataset example --save_path {}".format(ckpt, rgb_encoder_ckpt_path, flow_encoder_ckpt_path, args.flowsam_output_path)) + +""" +python inference.py --video_file_path sample.mp4 --video_output_path output/images/sample --extract_frames --flow_output_path output/flow --extract_flow --visualize_flow --run_flowsam --flowsam_output_path output --visualize_output +""" +if __name__ == '__main__': + parser = argparse.ArgumentParser() + parser.add_argument('--video_file_path', type=str, help="restore checkpoint") + parser.add_argument('--video_output_path', type=str, help="restore checkpoint") + parser.add_argument('--extract_frames', action='store_true', help='convert video file to image file folder') + + parser.add_argument('--flow_output_path', type=str, help="restore checkpoint") + parser.add_argument('--extract_flow', action='store_true', help='whether to run flow ') + parser.add_argument('--visualize_flow', action='store_true', help='whether to run flow ') + + parser.add_argument('--flowsam_output_path', type=str, help="restore checkpoint") + parser.add_argument('--run_flowsam', action='store_true', help='whether to run flow ') + parser.add_argument('--visualize_output', action='store_true', help='whether to run flow ') + args = parser.parse_args() + + if args.extract_frames: + extract_frames(args.video_file_path, args.video_output_path) + + # Split the path into directory and filename + directory, filename = os.path.split(args.video_output_path) + + if args.extract_flow: + extract_flow(directory, args.flow_output_path) + # (Optional) For debug and visualization purpose + if args.visualize_flow: + flow_path = os.path.join(args.flow_output_path, f'FlowImages_gap-1/{filename}') + create_video_from_images(flow_path, f'{args.flow_output_path}/flow.mp4', fps=30) + + if args.run_flowsam: + inference(args=args) + + if args.visualize_output: + output_path = os.path.join(args.flowsam_output_path, f"nonhung/{filename}") + create_video_from_images(output_path, 'output.mp4', fps=30) \ No newline at end of file From 4ec00f54a0069b487eb9e0b9ac7720e3ec659570 Mon Sep 17 00:00:00 2001 From: sangbumchoi Date: Thu, 2 May 2024 09:22:42 +0000 Subject: [PATCH 2/6] remove print --- flow/predict.py | 1 - 1 file changed, 1 deletion(-) diff --git a/flow/predict.py b/flow/predict.py index e8339a3..d9199ab 100644 --- a/flow/predict.py +++ b/flow/predict.py @@ -97,7 +97,6 @@ def predict_batch(args): folder = os.path.basename(args.path) floout = os.path.join(args.outroot, folder) rawfloout = os.path.join(args.raw_outroot, folder) - print(folder, floout, rawfloout) os.makedirs(floout, exist_ok=True) os.makedirs(rawfloout, exist_ok=True) From 55d6741c711fe20b7ee59fd7d975e74a6fd4216b Mon Sep 17 00:00:00 2001 From: sangbumchoi Date: Fri, 3 May 2024 00:38:36 +0000 Subject: [PATCH 3/6] add extra argument --- .../dataset_config.cpython-310.pyc | Bin 0 -> 5376 bytes .../__pycache__/dataset_utils.cpython-310.pyc | Bin 0 -> 2347 bytes .../__pycache__/dvs_loader.cpython-310.pyc | Bin 0 -> 9280 bytes .../example_loader.cpython-310.pyc | Bin 0 -> 3127 bytes .../oclrsyn_loader.cpython-310.pyc | Bin 0 -> 3773 bytes .../__pycache__/ytvos_loader.cpython-310.pyc | Bin 0 -> 5257 bytes data/dataset_config.py | 6 ++--- evaluation.py | 21 ++++++++++++++++-- inference.py | 16 +++++++++---- 9 files changed, 34 insertions(+), 9 deletions(-) create mode 100644 data/__pycache__/dataset_config.cpython-310.pyc create mode 100644 data/__pycache__/dataset_utils.cpython-310.pyc create mode 100644 data/dataloaders/__pycache__/dvs_loader.cpython-310.pyc create mode 100644 data/dataloaders/__pycache__/example_loader.cpython-310.pyc create mode 100644 data/dataloaders/__pycache__/oclrsyn_loader.cpython-310.pyc create mode 100644 data/dataloaders/__pycache__/ytvos_loader.cpython-310.pyc diff --git a/data/__pycache__/dataset_config.cpython-310.pyc b/data/__pycache__/dataset_config.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d2477889683184ebc1efa22628f322734fb959ef GIT binary patch literal 5376 zcmd5=&668P6`vV>kEGr8dUySiwXKjCENrc8$1#p$j7^-S9E_7a5_(S*usIKBf6;-~#fdiBdnD=_5-IZ4+Ugv^T^PB#7 z{rcW=r*XcYv946O29(9gFx=2bN8_qFOCNuCpPG-p*yk8>bno&LU7)ET|t(q!xJ9K>t z3A@#cyg1;I%P@D#jomxkB~(Cekp&TTMML(&hAU;@Mks-@;{-F*M{T7#~;tU;iK zq_HX|Wuq*#o_+VNJ3o~DXe@yWKe+e)yK5J&gcD7nV&UzFZrEk?>GFB$hK-OD${K?D zfs94pGjR^1Uk=`Rc;13X5~v|2u|767jR(f(CP{r^-ZCDUTV`xQN$MDur%C!#a|`ns zlId9D4c{Qy-4@+h-ulESCitxTNT%n%z&@&x~|$WWTy%&wu% z3@L-A4?)AsSJpHOnjV3sxsj$rFFdAs(DX;pbQm>}1zeZ75Zj*@H&bNsnDK@AC|R9! zTsqi{t4qUQ*%kPWx4%IGA+J`tZrqj?-nyzQQQ)U7#y0}AG+8-wK5kbiquPYdRd!_j zxZy?-k6koE5W67bX=1`}jul;u$d1H)t!Kg}ke+FH*5LW)0)P*DbUzDLU~Iyie{Fqa ztr^?Kwy9D<6mMI~S~;)GK+J%shT-e=FpBGuD=*f2k_uUuO|Q*^I?e_RvW_;c0qnlv z@u(H}E8V`buQ9MtkB8msOV~FKWWgAmO(YtzaD#*lOcQM78snbJ+-_4!tK=H)jBS4J?3@Iw2SAVxV{QQ(o~iW-|b$g4^B^$y1Bc+^-EXI zck9!Yz4PAN-%FGwQq^lJ-Gl>RSZIb1Yt3HRm4lfke;7o5trf^N?bG30Q&6`<+{mM~ z7IOtvsb)_O^PVeeaZf~pqQ~&;@M=)vi zl^`U7R;=}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a0*=NlM~=Pb{CixQiVsEVH_}g zrj{$AGIKu4zca|i=ui$serKDVN7~oM&u1CanR^3;@B!38z^)^OJ0CL%UtOl-&;P2O Z({37H!vNu^)i=-{{E8&7g2I`L{{VccLKpx5 literal 0 HcmV?d00001 diff --git a/data/dataloaders/__pycache__/dvs_loader.cpython-310.pyc b/data/dataloaders/__pycache__/dvs_loader.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..707bef1a93dd1d93115c847b31a5adbe7b5cba6e GIT binary patch literal 9280 zcmd5>-;W#Db)H`&hr^%CrB?e((&~pTuj5_CN^2*ntSYi<$Br$xmg}T!oaroQmOHy7 zhq^Pgr1fl?MmEwmvFpM>TcCd61}F+W7wA)gy!5GmK`>7N`lROqLA!;We&3zpE_Wrz zY8nJ3!EesYJ@?*o@64QYzQdqWu@rp%@so?|KfSCd|IU-ikAagb_=SH5a1~eWDy{UW zwp4kpwKRFuTe>_NEkho2tvrrex6m_Nrpi8gx7f2Grx)=J}-YY@B_Oo7BfBGfH@vT5 zyk$Kp2+wg}fAMNk8;GFoh2g8iZsgzaI*Bz9UUsd`$tOQLPOjh=ei`5?+$e04+QD}G zSatPv-8J0YyDBye3w~F@hRG$ia_Q2radJ^fGVay2L5BfnL*6 zZc02RamGE4>$6gxlR7%)=eLm^52X2zEB`<{t^N;S)dH;gCs_5X+4GNJ+t722lj(|^XuCWjyC6>2I|;}<8nWADRVz~t>NzPM~oM7sC=jj+|NyG zRNCd;FZcD>;IYHAio~kKT2zmwpjp1F-c_$DZ?(Uz?G$#*xZs|d!Hd78VWcOchI@82 z9T#??qbgBz^Vnzxebm_8)pm-}RMZ?DkBe-@2v>HjOrtoOm0HTCva7|`Xx2UFKDMi& zPw4>-T$LJ+x#y%t89i&Gxv}14?_Jn{*6L_3E@g5Ba+&gn>dmj6Kf5QWXpB>Z7<2Sou1d-tF|4nB7$Mx zb=HDmv}f@=+;H6BR${b+Tj5?w>aRq%e9=vGH|XpY0pZH#us66*AG23+g})xH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(71akwUrG=r1HtqBCZal3bcua z_mg6oCnByA<;YT030IwkKwT(@%*B;5OQ~!UR`wAJM!6YWZhT7?Sv-YeyjUa!S5}r3 z;~wpo&6H2+ORh_Cja+iubQU+r>m8a3v2{~^6k;poPm~2;l?$Q|?afk{jPs;Dwf4fh zILKFq_%X~p`^`aKR0l;Y?;b2=BIJR5G(9ZS13D!lc0e0zlHnWCdeT-|Gu~gEC@+fA zBCVom3kKyKkiZX^qwj!?m}BB*SIu2EWZTSRCcBM0WPN5n+wo3sy{vBcFKkXJvo0>; z32StbQVCa-q$q`l##ikA*c3m&oVW!tW@1b{ov|T50jJz3LQJBF2LB>U0Xx00T>UD-u@qOCN)-O<3bIrIAbfTwvK>Z-24KFv9c@c$X<6eb;wbY+Mse)ow>21 z85cGD(aHtq(c0SQK)ZE7)sK4hv}PBT&&02=5AcL{z61&sRN*gZaHn=hWSg`uNkT4M z_Xsb59ev;maRE?a2&7`DdTYJ4F)(8QWdf3_od#b}^S7ZfB2F~vg&sXS(y?GUhM3&i-084~W)Ckysg@&UR zEE?XXUWxifYkkHJ1T`FSg~*7=8zAHF2x>{FeZlKc@(*=aE=l_ipy>Xjm$rv-X8g+_VPxQg^KyM#fF@3KX8d<^jx^u;|gGJGx& z>9dJn()55ZP9M3MRb7gF^TQ(BLF4>4;h{@^4g_pyMn8ioN!!@0Z}r)(Wm^H;(Xe&X z4Dk*CW&z$I+qN!7Z$dJ}>JDJ;4zt=WBdJ>EQQc1AG%d#XL~$ zkMuI1NAg=oh@yE?rB#wg(G;?R{;FQ##wF3QOE6Ahk0KRBQC{*T8g-Gr#?kc;zq)BbyHuZ{E$O+^ywH-8LtvX>oMdH0%_{hFGTq!#TN9@3z>DNX1e HnIrrEsTWTn literal 0 HcmV?d00001 diff --git a/data/dataloaders/__pycache__/oclrsyn_loader.cpython-310.pyc b/data/dataloaders/__pycache__/oclrsyn_loader.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c9b630e1da8e76da360522d212dda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$NHvj+t literal 0 HcmV?d00001 diff --git a/data/dataset_config.py b/data/dataset_config.py index 53b510b..d48d411 100644 --- a/data/dataset_config.py +++ b/data/dataset_config.py @@ -170,9 +170,9 @@ def config_eval_dataloader(args): val_loader = DataLoader(val_dataset, num_workers=8, batch_size=1, shuffle=False, pin_memory=True, drop_last=False) elif args.dataset == "example": # No annotations (annotation path) given - val_data_dirs = ["output/flow/FlowImages_gap1", - "output/images"] - val_seq = ['sample'] + val_data_dirs = [f"{args.flow_output}", + f"{args.img_output}"] + val_seq = [args.name] val_dataset = Example_eval_dataset(data_dirs=val_data_dirs, seqs=val_seq, ref_sam=ref_sam, dataset=args.dataset, flow_gaps=flow_gaps, num_gridside=args.num_gridside) val_loader = DataLoader(val_dataset, num_workers=8, batch_size=1, shuffle=False, pin_memory=True, drop_last=False) diff --git a/evaluation.py b/evaluation.py index a544459..eeccb4d 100644 --- a/evaluation.py +++ b/evaluation.py @@ -213,7 +213,24 @@ def eval(args, val_loader, flowsam): choices=['dvs17', 'dvs17m', 'dvs16', 'ytvos', 'example'], help="evaluation datasets", ) - + parser.add_argument( + '--flow_output', + type=str, + default="output/flow/FlowImages_gap1/sample", + help="flow frame gaps, a string without spacing", + ) + parser.add_argument( + '--img_output', + type=str, + default="output/images/sample", + help="flow frame gaps, a string without spacing", + ) + parser.add_argument( + '--name', + type=str, + default="sample", + help="flow frame gaps, a string without spacing" + ) # Output configuration parser.add_argument( '--max_obj', @@ -236,7 +253,7 @@ def eval(args, val_loader, flowsam): '--save_path', default=None, help="path to save masks", - ) + ) args = parser.parse_args() diff --git a/inference.py b/inference.py index 57ffae0..4eea29e 100644 --- a/inference.py +++ b/inference.py @@ -99,12 +99,20 @@ def inference(args): download_weight(rgb_encoder_ckpt_path, 'https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth') flow_encoder_ckpt_path = 'sam_vit_b_01ec64.pth' download_weight(flow_encoder_ckpt_path, 'https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pth') + # Split the path into directory and filename + directory, filename = os.path.split(args.video_output_path) + flow_path = os.path.join(args.flow_output_path, f'FlowImages_gap1') os.system("python evaluation.py " "--model flowpsam --ckpt {} --rgb_encoder_ckpt_path {} --flow_encoder_ckpt_path {} --flow_gaps 1 " - "--dataset example --save_path {}".format(ckpt, rgb_encoder_ckpt_path, flow_encoder_ckpt_path, args.flowsam_output_path)) + "--dataset example --flow_output {} --img_output {} --name {} --max_obj 1 --save_path {}".format( + ckpt, rgb_encoder_ckpt_path, flow_encoder_ckpt_path, \ + flow_path, directory, filename, args.flowsam_output_path) + ) """ python inference.py --video_file_path sample.mp4 --video_output_path output/images/sample --extract_frames --flow_output_path output/flow --extract_flow --visualize_flow --run_flowsam --flowsam_output_path output --visualize_output +python inference.py --video_file_path siren.mp4 --video_output_path output/images/siren --extract_frames --flow_output_path output/flow --extract_flow --visualize_flow --run_flowsam --flowsam_output_path output --visualize_output +python inference.py --video_file_path highway.mp4 --video_output_path output/images/highway --extract_frames --flow_output_path output/flow --extract_flow --visualize_flow --run_flowsam --flowsam_output_path output --visualize_output """ if __name__ == '__main__': parser = argparse.ArgumentParser() @@ -121,12 +129,12 @@ def inference(args): parser.add_argument('--visualize_output', action='store_true', help='whether to run flow ') args = parser.parse_args() - if args.extract_frames: - extract_frames(args.video_file_path, args.video_output_path) - # Split the path into directory and filename directory, filename = os.path.split(args.video_output_path) + if args.extract_frames: + extract_frames(args.video_file_path, args.video_output_path) + if args.extract_flow: extract_flow(directory, args.flow_output_path) # (Optional) For debug and visualization purpose From 137f68488ce9a6c8ed1182cfe6118bfab3741c48 Mon Sep 17 00:00:00 2001 From: sangbumchoi Date: Fri, 3 May 2024 00:39:35 +0000 Subject: [PATCH 4/6] remove pycache --- data/__pycache__/dataset_config.cpython-310.pyc | Bin 5376 -> 0 bytes data/__pycache__/dataset_utils.cpython-310.pyc | Bin 2347 -> 0 bytes 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 data/__pycache__/dataset_config.cpython-310.pyc delete mode 100644 data/__pycache__/dataset_utils.cpython-310.pyc diff --git a/data/__pycache__/dataset_config.cpython-310.pyc b/data/__pycache__/dataset_config.cpython-310.pyc deleted file mode 100644 index d2477889683184ebc1efa22628f322734fb959ef..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5376 zcmd5=&668P6`vV>kEGr8dUySiwXKjCENrc8$1#p$j7^-S9E_7a5_(S*usIKBf6;-~#fdiBdnD=_5-IZ4+Ugv^T^PB#7 z{rcW=r*XcYv946O29(9gFx=2bN8_qFOCNuCpPG-p*yk8>bno&LU7)ET|t(q!xJ9K>t z3A@#cyg1;I%P@D#jomxkB~(Cekp&TTMML(&hAU;@Mks-@;{-F*M{T7#~;tU;iK zq_HX|Wuq*#o_+VNJ3o~DXe@yWKe+e)yK5J&gcD7nV&UzFZrEk?>GFB$hK-OD${K?D zfs94pGjR^1Uk=`Rc;13X5~v|2u|767jR(f(CP{r^-ZCDUTV`xQN$MDur%C!#a|`ns zlId9D4c{Qy-4@+h-ulESCitxTNT%n%z&@&x~|$WWTy%&wu% z3@L-A4?)AsSJpHOnjV3sxsj$rFFdAs(DX;pbQm>}1zeZ75Zj*@H&bNsnDK@AC|R9! zTsqi{t4qUQ*%kPWx4%IGA+J`tZrqj?-nyzQQQ)U7#y0}AG+8-wK5kbiquPYdRd!_j zxZy?-k6koE5W67bX=1`}jul;u$d1H)t!Kg}ke+FH*5LW)0)P*DbUzDLU~Iyie{Fqa ztr^?Kwy9D<6mMI~S~;)GK+J%shT-e=FpBGuD=*f2k_uUuO|Q*^I?e_RvW_;c0qnlv z@u(H}E8V`buQ9MtkB8msOV~FKWWgAmO(YtzaD#*lOcQM78snbJ+-_4!tK=H)jBS4J?3@Iw2SAVxV{QQ(o~iW-|b$g4^B^$y1Bc+^-EXI zck9!Yz4PAN-%FGwQq^lJ-Gl>RSZIb1Yt3HRm4lfke;7o5trf^N?bG30Q&6`<+{mM~ z7IOtvsb)_O^PVe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{aWHTFLAbI^g19=ZA|?8DLdGu8|^a0*=NlM~=Pb{CixQiVsEVH_}g zrj{$AGIKu4zca|i=ui$serKDVN7~oM&u1CanR^3;@B!38z^)^OJ0CL%UtOl-&;P2O Z({37H!vNu^)i=-{{E8&7g2I`L{{VccLKpx5 From c9e68eca85de1b4e27df6d91bc73fb327af8d83a Mon Sep 17 00:00:00 2001 From: sangbumchoi Date: Fri, 3 May 2024 00:40:24 +0000 Subject: [PATCH 5/6] remove pycache --- .../__pycache__/dvs_loader.cpython-310.pyc | Bin 9280 -> 0 bytes .../__pycache__/example_loader.cpython-310.pyc | Bin 3127 -> 0 bytes .../__pycache__/oclrsyn_loader.cpython-310.pyc | Bin 3773 -> 0 bytes .../__pycache__/ytvos_loader.cpython-310.pyc | Bin 5257 -> 0 bytes 4 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 data/dataloaders/__pycache__/dvs_loader.cpython-310.pyc delete mode 100644 data/dataloaders/__pycache__/example_loader.cpython-310.pyc delete mode 100644 data/dataloaders/__pycache__/oclrsyn_loader.cpython-310.pyc delete mode 100644 data/dataloaders/__pycache__/ytvos_loader.cpython-310.pyc diff --git a/data/dataloaders/__pycache__/dvs_loader.cpython-310.pyc b/data/dataloaders/__pycache__/dvs_loader.cpython-310.pyc deleted file mode 100644 index 707bef1a93dd1d93115c847b31a5adbe7b5cba6e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9280 zcmd5>-;W#Db)H`&hr^%CrB?e((&~pTuj5_CN^2*ntSYi<$Br$xmg}T!oaroQmOHy7 zhq^Pgr1fl?MmEwmvFpM>TcCd61}F+W7wA)gy!5GmK`>7N`lROqLA!;We&3zpE_Wrz zY8nJ3!EesYJ@?*o@64QYzQdqWu@rp%@so?|KfSCd|IU-ikAagb_=SH5a1~eWDy{UW zwp4kpwKRFuTe>_NEkho2tvrrex6m_Nrpi8gx7f2Grx)=J}-YY@B_Oo7BfBGfH@vT5 zyk$Kp2+wg}fAMNk8;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UWxifYkkHJ1T`FSg~*7=8zAHF2x>{FeZlKc@(*=aE=l_ipy>Xjm$rv-X8g+_VPxQg^KyM#fF@3KX8d<^jx^u;|gGJGx& z>9dJn()55ZP9M3MRb7gF^TQ(BLF4>4;h{@^4g_pyMn8ioN!!@0Z}r)(Wm^H;(Xe&X z4Dk*CW&z$I+qN!7Z$dJ}>JDJ;4zt=WBdJ>EQQc1AG%d#XL~$ zkMuI1NAg=oh@yE?rB#wg(G;?R{;FQ##wF3QOE6Ahk0KRBQC{*T8g-Gr#?kc;zq)BbyHuZ{E$O+^ywH-8LtvX>oMdH0%_{hFGTq!#TN9@3z>DNX1e HnIrrEsTWTn diff --git a/data/dataloaders/__pycache__/oclrsyn_loader.cpython-310.pyc b/data/dataloaders/__pycache__/oclrsyn_loader.cpython-310.pyc deleted file mode 100644 index c9b630e1da8e76da360522d212dda835047792b5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3773 zcmaJ^TW{OQ73Po>Nm10rj^fyH;&swIRK3_u9=7e)4cg6igBGb%Btaj98U!QKG!=@J zXQ(9hQZIE1^kob5A4vOBcbg@7$-x*3t>_sbsXU@#IaL(bG?~LsKS|Gd0)yx*CnXp+>WBsW~qE%|c`WZW8pJ@lj zf6%ASv|c))wT6;;q4WKs9on-_>CB8aWTao!)$u2Vs)M+XWAjj2ICePoiuPeX{+<^wiuLXEEq-9G~7?RP^>B z&qN{$v7H}6XIoXg=xs^oFwI~2VZx;oWLd5_o5#-=OmygrU?gkmO|q_(<6tZ}6$+=S zm37E6ahUUwG_emM>tsF-iX$OiWw79t|BA0i*<=*)popX;a$ZECtc^L&lC;QCP)I!& z(j;YR4spn&onrU2O=Ix#p0tt?9W&_+UKS7XH0QGU;PIo!PyA0GKDkGSPtV5E5R(xd z$8j1A@Sb2ijC9!VFJIwD3T6G&M4GHwp0wxG9_;{{u8+P=9jyptk}&0ac_4bA})5t^TAP` z>{7mv@Lk%6A}KyK$@4+V=~P$qo$-lud>x$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k1%v z(CuL!zC1p>mUsJ>xPf)|g_iPvi1$t4Qp!GPt`7RvfV*?Eq3Yd#L5BMgU8Bnk8O%M~ z`|`jq&k?gPBe*Vc@BF;j1ymeR^Aa_;&@`z_r_8I=)xd4qzIB`K*vK8Yl7D92zx;n< z;)CkwZbA3g;vb1ar+mtAd+}(1ChLBV+q}*UJtPeRiX)n&9HTc<5fS7PZdZOtsk`_# zb%w}q^V6)6pi`|1{Q)ZY@ps9BD$R)r|*4iY!A@Ze-w;;5EqvIq#NQ?BQ;>S(Xo z`u|Kr?b%YT>J}xz@v4|jk=5q7yPe_g##xnV&4>CJ(3+H22N4`p{D2mxL{aa3fskoU zi^nv)O9@nyHKWMrlt=3!d7}B_@m z;_r+L^PY$~f+B^O!t9Js~5qWLB{Ucf!-(V;?q$gIbnxVI^nF)f&JByOvIyrq&_NzE0)3|Ddti YLpmMH+i3bmAA!(36fX1}SO@Jt0YC$NHvj+t From 70a41ec2b2065bdd19ca3ee2b2b86dabdeed3e04 Mon Sep 17 00:00:00 2001 From: sangbumchoi Date: Fri, 3 May 2024 01:27:19 +0000 Subject: [PATCH 6/6] add gif type and change on hyperparameters --- inference.py | 57 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 22 deletions(-) diff --git a/inference.py b/inference.py index 4eea29e..2d64164 100644 --- a/inference.py +++ b/inference.py @@ -4,34 +4,46 @@ import cv2 import os import requests +from PIL import Image def extract_frames(video_path, output_folder): # Create the output folder if it doesn't exist os.makedirs(output_folder, exist_ok=True) - - # Open the video file - cap = cv2.VideoCapture(video_path) - - # Variable to keep track of frame count - frame_count = 0 - - # Read frames until there are no more - while cap.isOpened(): - ret, frame = cap.read() - if not ret: - break + + if video_path.endswith(".gif"): + with Image.open(video_path) as img: + while True: + try: + frame_count = img.tell() + frame_img = img.convert("RGB") + frame_img.save(os.path.join(output_folder, f"{frame_count+1:05d}.jpg")) + img.seek(frame_count + 1) + except EOFError: + break + else: + # Open the video file + cap = cv2.VideoCapture(video_path) - # Save the frame as an image - frame_path = os.path.join(output_folder, f"{frame_count+1:05d}.jpg") - cv2.imwrite(frame_path, frame) + # Variable to keep track of frame count + frame_count = 0 - frame_count += 1 - - # Release the video capture object - cap.release() + # Read frames until there are no more + while cap.isOpened(): + ret, frame = cap.read() + if not ret: + break + + # Save the frame as an image + frame_path = os.path.join(output_folder, f"{frame_count+1:05d}.jpg") + cv2.imwrite(frame_path, frame) + + frame_count += 1 + + # Release the video capture object + cap.release() def extract_flow(rgb_path, flow_output_path): - gap = [1] + gap = [1, 2] reverse = [0, 1] batch_size = 4 @@ -103,8 +115,8 @@ def inference(args): directory, filename = os.path.split(args.video_output_path) flow_path = os.path.join(args.flow_output_path, f'FlowImages_gap1') os.system("python evaluation.py " - "--model flowpsam --ckpt {} --rgb_encoder_ckpt_path {} --flow_encoder_ckpt_path {} --flow_gaps 1 " - "--dataset example --flow_output {} --img_output {} --name {} --max_obj 1 --save_path {}".format( + "--model flowpsam --ckpt {} --rgb_encoder_ckpt_path {} --flow_encoder_ckpt_path {} --flow_gaps 1,-1,2,-2 --num_gridside 20 " + "--dataset example --flow_output {} --img_output {} --name {} --max_obj 3 --save_path {}".format( ckpt, rgb_encoder_ckpt_path, flow_encoder_ckpt_path, \ flow_path, directory, filename, args.flowsam_output_path) ) @@ -113,6 +125,7 @@ def inference(args): python inference.py --video_file_path sample.mp4 --video_output_path output/images/sample --extract_frames --flow_output_path output/flow --extract_flow --visualize_flow --run_flowsam --flowsam_output_path output --visualize_output python inference.py --video_file_path siren.mp4 --video_output_path output/images/siren --extract_frames --flow_output_path output/flow --extract_flow --visualize_flow --run_flowsam --flowsam_output_path output --visualize_output python inference.py --video_file_path highway.mp4 --video_output_path output/images/highway --extract_frames --flow_output_path output/flow --extract_flow --visualize_flow --run_flowsam --flowsam_output_path output --visualize_output +python inference.py --video_file_path bird.gif --video_output_path output/images/bird --extract_frames --flow_output_path output/flow --extract_flow --visualize_flow --run_flowsam --flowsam_output_path output --visualize_output """ if __name__ == '__main__': parser = argparse.ArgumentParser()