jwlee-vcl / CTRL-C

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example inference script?

joel1st opened this issue · comments

This project looks very interesting! Is there an inference script available or should we alter one of the test scripts?

Looks like the current main branch is in a broken state. There are references to GPTran / gptran.yaml files which I believe have been renamed.

The first commit of this repo appears to be running (although I don't have access to csv line files etc to test it). I am currently in the process of trying to get this to run on a non SUN360/GSV image. It looks like the test_hlw.py might be the best starting point, but I'm not sure if there is a script to generate the csv line files or if this is a WIP

As a follow up, if anyone is interested on trying this on their own images, you'll need to run your image through LSD (line segment detector) as noted in the paper. One implementation I found was: https://github.com/theWorldCreator/LSD. Note that this implementation gives back the data in a space separated format, you will need to convert it to comma separated. From there I made some slight alterations to the test_hlw/hlw dataset for inference (mainly removing error calculations on horizon lines etc).

I am still in the process of building this out, but it appears to be giving me back results in line with what I would expect.

As a follow up, if anyone is interested on trying this on their own images, you'll need to run your image through LSD (line segment detector) as noted in the paper. One implementation I found was: https://github.com/theWorldCreator/LSD. Note that this implementation gives back the data in a space separated format, you will need to convert it to comma separated. From there I made some slight alterations to the test_hlw/hlw dataset for inference (mainly removing error calculations on horizon lines etc).

I am still in the process of building this out, but it appears to be giving me back results in line with what I would expect.

I am also interested in trying this work. Glad to see you have made some progress. Would you mind updating you progress here and let us know how we should proceed? many thanks.

@ydzhang12345 the prediction results have been quite promising from the images I have tried it on, so I'm going to build this out further (there are currently manual steps involved). Assuming all goes well, I will put a PR up with an inference script in the next couple of days.

Awesome! I will keep an eye on here then. Thank you joel!

Thank you for your interest. I wrote a script that can test a single image. You can test it with the code below.

python test_image.py --sample 'sample.jpg' --opts OUTPUT_DIR 'outputs'

@jwlee-vcl thanks for that! Looks like I took a similar approach, so I won't bother adding a PR :)