0
$\begingroup$

I am on Windows.

I am working on a project which consists in analysing a very high number of images. More precisely, I am using the FacialFeatures function of Mathematica to quantify the visibility of women in Hindi cinema in the last fifty years.

Here are the steps I have followed:

  1. I prepare a Wolfram Script. I have borrowed the coding from this source: https://community.wolfram.com/groups/-/m/t/2288529

  2. I save the Wolfram Script under the name script_test.wls in a folder which I call workplace_folder. This folder also includes another folder - film_folder - which contains the images I want to analyse.

  3. I open my Windows Command Line, and I change the directory to workplace_folder

  4. I run the following command: >script_test.wls film_folder output_file.json

  5. Windows asks me the program I want to use to open the file; I choose wolframscript.exe

  6. A new Windows Command Line window opens, some text appears (too quick for me to be able to read), and then the window closes. As if the work was done.

  7. However, nothing seems to be happening. No output_file.json has been created, and no analysis seemed to have taken place.

Is there any step I got wrong?

$\endgroup$

1 Answer 1

0
$\begingroup$

I created the test conditions you need to get going.

enter image description here

From the cmd prompt: (requires that Wolfram directory is on your path)

wolframscript.exe -f script_test.wls film_folder emma_stone.json

It gave me some errors and went on a download spree (97MB) to get what it needed. Then it seemed to hang. I pressed Ctrl-C but the file emma_stone.json had been created.

It has 44808 lines. Some excerpts are as follows:

"emma_2.jpg":[
            {
                "Age":27,
                "Emotion":"happiness",
                "Gender":"Female",

    "emma_3.jpg":[
        {
            "Age":31,
            "Emotion":"happiness",
            "Gender":"Female",
            "Landmarks":{

    "emma_4.jpg":[
        {
            "Age":48,
            "Emotion":"happiness",
            "Gender":"Female",
            "Landmarks":{

    "emma-stone-t.jpg":[
        {
            "Age":53,
            "Emotion":"happiness",
            "Gender":"Female",
            "Landmarks":{

I hope it helps you.

$\endgroup$
1
  • $\begingroup$ Thanks for your answer Syed (always incredible helpful). It worked the 1st time I attempted it. Since then, I had for some reasons to uninstall Mathematica and reinstall it. Now, I get the following error message: > AddHandler::shdw: Symbol AddHandler appears in multiple contexts > {CURLLinkUtilities, Internal}; definitions in context > CURLLinkUtilities` may shadow or be shadowed by other definitions. > > Message occurred during file: C:\Program Files\Wolfram > Research\Mathematica\12.3\SystemFiles\Components\NeuralFunctions\Audio\SpeechRecognition\SpeechCases.m In the end, nothing happens, n $\endgroup$
    – HugoRD
    Aug 31, 2021 at 8:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.