<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: A depreciated function in the API python Library in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/a-depreciated-function-in-the-api-python-library/m-p/1318985#M8935</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/703853"&gt;@Ha1&lt;/a&gt;&amp;nbsp;What is the version of arcgis python api installed? What command have you used for installation? If possible, also provide the video to reproduce the issue&lt;/P&gt;</description>
    <pubDate>Wed, 16 Aug 2023 06:08:02 GMT</pubDate>
    <dc:creator>PriyankaTuteja</dc:creator>
    <dc:date>2023-08-16T06:08:02Z</dc:date>
    <item>
      <title>A depreciated function in the API python Library</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/a-depreciated-function-in-the-api-python-library/m-p/1310756#M8897</link>
      <description>&lt;P&gt;Hello everyone. I am doing a project on object tracking. Therefore I have used SiamMask from arcgis.learn module. I have installed the python API version through command prompt. But I have encountered&amp;nbsp; a problem as there is a numpy function in the module which has been depreciated. I cannot change the code in the module nor download the library locally through github. Github folder does not have setup.py file. Please give a solution which is solvable in jupyter notebook.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CODE:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;import cv2&lt;BR /&gt;from arcgis.learn import SiamMask&lt;BR /&gt;import numpy as np&lt;BR /&gt;import torch&lt;/P&gt;&lt;P&gt;ot = SiamMask()&lt;/P&gt;&lt;P&gt;cap = cv2.VideoCapture("Office.mp4")&lt;/P&gt;&lt;P&gt;# Read all frames and store them in a list&lt;BR /&gt;frames = []&lt;BR /&gt;while True:&lt;BR /&gt;ret, frame = cap.read()&lt;BR /&gt;if ret is False:&lt;BR /&gt;break&lt;BR /&gt;frames.append(frame)&lt;/P&gt;&lt;P&gt;# Initialize the bounding box coordinates (x, y, width, height)&lt;BR /&gt;x = 100&lt;BR /&gt;y = 100&lt;BR /&gt;w = 50&lt;BR /&gt;h = 80&lt;/P&gt;&lt;P&gt;# Initialize the track with the given coordinates&lt;BR /&gt;state = ot.init(frames[0], [[x, y, w, h]])&lt;/P&gt;&lt;P&gt;frame_id = 0&lt;BR /&gt;while frame_id &amp;lt; len(frames):&lt;BR /&gt;frame = frames[frame_id]&lt;BR /&gt;state = ot.update(frame) # Update the track location in the frame&lt;BR /&gt;for track in state:&lt;BR /&gt;mask = track.mask&lt;BR /&gt;frame[:, :, 2] = (mask &amp;gt; 0) * 255 + (mask == 0) * frame[:, :, 2]&lt;BR /&gt;cv2.polylines(frame, [np.int0(track.location).reshape((-1, 1, 2))], True, (0, 255, 0), 2)&lt;/P&gt;&lt;P&gt;cv2.imshow('frame', frame)&lt;BR /&gt;key = cv2.waitKey(1)&lt;BR /&gt;if key &amp;amp; 0xFF == ord('q'):&lt;BR /&gt;break&lt;/P&gt;&lt;P&gt;# Use the frame number (frame_id) to advance to the next frame&lt;BR /&gt;frame_id += 1&lt;/P&gt;&lt;P&gt;cap.release()&lt;BR /&gt;cv2.destroyAllWindows()&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ERROR:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ha1_1-1690021277664.png" style="width: 657px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/76031i30A784D364F76925/image-dimensions/657x73?v=v2" width="657" height="73" role="button" title="Ha1_1-1690021277664.png" alt="Ha1_1-1690021277664.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jul 2023 10:32:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/a-depreciated-function-in-the-api-python-library/m-p/1310756#M8897</guid>
      <dc:creator>Ha1</dc:creator>
      <dc:date>2023-07-22T10:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: A depreciated function in the API python Library</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/a-depreciated-function-in-the-api-python-library/m-p/1316472#M8916</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would it be possible to get further detail on what you are trying to detect within the video? It could be a case that a different workflow might provide the best outcome.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 15:35:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/a-depreciated-function-in-the-api-python-library/m-p/1316472#M8916</guid>
      <dc:creator>David_McRitchie</dc:creator>
      <dc:date>2023-08-08T15:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: A depreciated function in the API python Library</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/a-depreciated-function-in-the-api-python-library/m-p/1318656#M8934</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/82798"&gt;@PriyankaTuteja&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2023 13:36:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/a-depreciated-function-in-the-api-python-library/m-p/1318656#M8934</guid>
      <dc:creator>NicholasGiner1</dc:creator>
      <dc:date>2023-08-15T13:36:40Z</dc:date>
    </item>
    <item>
      <title>Re: A depreciated function in the API python Library</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/a-depreciated-function-in-the-api-python-library/m-p/1318985#M8935</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/703853"&gt;@Ha1&lt;/a&gt;&amp;nbsp;What is the version of arcgis python api installed? What command have you used for installation? If possible, also provide the video to reproduce the issue&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2023 06:08:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/a-depreciated-function-in-the-api-python-library/m-p/1318985#M8935</guid>
      <dc:creator>PriyankaTuteja</dc:creator>
      <dc:date>2023-08-16T06:08:02Z</dc:date>
    </item>
  </channel>
</rss>

