Comments (6)
I found out that labels
is actually unused and just filled with 0, so can be ignore.
In my fork, I refactored the code a bit so that visualize_expressions now also returns the output of the pre-trained network in addition to the groundtruth. Can be found here:
https://github.com/adrelino/CSGNet/blob/master/visualize_expressions.py
from csgnet.
You can look at the test_synthetic.py file for testing the model. You can also also use visualize_expressions.py script to visualize the induced programs in the form of images.
from csgnet.
Thank you, it much helps to visualize the test results. I can close this issue. Also see my PR.
Can you consider to append a simple command which just apply the network to specified single image, visualize the predicted image and CSG expression? I think it is very helpful to know the concept of your work out of the box.
Thanks,
from csgnet.
Thank you for the PR but it doesn't seem necessary, because visualize_expressions.py can be used by the user by slight modification.
Can you consider to append a simple command which just apply the network to specified single image, visualize the predicted image and CSG expression? I think it is very helpful to know the concept of your work out of the box.
I will add a small script.
from csgnet.
I still cannot find the script that just takes a 64x64 binary image (and the provided pre-trained model) as input and outputs a program code (that generates a similar looking image based on camfer or iou distance) for that image.
visualize_expressions.py
just takes an expression and generates the ground-truth 64x64 image.
test_synthetic.py
takes the pre-trained model and also the whole synthetic data-set expressions, somehow selects a validation subset and computes the mean chamfer distance metric over all program sizes. I guess that from this file, such a script that just takes an image and outputs the program could be extracted, but I am a little confused about these steps:
Lines 104 to 120 in 34e9621
When running inference, we should not need ground-truth labels, but then why do we need to extract one-hot-labels from the ground truth labels before feeding it to test_output = imitate_net.test([data, one_hot_labels, max_len])
?
How would I proceed if instead of using the generator data_, labels = next(test_gen_objs[k])
, I just input my own image (batch), let's say a logo for which I don't even have ground truth labels?
Thanks for your help!
from csgnet.
@adrelino Thanx for the script. The labels are unused in test mode.
from csgnet.
Related Issues (5)
- pretrained model? HOT 3
- License ? HOT 1
- Release stack-augmented network architecture. HOT 1
- Hi, How can I solve this problem HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from csgnet.