Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ran script but not sure how to generate the trajectory GIF #7

Open
sushantbangru opened this issue Sep 22, 2020 · 5 comments
Open

Ran script but not sure how to generate the trajectory GIF #7

sushantbangru opened this issue Sep 22, 2020 · 5 comments

Comments

@sushantbangru
Copy link

Hi,

I ran the following code;
python3 main.py --dataset ../hep_fmnn.npz --embedding_name phate

After finished running generated a bunch of results in results/tmp/ folder including 100s of jpegs like this...
2200_2

Is there a separate code for generating GIF, I looked at a similar issue someone else raised, and made a change they say, which led to another folder named trajectory with figures like these, but still no mp4 file.
viz-00000

Thanks for your help.

Sushant

@atong01
Copy link
Member

atong01 commented Sep 22, 2020

Hi Shushant, when things work correctly there should be a mp4 along with those jpegs. The code that does this is in TrajectoryNet/lib/viz_scrna.py. it works by producing a bunch of snapshot images and sticking them together with ffmpeg. I would guess that ffmpeg is not working correctly on your system.

@SK124
Copy link

SK124 commented Oct 14, 2020

@sushantbangru Did you figure it out?
I have all the jpegs made by the model during training, along with the weights after 1000 epochs. Now I need the gif alone instead of training from scratch as i have the weights. What did you do?

@sushantbangru
Copy link
Author

As @atong01 suggested above for me the ffmpeg was an issue. I just installed/updated it and now it is working. But I basically reran the thing with fewer iterations to check. It is working now.

@SK124 you can try using something like easy video maker if you don't want to rerun the training.

@atong01 now that I got the mp4 file created, it seems there are some arbitary timepoints like 48 hr, 12, 18 and 30 days, which I didn't mention. Also, why is the x-axis a little shrunk from the left making the area on the left basically empty?

atong01 added a commit that referenced this issue Oct 15, 2020
Remove custom ticklabels on density video. Fix Issue #7.
@atong01
Copy link
Member

atong01 commented Oct 15, 2020

Sorry, I was hacking for the deadline and left in the custom matplotlib ticklabels. Just fixed this in /lib/viz_scrna.py line 358. That is the function that generates the density plots so if you want anything to look different (colormap, labels etc.) I would look there.

Note that if you run things with the --test flag then it will attempt to load the last checkpoint from wherever you set --save and plot output without training.

@SK124
Copy link

SK124 commented Oct 16, 2020

image
@sushantbangru I used ffmpeg separately and I got the video, unfortunately it does not look the same as the gif posted in the repo readme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants